diff --git a/build-master-targets.xml b/build-master-targets.xml index bac756757..b795d13fd 100644 --- a/build-master-targets.xml +++ b/build-master-targets.xml @@ -567,7 +567,6 @@ - diff --git a/build.xml b/build.xml index 7e4358357..60b4bcc8b 100644 --- a/build.xml +++ b/build.xml @@ -79,12 +79,6 @@ - - - - - - @@ -112,11 +106,6 @@ - - - - - @@ -148,7 +137,7 @@ - + @@ -386,15 +375,13 @@ - - - + @@ -403,14 +390,12 @@ - - - + - + @@ -685,28 +670,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -716,4 +679,4 @@ some of the targets of this build file. --> - \ No newline at end of file + diff --git a/components/project_management/src/java/main/com/topcoder/management/project/Project.java b/components/project_management/src/java/main/com/topcoder/management/project/Project.java index 9e887c0f7..6c7cadf50 100644 --- a/components/project_management/src/java/main/com/topcoder/management/project/Project.java +++ b/components/project_management/src/java/main/com/topcoder/management/project/Project.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006 - 2014 TopCoder Inc., All Rights Reserved. + * Copyright (C) 2006 - 2017 TopCoder Inc., All Rights Reserved. */ package com.topcoder.management.project; @@ -74,7 +74,13 @@ *
  • Added property {@link #autoAssignReviewerId}
  • * *

    - * + * + *

    + * Version 1.10 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES): + *

      + *
    • Added {@link #groups}
    • + *
    + *

    *

    * This class implements Serializable interface to support serialization. *

    @@ -82,8 +88,8 @@ * Thread safety: This class is not thread safe. *

    * - * @author tuenm, iamajia, duxiaoyang, bugbuka, GreatKevin - * @version 1.9 + * @author tuenm, iamajia, duxiaoyang, bugbuka, GreatKevin, TCSCODER + * @version 1.10 * @since 1.0 */ @XmlType(name = "project", namespace = "com.topcoder.management.project") @@ -280,6 +286,13 @@ public long getIterativeReviewScorecardId() { */ private List copilotContestExtraInfos; + /** + * Represents list of groups of the challenge + * + * @since 1.10 + */ + private List groups; + /** *

    * Create a new Project instance with the given project type and project @@ -843,4 +856,33 @@ public String getCreator() { public void setCreator(String creator) { this.creator = creator; } + + /** + * Getter for {@link #groups} + * + * @return groups + * @since 1.10 + */ + public List getGroups() { + if (groups == null) { + groups = new ArrayList(); + } + return groups; + } + + /** + * Setter for {@link #groups} + * + * @param groups list of ProjectGroup + * @since 1.10 + */ + public void setGroups(List groups) { + if (groups != null) { + if (groups.contains(null)) { + throw new IllegalArgumentException("The project groups can not contain null."); + } + } + + this.groups = groups; + } } diff --git a/components/project_management/src/java/main/com/topcoder/management/project/ProjectGroup.java b/components/project_management/src/java/main/com/topcoder/management/project/ProjectGroup.java new file mode 100644 index 000000000..57c84bb93 --- /dev/null +++ b/components/project_management/src/java/main/com/topcoder/management/project/ProjectGroup.java @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2017 TopCoder Inc., All Rights Reserved. + */ +package com.topcoder.management.project; + +import java.io.Serializable; + +/** + *

    + * This is a ProjectGroup entity which represents the project_group_lu. + *

    + * + *

    + * Thread safety: This class is not thread safe. + *

    + * + * @author TCSCODER + * @version 1.0 + */ +public class ProjectGroup implements Serializable { + /** + * Represents group id + */ + private long id; + + /** + * Represents group name + */ + private String name; + + /** + * Constructor + */ + public ProjectGroup() { + } + + /** + * Constructor + * + * @param id group id + * @param name group name + */ + public ProjectGroup(long id, String name) { + this.id = id; + this.name = name; + } + + /** + * Getter for {@link #id} + * @return id + */ + public long getId() { + return id; + } + + /** + * Setter for {@link #id} + * @param id the group id + */ + public void setId(long id) { + this.id = id; + } + + /** + * Getter for {@link #name} + * @return name + */ + public String getName() { + return name; + } + + /** + * Setter for {@link #name} + * @param name the name of group + */ + public void setName(String name) { + this.name = name; + } +} diff --git a/components/project_management/src/java/main/com/topcoder/management/project/ProjectManager.java b/components/project_management/src/java/main/com/topcoder/management/project/ProjectManager.java index 7e1afad7a..2cee6a44e 100644 --- a/components/project_management/src/java/main/com/topcoder/management/project/ProjectManager.java +++ b/components/project_management/src/java/main/com/topcoder/management/project/ProjectManager.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006 - 2013 TopCoder Inc., All Rights Reserved. + * Copyright (C) 2006 - 2017 TopCoder Inc., All Rights Reserved. */ package com.topcoder.management.project; @@ -106,12 +106,19 @@ *

    * *

    + * Version 1.6 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES): + *

      + *
    • Added {@link #getAllProjectGroups()}
    • + *
    + *

    + * + *

    * Thread safety: The implementations of this interface do not have to be thread * safe. *

    * - * @author tuenm, iamajia, pulky, murphydog, bugbuka, GreatKevin - * @version 1.5 + * @author tuenm, iamajia, pulky, murphydog, bugbuka, GreatKevin, TCSCODER + * @version 1.6 */ public interface ProjectManager { /** @@ -1140,4 +1147,13 @@ public void saveSoftwareCheckpointSubmissionsGeneralFeedback(long contestId, Str * @since 1.2.5 */ public boolean[] requireBillingProjectsCCA(long[] billingProjectIds) throws PersistenceException; + + /** + * Get all project groups + * + * @return array of all project group + * @throws PersistenceException if any database related exception occur + * @since 1.6 + */ + public ProjectGroup[] getAllProjectGroups() throws PersistenceException; } diff --git a/components/project_management/src/java/main/com/topcoder/management/project/ProjectManagerImpl.java b/components/project_management/src/java/main/com/topcoder/management/project/ProjectManagerImpl.java index 97298a1a5..67452eecd 100644 --- a/components/project_management/src/java/main/com/topcoder/management/project/ProjectManagerImpl.java +++ b/components/project_management/src/java/main/com/topcoder/management/project/ProjectManagerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006 - 2013 TopCoder Inc., All Rights Reserved. + * Copyright (C) 2006 - 2017 TopCoder Inc., All Rights Reserved. */ package com.topcoder.management.project; @@ -122,15 +122,22 @@ *
  • Added method {@link #getAllProjectPlatforms()}
  • * *

    - * + * + *

    + * Version 1.6 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES): + *

      + *
    • Added {@link #getAllProjectGroups()}
    • + *
    + *

    + * *

    * Thread Safety: The implementation is not thread safe in that two threads * running the same method will use the same statement and could overwrite each * other's work. *

    * - * @author tuenm, iamajia, pulky, murphydog, bugbuka, GreatKevin - * @version 1.5 + * @author tuenm, iamajia, pulky, murphydog, bugbuka, GreatKevin, TCSCODER + * @version 1.6 */ public class ProjectManagerImpl implements ProjectManager { /** @@ -1615,4 +1622,15 @@ public boolean[] requireBillingProjectsCCA(long[] billingProjectIds) throws Pers return requiredCCAs; } + + /** + * Get all project groups + * + * @return array of all project group + * @throws PersistenceException if any database related exception occur + * @since 1.6 + */ + public ProjectGroup[] getAllProjectGroups() throws PersistenceException { + return persistence.getAllProjectGroups(); + } } diff --git a/components/project_management/src/java/main/com/topcoder/management/project/ProjectPersistence.java b/components/project_management/src/java/main/com/topcoder/management/project/ProjectPersistence.java index a1b209042..7c329aee7 100644 --- a/components/project_management/src/java/main/com/topcoder/management/project/ProjectPersistence.java +++ b/components/project_management/src/java/main/com/topcoder/management/project/ProjectPersistence.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006 - 2013 TopCoder Inc., All Rights Reserved. + * Copyright (C) 2006 - 2017 TopCoder Inc., All Rights Reserved. */ package com.topcoder.management.project; @@ -88,14 +88,21 @@ *
  • Added method {@link #getAllProjectPlatforms()}
  • * *

    - * + * + *

    + * Version 1.6 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES): + *

      + *
    • Added {@link #getAllProjectGroups()}
    • + *
    + *

    + * *

    * Thread safety: The implementations of this interface do not have to be thread * safe. *

    * - * @author tuenm, iamajia, pulky, murphydog, bugbuka, GreatKevin - * @version 1.5 + * @author tuenm, iamajia, pulky, murphydog, bugbuka, GreatKevin, TCSCODER + * @version 1.6 */ public interface ProjectPersistence { /** @@ -1019,4 +1026,13 @@ public List getSimplePipelineData(long userId, Date startDat */ public void saveSoftwareCheckpointSubmissionsGeneralFeedback(long contestId, String feedback) throws PersistenceException; + + /** + * Get all project groups + * + * @return array of all project group + * @throws PersistenceException if any database related exception occur + * @since 1.6 + */ + public ProjectGroup[] getAllProjectGroups() throws PersistenceException; } diff --git a/components/project_management/src/java/main/com/topcoder/management/project/persistence/AbstractInformixProjectPersistence.java b/components/project_management/src/java/main/com/topcoder/management/project/persistence/AbstractInformixProjectPersistence.java index 28b82b582..eaa82b849 100644 --- a/components/project_management/src/java/main/com/topcoder/management/project/persistence/AbstractInformixProjectPersistence.java +++ b/components/project_management/src/java/main/com/topcoder/management/project/persistence/AbstractInformixProjectPersistence.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 - 2014 TopCoder Inc., All Rights Reserved. + * Copyright (C) 2007 - 2017 TopCoder Inc., All Rights Reserved. */ package com.topcoder.management.project.persistence; @@ -43,6 +43,7 @@ import com.topcoder.management.project.ProjectMMSpecification; import com.topcoder.management.project.ProjectPersistence; import com.topcoder.management.project.ProjectPlatform; +import com.topcoder.management.project.ProjectGroup; import com.topcoder.management.project.ProjectPropertyType; import com.topcoder.management.project.ProjectSpec; import com.topcoder.management.project.ProjectStatus; @@ -381,9 +382,16 @@ * Thread Safety: This class is thread safe because it is immutable. *

    * + *

    + * Version 1.8.2 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES): + *

      + *
    • Added {@link #QUERY_ALL_PROJECT_GROUP_SQL}
    • + *
    • Added {@link #QUERY_ALL_PROJECT_GROUP_COLUMN_TYPES}
    • + *
    • Added {@link #getAllProjectGroups()} get all groups
    • + *
    * - * @author tuenm, urtks, bendlund, fuyun, flytoj2ee, tangzx, GreatKevin, frozenfx, freegod, bugbuka, Veve, GreatKevin - * @version 1.8.1 + * @author tuenm, urtks, bendlund, fuyun, flytoj2ee, tangzx, GreatKevin, frozenfx, freegod, bugbuka, Veve, GreatKevin, TCSCODER + * @version 1.8.2 * @since 1.0 */ public abstract class AbstractInformixProjectPersistence implements ProjectPersistence { @@ -2442,7 +2450,21 @@ public abstract class AbstractInformixProjectPersistence implements ProjectPersi * @since 1.5.4 */ private static final String UPDATE_CHECKPOINT_FEEDBACK_SQL = "UPDATE comp_milestone_feedback " - + "SET feedback = ? WHERE project_id = "; + + "SET feedback = ? WHERE project_id = "; + + /** + * Sql statement for fetching all of challenge groups + * @since 1.8.2 + */ + private static final String QUERY_ALL_PROJECT_GROUP_SQL = "SELECT group_id, description " + + " FROM security_groups where challenge_group_ind=1"; + + /** + * Return type of {@link #QUERY_ALL_PROJECT_GROUP_SQL} + * @since 1.8.2 + */ + private static final DataType[] QUERY_ALL_PROJECT_GROUP_COLUMN_TYPES = new DataType[] { + Helper.LONG_TYPE, Helper.STRING_TYPE }; /** *

    @@ -9992,4 +10014,45 @@ private List getCopilotContestExtraInfos(long projectId throw e; } } + + /** + *

    + * Get all groups + *

    + * @return Array of all ProjectGroup + * @throws PersistenceException if any database related exception occur + * @since 1.8.2 + */ + public ProjectGroup[] getAllProjectGroups() throws PersistenceException { + Connection conn = null; + getLogger().log(Level.INFO, new LogMessage(null, null, "Enter getAllProjectGroup method.")); + try { + // create the connection + conn = openConnection(); + + Object[][] rows = Helper.doQuery(conn, + QUERY_ALL_PROJECT_GROUP_SQL, new Object[] {}, + QUERY_ALL_PROJECT_GROUP_COLUMN_TYPES); + + // create the ProjectPlatform array. + ProjectGroup[] projectGroups = new ProjectGroup[rows.length]; + + for (int i = 0; i < rows.length; ++i) { + Object[] row = rows[i]; + + // create the ProjectPlatform object + projectGroups[i] = new ProjectGroup(((Long) row[0]).longValue(), + (String) row[1]); + } + + closeConnection(conn); + return projectGroups; + } catch (PersistenceException e) { + getLogger().log(Level.ERROR, new LogMessage(null, null, "Fail to getAllProjectGroups.", e)); + if (conn != null) { + closeConnectionOnError(conn); + } + throw e; + } + } } diff --git a/conf/ear/META-INF/application.xml b/conf/ear/META-INF/application.xml index 5a58d13b3..9e2a81fc0 100644 --- a/conf/ear/META-INF/application.xml +++ b/conf/ear/META-INF/application.xml @@ -95,13 +95,6 @@ conf - - - - scorecard.war - /direct/scorecard - - direct.war diff --git a/conf/web/WEB-INF/struts.xml b/conf/web/WEB-INF/struts.xml index 38c4ab90a..bdca16dd3 100644 --- a/conf/web/WEB-INF/struts.xml +++ b/conf/web/WEB-INF/struts.xml @@ -267,11 +267,10 @@ - /scorecard/logout - + diff --git a/scorecard_tool/.classpath b/scorecard_tool/.classpath deleted file mode 100644 index 24af43cab..000000000 --- a/scorecard_tool/.classpath +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/scorecard_tool/.project b/scorecard_tool/.project deleted file mode 100644 index 4f8e1edc2..000000000 --- a/scorecard_tool/.project +++ /dev/null @@ -1,52 +0,0 @@ - - - scorecard_tool - - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.jdt.core.javabuilder - - - - - - com.springsource.sts.grails.core.nature - org.eclipse.jdt.groovy.core.groovyNature - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - - - - .link_to_grails_plugins - 2 - GRAILS_ROOT/1.3.7/projects/scorecard_tool/plugins - - - json-rest-api-1.0.8-grails-app-conf - 2 - GRAILS_ROOT/1.3.7/projects/scorecard_tool/plugins/json-rest-api-1.0.8/grails-app/conf - - - json-rest-api-1.0.8-grails-app-controllers - 2 - GRAILS_ROOT/1.3.7/projects/scorecard_tool/plugins/json-rest-api-1.0.8/grails-app/controllers - - - json-rest-api-1.0.8-src-groovy - 2 - GRAILS_ROOT/1.3.7/projects/scorecard_tool/plugins/json-rest-api-1.0.8/src/groovy - - - tomcat-1.3.7-src-groovy - 2 - GRAILS_ROOT/1.3.7/projects/scorecard_tool/plugins/tomcat-1.3.7/src/groovy - - - diff --git a/scorecard_tool/DataSource.groovy.properties b/scorecard_tool/DataSource.groovy.properties deleted file mode 100644 index 362048232..000000000 --- a/scorecard_tool/DataSource.groovy.properties +++ /dev/null @@ -1,41 +0,0 @@ -dataSource { - pooled = true - driverClassName = "org.hsqldb.jdbcDriver" - username = "sa" - password = "" -} -hibernate { - cache.use_second_level_cache = true - cache.use_query_cache = true - cache.provider_class = 'net.sf.ehcache.hibernate.EhCacheProvider' -} -// environment specific settings -environments { - development { - dataSource { - // url = "jdbc:hsqldb:mem:devDB" - // dbCreate = "create-drop" - - driverClassName = "com.informix.jdbc.IfxDriver" - url = "jdbc:informix-sqli://@database.server@:@database.port@/tcs_catalog:INFORMIXSERVER=@database.INFORMIXSERVER@;DB_LOCALE=en_us.utf8" - username = "@database.username@" - password = "@database.password@" - } - } - test { - dataSource { - // Please DONOT change the data source for test environment because the review table in production database has - // many foreign keys - dbCreate = "create-drop" - url = "jdbc:hsqldb:mem:testDb" - } - } - production { - dataSource { - driverClassName = "com.informix.jdbc.IfxDriver" - url = "jdbc:informix-sqli://@database.server@:@database.port@/tcs_catalog:INFORMIXSERVER=@database.INFORMIXSERVER@;DB_LOCALE=en_us.utf8" - username = "@database.username@" - password = "@database.password@" - } - } -} diff --git a/scorecard_tool/application.properties b/scorecard_tool/application.properties deleted file mode 100644 index b51bcf303..000000000 --- a/scorecard_tool/application.properties +++ /dev/null @@ -1,9 +0,0 @@ -#Grails Metadata file -#Thu Jul 28 20:42:18 BRT 2011 -app.grails.version=1.3.7 -app.name=scorecard -app.servlet.version=2.4 -app.version=0.1 -plugins.hibernate=1.3.7 -plugins.json-rest-api=1.0.8 -plugins.tomcat=1.3.7 diff --git a/scorecard_tool/build.xml b/scorecard_tool/build.xml deleted file mode 100644 index e826d3a22..000000000 --- a/scorecard_tool/build.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/scorecard_tool/docs/ScorecardToolDeploymentGuide.doc b/scorecard_tool/docs/ScorecardToolDeploymentGuide.doc deleted file mode 100644 index 0b0e35929..000000000 Binary files a/scorecard_tool/docs/ScorecardToolDeploymentGuide.doc and /dev/null differ diff --git a/scorecard_tool/docs/ScorecardToolDeploymentGuide_Old.doc b/scorecard_tool/docs/ScorecardToolDeploymentGuide_Old.doc deleted file mode 100644 index 1445e9922..000000000 Binary files a/scorecard_tool/docs/ScorecardToolDeploymentGuide_Old.doc and /dev/null differ diff --git a/scorecard_tool/grails-app/conf/BootStrap.groovy b/scorecard_tool/grails-app/conf/BootStrap.groovy deleted file mode 100644 index 65ee6cd7d..000000000 --- a/scorecard_tool/grails-app/conf/BootStrap.groovy +++ /dev/null @@ -1,67 +0,0 @@ -/* -* Copyright (C) 2011 TopCoder Inc., All Rights Reserved. -*/ -import grails.util.GrailsUtil - -import com.topcoder.admin.scorecards.IDSequences -import com.topcoder.database.utilities.TopCoderTableHiLoGenerator - -class BootStrap { - - def init = { servletContext -> - switch (GrailsUtil.environment) { - case "test": - TopCoderTableHiLoGenerator.TEST_ENV = true - // insert id sequence for scorecard_id_seq - def scorecardIdSeq = new IDSequences( - name: 'scorecard_id_seq', - nextBlockStart: 10000, - blockSize: 100, - exhausted: false - ) - scorecardIdSeq.save() - if (scorecardIdSeq.hasErrors()) { - println scorecardIdSeq.errors - } - - // insert id sequence for scorecard_group_id_seq - def scorecardGroupIdSeq = new IDSequences( - name: 'scorecard_group_id_seq', - nextBlockStart: 10000, - blockSize: 100, - exhausted: false - ) - scorecardGroupIdSeq.save() - if (scorecardGroupIdSeq.hasErrors()) { - println scorecardGroupIdSeq.errors - } - - // insert id sequence for scorecard_question_id_seq - def scorecardQuestionIdSeq = new IDSequences( - name: 'scorecard_question_id_seq', - nextBlockStart: 10000, - blockSize: 100, - exhausted: false - ) - scorecardQuestionIdSeq.save() - if (scorecardQuestionIdSeq.hasErrors()) { - println scorecardQuestionIdSeq.errors - } - - // insert id sequence for scorecard_section_id_seq - def scorecardSectionIdSeq = new IDSequences( - name: 'scorecard_section_id_seq', - nextBlockStart: 10000, - blockSize: 100, - exhausted: false - ) - scorecardSectionIdSeq.save() - if (scorecardSectionIdSeq.hasErrors()) { - println scorecardSectionIdSeq.errors - } - break; - } - } - def destroy = { - } -} diff --git a/scorecard_tool/grails-app/conf/BuildConfig.groovy b/scorecard_tool/grails-app/conf/BuildConfig.groovy deleted file mode 100644 index 935f87fa5..000000000 --- a/scorecard_tool/grails-app/conf/BuildConfig.groovy +++ /dev/null @@ -1,47 +0,0 @@ -grails.project.class.dir = "target/classes" -grails.project.test.class.dir = "target/test-classes" -grails.project.test.reports.dir = "target/test-reports" -//grails.project.war.file = "target/${appName}-${appVersion}.war" -grails.project.dependency.resolution = { - // inherit Grails' default dependencies - inherits("global") { - // uncomment to disable ehcache - // excludes 'ehcache' - } - log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose' - repositories { - //grailsPlugins() - grailsHome() - grailsCentral() - - // uncomment the below to enable remote dependency resolution - // from public Maven repositories - //mavenLocal() - //mavenCentral() - mavenRepo "http://repo.grails.org/grails/plugins" - mavenRepo "http://repo.grails.org/grails/repo" - //mavenRepo "http://snapshots.repository.codehaus.org" - //mavenRepo "http://repository.codehaus.org" - //mavenRepo "http://download.java.net/maven/2/" - //mavenRepo "http://repository.jboss.com/maven2/" - } - dependencies { - // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg. - - // runtime 'mysql:mysql-connector-java:5.1.13' - } -} - -grails.war.resources = { stagingDir, args -> - delete { - fileset(dir: "${stagingDir}/WEB-INF/lib", includes: "jta-1.1.jar") - fileset(dir: "${stagingDir}/WEB-INF/lib", includes: "shared.jar") - fileset(dir: "${stagingDir}/WEB-INF/lib", includes: "tcwebcommon.jar") - fileset(dir: "${stagingDir}/WEB-INF/lib", includes: "security.jar") - fileset(dir: "${stagingDir}/WEB-INF/lib", includes: "base_exception.jar") - fileset(dir: "${stagingDir}/WEB-INF/lib", includes: "log4j-1.2.16.jar") - fileset(dir: "${stagingDir}/css", includes: "**/*") - fileset(dir: "${stagingDir}/js", includes: "**/*") - fileset(dir: "${stagingDir}/images", includes: "**/*") - } -} diff --git a/scorecard_tool/grails-app/conf/Config.groovy b/scorecard_tool/grails-app/conf/Config.groovy deleted file mode 100644 index 87651a864..000000000 --- a/scorecard_tool/grails-app/conf/Config.groovy +++ /dev/null @@ -1,92 +0,0 @@ -// locations to search for config files that get merged into the main config -// config files can either be Java properties files or ConfigSlurper scripts - -// grails.config.locations = [ "classpath:${appName}-config.properties", -// "classpath:${appName}-config.groovy", -// "file:${userHome}/.grails/${appName}-config.properties", -// "file:${userHome}/.grails/${appName}-config.groovy"] - -// if(System.properties["${appName}.config.location"]) { -// grails.config.locations << "file:" + System.properties["${appName}.config.location"] -// } - -grails.project.groupId = appName // change this to alter the default package name and Maven publishing destination -grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format -grails.mime.use.accept.header = false -grails.mime.types = [ html: ['text/html','application/xhtml+xml'], - xml: ['text/xml', 'application/xml'], - text: 'text/plain', - js: 'text/javascript', - rss: 'application/rss+xml', - atom: 'application/atom+xml', - css: 'text/css', - csv: 'text/csv', - all: '*/*', - json: ['application/json','text/json'], - form: 'application/x-www-form-urlencoded', - multipartForm: 'multipart/form-data' - ] - -// URL Mapping Cache Max Size, defaults to 5000 -//grails.urlmapping.cache.maxsize = 1000 - -// The default codec used to encode data with ${} -grails.views.default.codec = "none" // none, html, base64 -grails.views.gsp.encoding = "UTF-8" -grails.converters.encoding = "UTF-8" -// enable Sitemesh preprocessing of GSP pages -grails.views.gsp.sitemesh.preprocess = true -// scaffolding templates configuration -grails.scaffolding.templates.domainSuffix = 'Instance' - -// Set to false to use the new Grails 1.2 JSONBuilder in the render method -grails.json.legacy.builder = false -// enabled native2ascii conversion of i18n properties files -grails.enable.native2ascii = true -// whether to install the java.util.logging bridge for sl4j. Disable for AppEngine! -grails.logging.jul.usebridge = false -// packages to include in Spring bean scanning -grails.spring.bean.packages = [] -// the root of the JSON RESTful API -grails.'json-rest-api'.root = '/json' - -// set per-environment serverURL stem for creating absolute links -environments { - production { - grails.serverURL = "http://tc.cloud.topcoder.com/direct/${appName}" - } - development { - grails.serverURL = "http://localhost:8080/${appName}" - } - test { - grails.serverURL = "http://localhost:8080/${appName}" - } - -} - -// log4j configuration -log4j = { - // Example of changing the log pattern for the default console - // appender: - // - //appenders { - // console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n') - //} - - info 'com.topcoder.admin.scorecards.ScorecardController', - 'com.topcoder.scorecard.security' - - info 'org.codehaus.groovy.grails.web.servlet', // controllers - 'org.codehaus.groovy.grails.web.pages', // GSP - 'org.codehaus.groovy.grails.web.sitemesh', // layouts - 'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping - 'org.codehaus.groovy.grails.web.mapping', // URL mapping - 'org.codehaus.groovy.grails.commons', // core / classloading - 'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration - 'org.springframework', - 'org.hibernate', - 'net.sf.ehcache.hibernate' - - warn 'org.mortbay.log', - 'org.codehaus.groovy.grails.plugins' // plugins -} \ No newline at end of file diff --git a/scorecard_tool/grails-app/conf/DataSource.groovy b/scorecard_tool/grails-app/conf/DataSource.groovy deleted file mode 100644 index 5b2b3fe2c..000000000 --- a/scorecard_tool/grails-app/conf/DataSource.groovy +++ /dev/null @@ -1,41 +0,0 @@ -dataSource { - pooled = true - driverClassName = "org.hsqldb.jdbcDriver" - username = "sa" - password = "" -} -hibernate { - cache.use_second_level_cache = true - cache.use_query_cache = true - cache.provider_class = 'net.sf.ehcache.hibernate.EhCacheProvider' -} -// environment specific settings -environments { - development { - dataSource { - // url = "jdbc:hsqldb:mem:devDB" - // dbCreate = "create-drop" - - driverClassName = "com.informix.jdbc.IfxDriver" - url = "jdbc:informix-sqli://informixdb:2020/tcs_catalog:INFORMIXSERVER=informixoltp_tcp;DB_LOCALE=en_us.utf8" - username = "coder" - password = "Qn8TZxFFD77tzQwc" - } - } - test { - dataSource { - // Please DONOT change the data source for test environment because the review table in production database has - // many foreign keys - dbCreate = "create-drop" - url = "jdbc:hsqldb:mem:testDb" - } - } - production { - dataSource { - driverClassName = "com.informix.jdbc.IfxDriver" - url = "jdbc:informix-sqli://informixdb:2020/tcs_catalog:INFORMIXSERVER=informixoltp_tcp;DB_LOCALE=en_us.utf8" - username = "coder" - password = "Qn8TZxFFD77tzQwc" - } - } -} diff --git a/scorecard_tool/grails-app/conf/UrlMappings.groovy b/scorecard_tool/grails-app/conf/UrlMappings.groovy deleted file mode 100644 index 294769479..000000000 --- a/scorecard_tool/grails-app/conf/UrlMappings.groovy +++ /dev/null @@ -1,18 +0,0 @@ -class UrlMappings { - - static mappings = { - "/$controller/$action?/$id?"{ - constraints { - // apply constraints here - } - } - - name logoutAction: "/logout" { - controller = 'scorecard' - action = 'logout' - } - - "/"(view:"/index") - "500"(view:'/error') - } -} diff --git a/scorecard_tool/grails-app/conf/com/topcoder/admin/scorecards/ScorecardFilters.groovy b/scorecard_tool/grails-app/conf/com/topcoder/admin/scorecards/ScorecardFilters.groovy deleted file mode 100644 index b28a1fb92..000000000 --- a/scorecard_tool/grails-app/conf/com/topcoder/admin/scorecards/ScorecardFilters.groovy +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import com.topcoder.security.TCSubject -import com.topcoder.shared.security.User - -import com.topcoder.scorecard.security.AuthenticationHelper - -/** - *

    - * This class is the Filter for Scorecard domain. It will filter all incoming requests and make the - * necessary Authentication. - *

    - * - * @author pvmagacho - * @version 1.0 - * @since System Assembly - Direct TopCoder Scorecard Tool Integration - */ -class ScorecardFilters { - - def filters = { - login(controller:'*', action:'logout', invert:true) { - before = { - // check if DIRECT_USER attribute is set - TCSubject tcSubject = request.session['DIRECT_USER'] - if (!tcSubject) { - log.debug("Creating DIRECT_USER") - - // Get current user from cookie - User user = AuthenticationHelper.getCurrentUser(request, response) - if (!user) { - log.error "User is not authenticated. Redirecting to Login page." - redirect(url: '/direct/home.action') - return false - } - - // Get TCSubject instance for user - tcSubject = AuthenticationHelper.getTCSubject(user.id) - request.session['DIRECT_USER'] = tcSubject - } - - // current user have scorecard administrator role - Boolean hasDirectRole = request.session['SCORECARD_ROLE'] - if (hasDirectRole == null) { - hasDirectRole = AuthenticationHelper.isScorecardAdmin(tcSubject) - request.session['SCORECARD_ROLE'] = hasDirectRole - log.info "User " + tcSubject.userid + " has scorecard administrator role : " + hasDirectRole - } - - if (!hasDirectRole) { - log.error "User does not have scorecard admin role. Redirecting to Dashboard page." - redirect(url: '/direct/dashboardActive.action') - return false - } - - request.setAttribute('userId', tcSubject.userid) - } - } - } -} diff --git a/scorecard_tool/grails-app/conf/spring/resources.groovy b/scorecard_tool/grails-app/conf/spring/resources.groovy deleted file mode 100644 index fa950068b..000000000 --- a/scorecard_tool/grails-app/conf/spring/resources.groovy +++ /dev/null @@ -1,3 +0,0 @@ -// Place your Spring DSL code here -beans = { -} diff --git a/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ProjectCategoryController.groovy b/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ProjectCategoryController.groovy deleted file mode 100644 index 3b13be72b..000000000 --- a/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ProjectCategoryController.groovy +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -/** - * This class is the Controller for ProjectCategory domain. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class ProjectCategoryController { - def scaffold = true -} diff --git a/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ProjectTypeController.groovy b/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ProjectTypeController.groovy deleted file mode 100644 index 7d8681e25..000000000 --- a/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ProjectTypeController.groovy +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -/** - * This class is the Controller for ProjectType domain. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class ProjectTypeController { - def scaffold = true -} diff --git a/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardController.groovy b/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardController.groovy deleted file mode 100644 index 944d4a9d1..000000000 --- a/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardController.groovy +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import com.topcoder.scorecard.security.AuthenticationHelper - -import grails.converters.JSON -import grails.util.GrailsNameUtils -import net.sf.json.JSONObject - -import org.springframework.web.servlet.ModelAndView - -/** - * This class is the Controller for Scorecard domain. - * - *

    - * Version 1.1 change notes: - *

      - *
    1. Added ajaxContent, find closures to this controller.
    2. - *
    3. Updated show, edit, save closures.
    4. - *
    - *

    - * - *

    - * Version 1.2 change notes: - *

      - *
    1. Added logout closure. Will remove user Direct Cookie and invalidate current http session. - *
    - *

    - * - *

    - * Version 1.3 change notes: - *

      - *
    1. Added clone closure. - *
    - *

    - * @author TCSASSEMBER, pvmagacho, winstys - * @version 1.3 - */ -class ScorecardController { - - static allowedMethods = [save: "POST"] - - /** - * The message source instance which will be injected by Grails framework. - */ - def messageSource - - /** - * The ScorecardService instance which will be injected by Grails framework. - */ - def scorecardService - - def index = { - redirect(action: "find", params: params) - } - - /** - * The view to search scorecards. - */ - def find = { [] } - - /** - * Returns the scorecard data which will be used by AJAX call in UI. - */ - def ajaxContent = { - def scorecardInstance = Scorecard.get(params.id) - if (!scorecardInstance) { - flash.message = "${message(code: 'default.not.found.message', args: [message(code: 'scorecard.label', default: 'Scorecard'), params.id])}" - } - else { - [scorecardInstance: scorecardInstance] - } - } - - /** - * Search action to return the JSON result of matched scorecards. - */ - def search = { - // the json result - def result = [ success: true ] - try { - // the HQL query - def hql = new StringBuilder("from Scorecard where 1 = :one") - // the HQL query parameters - def positionalParams = [one : 1]; - - // sn - scorecard name - if (!GrailsNameUtils.isBlank(params.sn)) { - // socrecard name is case-insensitive - hql << " and lower(scorecardName) like :scorecardName" - positionalParams.scorecardName = '%' + params.sn.trim().toLowerCase() + '%' - } - - // convert string type list to long type list - def convertToLongList = {pname, lv -> - def resv = []; - lv.each {val -> - if (!val.isLong()) { - throw new IllegalArgumentException(pname + " must be numbers."); - } - resv.add val.toLong() - } - resv - } - - // cn - contest name, ignore for now - - // suf - scorecard usage frequency, ignore for now - - // spt - project type - if (params.spt) { - hql << " and projectCategory.projectType.id in (:projectTypeIds)" - positionalParams.projectTypeIds = convertToLongList('spt', params.list('spt')) - } - - // sc - category - if (params.sc) { - hql << " and projectCategory.id in (:projectCategoryIds)" - positionalParams.projectCategoryIds = convertToLongList('sc', params.list('sc')) - } - - // st - scorecard type - if (params.st) { - hql << " and scorecardType.id in (:scorecardTypeIds)" - positionalParams.scorecardTypeIds = convertToLongList('st', params.list('st')) - } - - // ss - status - if (params.ss) { - if (!params.ss.isLong()) { - throw new IllegalArgumentException("ss must be a number."); - } - hql << " and scorecardStatus.id=:scorecardStatus" - positionalParams.scorecardStatus = params.long('ss') - } - - // get the total count of the searching result - result.totalCount = Scorecard.findAll(hql.toString(), positionalParams).size - - // Pagination & Sort Params - def queryParams = [offset: 0L]; - if (params.offset) { - queryParams.offset = params.long('offset') - } - if (params.max) { - queryParams.max = params.long('max') - } - if (!GrailsNameUtils.isBlank(params.sortby)) { - // prevent sql injection - def sortby = params.sortby.trim().replaceAll("[^a-zA-Z\\.]", "") - def asc = params.boolean('asc') - hql << " order by " << sortby << (asc ? " asc" : " desc") - } - - result.data = Scorecard.findAll(hql.toString(), positionalParams, queryParams) - HashMap jsonMap = new HashMap(); - - // Set the editable of scorecards. - jsonMap.data = result.data.collect {scorecard -> - return [id: scorecard.id, scorecardName: scorecard.scorecardName, scorecardVersion: scorecard.scorecardVersion, scorecardType: scorecard.scorecardType.id, - projectCategory: scorecard.projectCategory.id, scorecardStatus:scorecard.scorecardStatus.id, editable: Util.checkScorecardEditable(scorecard)] - } - jsonMap.count = result.data.size - jsonMap.totalCount = result.totalCount; - jsonMap.success = true; - render text: jsonMap as JSON, contentType: 'application/json', status: 200 - } catch (Exception e) { - log.error(e) - result.success = false - result.message = e.getMessage() - render text: result as JSON, contentType: 'application/json', status: 200 - } - } - - /** - * The the entrie scorecard. - */ - def save = { - def result = [success: true] - try { - def scorecardData = JSONObject.fromObject(params.scorecard) - - result.id = scorecardService.saveScorecard(messageSource, scorecardData, request) - result.data = "${message(code: 'default.updated.message', args: [message(code: 'scorecard.label', default: 'Scorecard'), params.id])}" - } catch (Exception e) { - log.error(e) - result.success = false - result.message = e.getMessage() - } - - render text: result as JSON, contentType: 'application/json', status: 200 - } - - private getScorecard(id) { - def scorecardInstance = Scorecard.get(id) - if (!scorecardInstance) { - flash.message = "${message(code: 'default.not.found.message', args: [message(code: 'scorecard.label', default: 'Scorecard'), id])}" - redirect(action: "find") - } - else { - return scorecardInstance - } - } - - /** - * Render the scorecard. - */ - def show = { - return [scorecardInstance: getScorecard(params.id)] - } - - /** - * Edit the scorecard - */ - def edit = { - return [scorecardInstance: getScorecard(params.id)] - } - - /** - * Clone the scorecard - */ - def clone = { - return [scorecardInstance: getScorecard(params.id)] - } - - def create = { - - } - - /** - * Logout from scorecard tool. - */ - def logout = { - // Invalidate session - request.session.invalidate() - - AuthenticationHelper.logout(request, response) - - // Redirect to logout - log.info "session invalidated. Redirecting to login." - redirect(url: '/direct/home-redirect.jsp') - } -} - diff --git a/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardGroupController.groovy b/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardGroupController.groovy deleted file mode 100644 index c9d6c31b5..000000000 --- a/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardGroupController.groovy +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -/** - * This class is the Controller for ScorecardGroup domain. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class ScorecardGroupController { - def scaffold = true -} diff --git a/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardQuestionController.groovy b/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardQuestionController.groovy deleted file mode 100644 index 6e78de754..000000000 --- a/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardQuestionController.groovy +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -/** - * This class is the Controller for ScorecardQuestion domain. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class ScorecardQuestionController { - def scaffold = true -} diff --git a/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardQuestionTypeController.groovy b/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardQuestionTypeController.groovy deleted file mode 100644 index c0753b611..000000000 --- a/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardQuestionTypeController.groovy +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -/** - * This class is the Controller for ScorecardQuestionType domain. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class ScorecardQuestionTypeController { - def scaffold = true -} diff --git a/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardSectionController.groovy b/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardSectionController.groovy deleted file mode 100644 index 1181986fc..000000000 --- a/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardSectionController.groovy +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -/** - * This class is the Controller for ScorecardSection domain. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class ScorecardSectionController { - def scaffold = true -} diff --git a/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardStatusController.groovy b/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardStatusController.groovy deleted file mode 100644 index 9871c97db..000000000 --- a/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardStatusController.groovy +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -/** - * This class is the Controller for ScorecardStatus domain. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class ScorecardStatusController { - def scaffold = true -} diff --git a/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardTypeController.groovy b/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardTypeController.groovy deleted file mode 100644 index 01b57ebe9..000000000 --- a/scorecard_tool/grails-app/controllers/com/topcoder/admin/scorecards/ScorecardTypeController.groovy +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -/** - * This class is the Controller for ScorecardType domain. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class ScorecardTypeController { - def scaffold = true -} diff --git a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/IDSequences.groovy b/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/IDSequences.groovy deleted file mode 100644 index f2a00c120..000000000 --- a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/IDSequences.groovy +++ /dev/null @@ -1,49 +0,0 @@ -/* -* Copyright (C) 2011 TopCoder Inc., All Rights Reserved. -*/ -package com.topcoder.admin.scorecards - -/** -* This class is a Domain class for id_sequences table. It's just for test purpose. -* -* @author TCSASSEMBER -* @version 1.0 -*/ -class IDSequences { - /** - * Represents the name of the id sequence. - */ - String name - - /** - * Represents the next block start of the id sequence. - */ - BigDecimal nextBlockStart - - /** - * Represents the block size of the id sequence. - */ - BigDecimal blockSize - - /** - * A flag indicates whether the id sequence is exhausted. - */ - Boolean exhausted - - /** - * Define the validation rules - */ - static constraints = { - } - - /** - * Define the ORM mapping. - */ - static mapping = { - table 'id_sequences' - columns { - nextBlockStart column:'next_block_start' - blockSize column:'block_size' - } - } -} diff --git a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ProjectCategory.groovy b/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ProjectCategory.groovy deleted file mode 100644 index a9d6a9c76..000000000 --- a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ProjectCategory.groovy +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import java.util.Date - -/** - * This class is a Domain class for project_category_lu table. - * - *

    - * Version 1.1 change log: Add expose field to be used by JSON RESTful API. - *

    - * - * @author TCSASSEMBER - * @version 1.1 - */ -class ProjectCategory extends Audit { - /** - * The domain class name used by JSON RESTful API plugin. - * - * @since 1.1 - */ - static expose = 'project-category' - - /** - * Represents the name of the project category. - */ - String name - - /** - * Represents the description of the project category. - */ - String description - - /** - * A flag indicates whether to display this project category. - */ - Boolean display - - /** - * Represents the display order of the project category. - */ - Integer displayOrder - - /** - * Represents the project type reference. - */ - ProjectType projectType - - /** - * Define the validation rules - */ - static constraints = { - name(blank:false, maxSize:64, unique:'projectType') - description(blank:false, maxSize:254) - display(blank:false) - displayOrder(min:0) - projectType(blank:false) - createUser(blank:false, maxSize:64, display:false, editable:false) - modifyUser(blank:false, maxSize:64, display:false, editable:false) - } - - /** - * Define the ORM mapping. - */ - static mapping = { - table 'project_category_lu' - id column:'project_category_id' - id generator:'increment' - projectType cascade:'save-update' - columns { - dateCreated column:'create_date' - lastUpdated column:'modify_date' - projectType column:'project_type_id' - } - } - - /** - * Override the toString method to provide the meaningful name. - * - * @return the name of the project category - */ - String toString() { - name - } -} diff --git a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ProjectType.groovy b/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ProjectType.groovy deleted file mode 100644 index 2a89cae02..000000000 --- a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ProjectType.groovy +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import java.util.Date - -/** - * This class is a Domain class for project_type_lu table. - * - *

    - * Version 1.1 change log: Add expose field to be used by JSON RESTful API. - *

    - * - * @author TCSASSEMBER - * @version 1.1 - */ -class ProjectType extends Audit { - /** - * The domain class name used by JSON RESTful API plugin. - * - * @since 1.1 - */ - static expose = 'project-type' - - /** - * Represents the name of this project type. - */ - String name - - /** - * Represents the description of this project type. - */ - String description - - /** - * A flag indicates whether this project type is generic. - */ - Boolean isGeneric - - /** - * Define the ORM relations. - */ - static hasMany = [projectCategories:ProjectCategory] - - /** - * Define the validation rules - */ - static constraints = { - name(blank:false, unique:true, maxSize:64) - description(blank:false, maxSize:254) - isGeneric(blank:false) - projectCategories(blank:false) - createUser(blank:false, maxSize:64, display:false, editable:false) - modifyUser(blank:false, maxSize:64, display:false, editable:false) - } - - /** - * Define the ORM mapping. - */ - static mapping = { - table 'project_type_lu' - id column:'project_type_id' - id generator:'increment' - projectCategories cascade:'all-delete-orphan' - columns { - dateCreated column:'create_date' - lastUpdated column:'modify_date' - } - } - - /** - * Override the toString method to provide the meaningful name. - * - * @return the name of the project type - */ - String toString() { - name - } -} diff --git a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/Review.groovy b/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/Review.groovy deleted file mode 100644 index 2cb9d7fe6..000000000 --- a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/Review.groovy +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -/** - * This class is a Domain class for review table. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class Review { - /** - * Define the ORM relations. - */ - static belongsTo = [scorecard:Scorecard] - - /** - * Define the validation rules - */ - static constraints = { - } - - /** - * Define the ORM mapping. - */ - static mapping = { - table 'review' - id column:'review_id' - version false - autoTimestamp false - columns { scorecard:'scorecard_id' } - } -} diff --git a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/Scorecard.groovy b/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/Scorecard.groovy deleted file mode 100644 index 80098b5eb..000000000 --- a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/Scorecard.groovy +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - - -/** - * This class is a Domain class for scorecard table. - * - *

    - * Version 1.1 change log: Add expose field to be used by JSON RESTful API. - *

    - * - * @author TCSASSEMBER - * @version 1.1 - */ -class Scorecard extends Audit { - /** - * The domain class name used by JSON RESTful API plugin. - * - * @since 1.1 - */ - static expose = 'scorecard' - - static api = [ - excludedFields: ['beforeDelete', 'afterDelete', 'beforeUpdate', 'afterUpdate', 'checkScorecardEditableWithErrorMessage'], - list: { params -> Scorecard.list(params) }, - count: { params -> Scorecard.count() } - ] - - /** - * Represents the name of this score card - */ - String scorecardName - - /** - * Represents the version of this score card. - */ - String scorecardVersion - - /** - * Represents the minimum score of this score card. - */ - BigDecimal minimumScore - - /** - * Represents the maximum score of this score card. - */ - BigDecimal maximumScore - - /** - * Represents the scorecard type reference. - */ - ScorecardType scorecardType - - /** - * Represents the scoreacrd status reference. - */ - ScorecardStatus scorecardStatus - - /** - * Represents the project category reference. - */ - ProjectCategory projectCategory - - /** - * Define the ORM relations. - */ - static hasMany = [scorecardGroups:ScorecardGroup] - - /** - * Define the validation rules - */ - static constraints = { - scorecardName(blank:false, maxSize:64, unique:'scorecardVersion') - scorecardVersion(blank:false, matches:"[0-9]+\\.[0-9]+\\.[0-9]+", maxSize:16) - minimumScore(min:0.0, max:100.0, validator:{ val, obj -> - val < obj.properties['maximumScore'] - }) - maximumScore(min:0.0, max:100.0) - scorecardType(blank:false) - scorecardStatus(blank:false) - projectCategory(blank:false) - scorecardGroups(blank:false, validator:{val, obj -> - // checks whether the sum weight of groups is 100.0 - // TODO: we allow the sum weight of groups be 0 currently, will be fixed later - val == null || val.size() == 0 || val.inject(0) { result, i -> result += i.weight } == 100.0 - }) - createUser(blank:false, maxSize:64, display:false, editable:false) - modifyUser(blank:false, maxSize:64, display:false, editable:false) - } - - /** - * Define the ORM mapping. - */ - static mapping = { - table 'scorecard' - id column:'scorecard_id' - scorecardGroups cascade:'all-delete-orphan', sort: 'sort', order: 'asc' - id generator:'com.topcoder.database.utilities.TopCoderTableHiLoGenerator', params:[seq_name:'scorecard_id_seq'] - version 'version_number' - columns { - scorecardName column:'name' - scorecardVersion column:'version' - minimumScore column:'min_score' - maximumScore column:'max_score' - dateCreated column:'create_date' - lastUpdated column:'modify_date' - scorecardType column:'scorecard_type_id' - scorecardStatus column:'scorecard_status_id' - projectCategory column:'project_category_id' - } - } - - /** - * Override the toString method to provide the meaningful name. - * - * @return the name of the score card - */ - String toString() { - scorecardName - } - - /** - * Checks whether the scorecard is editable, it not, error message will be added. - */ - def checkScorecardEditableWithErrorMessage = { - if (!Util.checkScorecardEditable(this)) { - this.errors.reject('com.topcoder.admin.scorecards.scorecardInUsed') - } - } - - /** - * This closure will be executed before deleting a record. We will check whether the scorecard is editable. - */ - def beforeDelete = { Util.checkScorecardEditable(this) } - - /** - * This closure will be executed after deleting a record. We will check whether the scorecard is editable, if not, - * error message will be added. - */ - def afterDelete = checkScorecardEditableWithErrorMessage - - /** - * This closure will be executed before updating the record. We will check whether the scorecard is editable. - */ - def beforeUpdate = {Util.checkScorecardEditable(this) } - - /** - * This closure will be executed before updating the record. We will check whether the scorecard is editable, if not, - * error message will be added. - */ - def afterUpdate = checkScorecardEditableWithErrorMessage -} diff --git a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ScorecardGroup.groovy b/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ScorecardGroup.groovy deleted file mode 100644 index e37108952..000000000 --- a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ScorecardGroup.groovy +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import java.util.Date - -/** - * This class is a Domain class for scorecard_group table. - * - *

    - * Version 1.1 change log: Add expose field to be used by JSON RESTful API. - *

    - * - * @author TCSASSEMBER - * @version 1.1 - */ -class ScorecardGroup extends Audit { - /** - * The domain class name used by JSON RESTful API plugin. - * - * @since 1.1 - */ - static expose = 'scorecard-group' - - /** - * Represents the name of this score card group. - */ - String groupName - - /** - * Represents the weight of this score card group. - */ - BigDecimal weight - - /** - * Represents the sort order of this score card group. - */ - Integer sort - - /** - * Define the ORM relations. - */ - static belongsTo = [scorecard:Scorecard] - static hasMany = [scorecardSections:ScorecardSection] - - /** - * Define the validation rules - */ - static constraints = { - groupName(blank:false, maxSize:64, unique:'scorecard') - weight(blank:false, validator:{it > 0.0 && it <= 100.0}) - sort(blank:false, min:0) - scorecard(blank:false, validator:{ - // checks whether the scorecard is editable - Util.checkScorecardEditable(it) - }) - scorecardSections(blank:false, validator:{val, obj -> - // checks whether the sum weight of sections is 100.0 - // TODO: we allow the sum weight of sections be 0 currently, will be fixed later - val == null || val.size() == 0 || val.inject(0) { result, i -> result += i.weight } == 100.0 - }) - createUser(blank:false, maxSize:64, display:false, editable:false) - modifyUser(blank:false, maxSize:64, display:false, editable:false) - } - - /** - * Define the ORM mapping. - */ - static mapping = { - table 'scorecard_group' - id column:'scorecard_group_id' - scorecardSections cascade:'all-delete-orphan', sort: 'sort', order: 'asc' - scorecard cascade:'save-update' - id generator:'com.topcoder.database.utilities.TopCoderTableHiLoGenerator', params:[seq_name:'scorecard_group_id_seq'] - columns { - groupName column:'name' - scorecard column:'scorecard_id' - dateCreated column:'create_date' - lastUpdated column:'modify_date' - } - } - - /** - * Override the toString method to provide the meaningful name. - * - * @return the name of the score card group - */ - String toString() { - "${scorecard.scorecardName} - ${groupName}" - } - - /** - * This closure will be executed before deleting a record. We will check whether the scorecard is editable. - */ - def beforeDelete = { - Util.checkScorecardEditable(this.scorecard) - } - - /** - * This closure will be executed after deleting a record. We will check whether the scorecard is editable, if not, - * error message will be added - */ - def afterDelete = { - if (!Util.checkScorecardEditable(this.scorecard)) { - this.errors.reject('com.topcoder.admin.scorecards.scorecardInUsed') - } - } -} diff --git a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ScorecardQuestion.groovy b/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ScorecardQuestion.groovy deleted file mode 100644 index 02db971e0..000000000 --- a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ScorecardQuestion.groovy +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import java.util.Date - -/** - * This class is a Domain class for scorecard_question table. - * - *

    - * Version 1.1 change log: Add expose field to be used by JSON RESTful API. - *

    - * - * @author TCSASSEMBER - * @version 1.1 - */ -class ScorecardQuestion extends Audit { - /** - * The domain class name used by JSON RESTful API plugin. - * - * @since 1.1 - */ - static expose = 'scorecard-question' - - /** - * Represents the description of this score question. - */ - String description - - /** - * Represents the guideline of this score card question. - */ - String guideline - - /** - * Represents the weight of this score card question. - */ - BigDecimal weight - - /** - * Represents the sort order of this score card question. - */ - Integer sort - - /** - * A flag indicates whether we can upload document for this score card question. - */ - Boolean uploadDocument - - /** - * A flag indicates whether a upload document must be uploaded for this score card question. - */ - Boolean uploadDocumentRequired - - /** - * Represents the scorecard question type reference. - */ - ScorecardQuestionType questionType - - /** - * Define the ORM relations. - */ - static belongsTo = [scorecardSection:ScorecardSection] - - /** - * Define the validation rules - */ - static constraints = { - description(blank:false, maxSize:4096) - guideline(blank:false, maxSize:4096) - weight(blank:false, validator:{ - it > 0.0 && it <= 100.0 - }) - sort(blank:false, min:0) - uploadDocument(blank:false) - uploadDocumentRequired(blank:false) - questionType(blank:false) - scorecardSection(blank:false, validator:{ - // checks whether the scorecard is editable - Util.checkScorecardEditable(it.scorecardGroup.scorecard) - }) - createUser(blank:false, maxSize:64, display:false, editable:false) - modifyUser(blank:false, maxSize:64, display:false, editable:false) - } - - /** - * Define the ORM mapping. - */ - static mapping = { - table 'scorecard_question' - id column:'scorecard_question_id' - id generator:'com.topcoder.database.utilities.TopCoderTableHiLoGenerator', params:[seq_name:'scorecard_question_id_seq'] - scorecardSection cascade:'save-update' - columns { - dateCreated column:'create_date' - lastUpdated column:'modify_date' - scorecardSection column:'scorecard_section_id' - questionType column:'scorecard_question_type_id' - } - } - - /** - * Override the toString method to provide the meaningful name. - * - * @return the name of the score card question - */ - String toString() { - "Question ${id}" - } - - /** - * This closure will be executed before deleting a record. We will check whether the scorecard is editable. - */ - def beforeDelete = { - Util.checkScorecardEditable(this.scorecardSection.scorecardGroup.scorecard) - } - - /** - * This closure will be executed after deleting a record. We will check whether the scorecard is editable, if not, - * error message will be added - */ - def afterDelete = { - if (!Util.checkScorecardEditable(this.scorecardSection.scorecardGroup.scorecard)) { - this.errors.reject('com.topcoder.admin.scorecards.scorecardInUsed') - } - } -} diff --git a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ScorecardQuestionType.groovy b/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ScorecardQuestionType.groovy deleted file mode 100644 index 2f9e1a0ab..000000000 --- a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ScorecardQuestionType.groovy +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import java.util.Date - -/** - * This class is a Domain class for scorecard_question_type_lu table. - * - *

    - * Version 1.1 change log: Add expose field to be used by JSON RESTful API. - *

    - * - * @author TCSASSEMBER - * @version 1.1 - */ -class ScorecardQuestionType extends Audit { - /** - * The domain class name used by JSON RESTful API plugin. - * - * @since 1.1 - */ - static expose = 'scorecard-question-type' - - /** - * Represents the name of this score card question type. - */ - String name - - /** - * Represents the description of this score card question type. - */ - String description - - /** - * Define the validation rules - */ - static constraints = { - name(blank:false, unique:true, maxSize:64) - description(blank:false, maxSize:254) - createUser(blank:false, maxSize:64, display:false, editable:false) - modifyUser(blank:false, maxSize:64, display:false, editable:false) - } - - /** - * Define the ORM mapping. - */ - static mapping = { - table 'scorecard_question_type_lu' - id column:'scorecard_question_type_id' - id generator:'increment' - columns { - dateCreated column:'create_date' - lastUpdated column:'modify_date' - } - } - - /** - * Override the toString method to provide the meaningful name. - * - * @return the name of the score card question type - */ - String toString() { - name - } -} diff --git a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ScorecardSection.groovy b/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ScorecardSection.groovy deleted file mode 100644 index bd04fd05d..000000000 --- a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ScorecardSection.groovy +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import java.util.Date - -/** - * This class is a Domain class for scorecard_section table. - * - *

    - * Version 1.1 change log: Add expose field to be used by JSON RESTful API. - *

    - * - * @author TCSASSEMBER - * @version 1.1 - */ -class ScorecardSection extends Audit { - /** - * The domain class name used by JSON RESTful API plugin. - * - * @since 1.1 - */ - static expose = 'scorecard-section' - - /** - * Represents the name of this score card section. - */ - String sectionName - - /** - * Represents the weight of this score card section. - */ - BigDecimal weight - - /** - * Represents the sort order of this score card section. - */ - Integer sort - - /** - * Define the ORM relations. - */ - static belongsTo = [scorecardGroup:ScorecardGroup] - static hasMany = [scorecardQuestions:ScorecardQuestion] - - /** - * Define the validation rules - */ - static constraints = { - sectionName(blank:false, maxSize:1024) - weight(blank:false, validator:{it > 0.0 && it <= 100}) - sort(blank:false, min:0) - scorecardGroup(blank:false, validator:{ - // checks whether the scorecard is editable - Util.checkScorecardEditable(it.scorecard) - }) - scorecardQuestions(blank:false, validator:{val, obj -> - // checks whether the sum weight of questions is 100.0 - // TODO: we allow the sum weight of questions be 0 currently, will be fixed later - val == null || val.size() == 0 || val.inject(0) { result, i -> result += i.weight } == 100.0 - }) - createUser(blank:false, maxSize:64, display:false, editable:false) - modifyUser(blank:false, maxSize:64, display:false, editable:false) - } - - /** - * Define the ORM mapping. - */ - static mapping = { - table 'scorecard_section' - id column:'scorecard_section_id' - scorecardQuestions cascade:'all-delete-orphan', sort: 'sort', order: 'asc' - scorecardGroup cascade:'save-update' - id generator:'com.topcoder.database.utilities.TopCoderTableHiLoGenerator', params:[seq_name:'scorecard_section_id_seq'] - columns { - sectionName column:'name' - scorecardGroup column:'scorecard_group_id' - dateCreated column:'create_date' - lastUpdated column:'modify_date' - } - } - - /** - * Override the toString method to provide the meaningful name. - * - * @return the name of the score card section - */ - String toString() { - "${scorecardGroup.scorecard.scorecardName} - ${scorecardGroup.groupName} - ${sectionName}" - } - - /** - * This closure will be executed before deleting a record. We will check whether the scorecard is editable. - */ - def beforeDelete = { - Util.checkScorecardEditable(this.scorecardGroup.scorecard) - } - - /** - * This closure will be executed after deleting a record. We will check whether the scorecard is editable, if not, - * error message will be added - */ - def afterDelete = { - if (!Util.checkScorecardEditable(this.scorecardGroup.scorecard)) { - this.errors.reject('com.topcoder.admin.scorecards.scorecardInUsed') - } - } -} diff --git a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ScorecardStatus.groovy b/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ScorecardStatus.groovy deleted file mode 100644 index c2f5a8415..000000000 --- a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ScorecardStatus.groovy +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import java.util.Date - -/** - * This class is a Domain class for scorecard_status_lu table. - * - *

    - * Version 1.1 change log: Add expose field to be used by JSON RESTful API. - *

    - * - * @author TCSASSEMBER - * @version 1.1 - */ -class ScorecardStatus extends Audit { - /** - * The domain class name used by JSON RESTful API plugin. - * - * @since 1.1 - */ - static expose = 'scorecard-status' - - /** - * Represents the name of this score card status. - */ - String name - - /** - * Represents the description of this score card staus. - */ - String description - - /** - * Define the validation rules - */ - static constraints = { - name(blank:false, unique:true, maxSize:64) - description(blank:false, maxSize:254) - createUser(blank:false, maxSize:64, display:false, editable:false) - modifyUser(blank:false, maxSize:64, display:false, editable:false) - } - - /** - * Define the ORM mapping. - */ - static mapping = { - table 'scorecard_status_lu' - id column:'scorecard_status_id' - id generator:'increment' - columns { - dateCreated column:'create_date' - lastUpdated column:'modify_date' - } - } - - /** - * Override the toString method to provide the meaningful name. - * - * @return the name of the scorecard status - */ - String toString() { - name - } -} diff --git a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ScorecardType.groovy b/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ScorecardType.groovy deleted file mode 100644 index 8abd31e9e..000000000 --- a/scorecard_tool/grails-app/domain/com/topcoder/admin/scorecards/ScorecardType.groovy +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import java.util.Date - -/** - * This class is a Domain class for scorecard_type_lu table. - * - *

    - * Version 1.1 change log: Add expose field to be used by JSON RESTful API. - *

    - * - * @author TCSASSEMBER - * @version 1.1 - */ -class ScorecardType extends Audit { - /** - * The domain class name used by JSON RESTful API plugin. - * - * @since 1.1 - */ - static expose = 'scorecard-type' - - /** - * Represents the name of this score card type. - */ - String name - - /** - * Represents the description of this score card type. - */ - String description - - /** - * Define the validation rules - */ - static constraints = { - name(blank:false, unique:true, maxSize:64) - description(blank:false, maxSize:254) - createUser(blank:false, maxSize:64, display:false, editable:false) - modifyUser(blank:false, maxSize:64, display:false, editable:false) - } - - /** - * Define the ORM mapping. - */ - static mapping = { - table 'scorecard_type_lu' - id column:'scorecard_type_id' - id generator:'increment' - columns { - dateCreated column:'create_date' - lastUpdated column:'modify_date' - } - } - - /** - * Override the toString method to provide the meaningful name. - * - * @return the name of the score card type - */ - String toString() { - name - } -} diff --git a/scorecard_tool/grails-app/i18n/messages.properties b/scorecard_tool/grails-app/i18n/messages.properties deleted file mode 100644 index c45c2e43b..000000000 --- a/scorecard_tool/grails-app/i18n/messages.properties +++ /dev/null @@ -1,77 +0,0 @@ -default.doesnt.match.message=Property [{0}] of class [{1}] with value [{2}] does not match the required pattern [{3}] -default.invalid.url.message=Property [{0}] of class [{1}] with value [{2}] is not a valid URL -default.invalid.creditCard.message=Property [{0}] of class [{1}] with value [{2}] is not a valid credit card number -default.invalid.email.message=Property [{0}] of class [{1}] with value [{2}] is not a valid e-mail address -default.invalid.range.message=Property [{0}] of class [{1}] with value [{2}] does not fall within the valid range from [{3}] to [{4}] -default.invalid.size.message=Property [{0}] of class [{1}] with value [{2}] does not fall within the valid size range from [{3}] to [{4}] -default.invalid.max.message=Property [{0}] of class [{1}] with value [{2}] exceeds maximum value [{3}] -default.invalid.min.message=Property [{0}] of class [{1}] with value [{2}] is less than minimum value [{3}] -default.invalid.max.size.message=Property [{0}] of class [{1}] with value [{2}] exceeds the maximum size of [{3}] -default.invalid.min.size.message=Property [{0}] of class [{1}] with value [{2}] is less than the minimum size of [{3}] -default.invalid.validator.message=Property [{0}] of class [{1}] with value [{2}] does not pass custom validation -default.not.inlist.message=Property [{0}] of class [{1}] with value [{2}] is not contained within the list [{3}] -default.blank.message=Property [{0}] of class [{1}] cannot be blank -default.not.equal.message=Property [{0}] of class [{1}] with value [{2}] cannot equal [{3}] -default.null.message=Property [{0}] of class [{1}] cannot be null -default.not.unique.message=Property [{0}] of class [{1}] with value [{2}] must be unique - -default.paginate.prev=Previous -default.paginate.next=Next -default.boolean.true=True -default.boolean.false=False -default.date.format=yyyy-MM-dd HH:mm:ss z -default.number.format=0 - -default.created.message={0} {1} created -default.updated.message={0} {1} updated -default.deleted.message={0} {1} deleted -default.not.deleted.message={0} {1} could not be deleted -default.not.found.message={0} not found with id {1} -default.optimistic.locking.failure=Another user has updated this {0} while you were editing - -default.home.label=Home -default.list.label={0} List -default.add.label=Add {0} -default.new.label=New {0} -default.create.label=Create {0} -default.show.label=Show {0} -default.edit.label=Edit {0} - -default.button.create.label=Create -default.button.edit.label=Edit -default.button.update.label=Update -default.button.delete.label=Delete -default.button.delete.confirm.message=Are you sure? - -# Data binding errors. Use "typeMismatch.$className.$propertyName to customize (eg typeMismatch.Book.author) -typeMismatch.java.net.URL=Property {0} must be a valid URL -typeMismatch.java.net.URI=Property {0} must be a valid URI -typeMismatch.java.util.Date=Property {0} must be a valid Date -typeMismatch.java.lang.Double=Property {0} must be a valid number -typeMismatch.java.lang.Integer=Property {0} must be a valid number -typeMismatch.java.lang.Long=Property {0} must be a valid number -typeMismatch.java.lang.Short=Property {0} must be a valid number -typeMismatch.java.math.BigDecimal=Property {0} must be a valid number -typeMismatch.java.math.BigInteger=Property {0} must be a valid number - -com.topcoder.admin.scorecards.ProjectCategory.name.unique=The project category name under this project type must be unique -com.topcoder.admin.scorecards.Scorecard.scorecardName.unique=The scorecard name and scorecard version must be unique -com.topcoder.admin.scorecards.ScorecardGroup.groupName.unique=The group name under this scorecard must be unique - -# Custom validation errors -com.topcoder.admin.scorecards.Scorecard.minimumScore.validator.invalid=The minimum score must be less than the maximum score -com.topcoder.admin.scorecards.Scorecard.scorecardGroups.validator.invalid=The sum weight of scorecard groups is not 100.0 -com.topcoder.admin.scorecards.Scorecard.scorecardVersion.matches.invalid=You are trying to change scorecard version to [{2}], which violates scorecard version pattern - Major.Minor.Revision ([0-9].[0-9].[0-9]). - -com.topcoder.admin.scorecards.ScorecardGroup.weight.validator.invalid=The weight must be greater than 0 and less or equal to 100 -com.topcoder.admin.scorecards.ScorecardGroup.scorecard.validator.invalid=The scorecard is not editable because the scorecard is in used -com.topcoder.admin.scorecards.ScorecardGroup.scorecardSections.validator.invalid=The sum weight of scorecard sections is not 100.0 - -com.topcoder.admin.scorecards.ScorecardSection.weight.validator.invalid=The weight must be greater than 0 and less or equal to 100 -com.topcoder.admin.scorecards.ScorecardSection.scorecardGroup.validator.invalid=The scorecard is not editable because the scorecard is in used -com.topcoder.admin.scorecards.ScorecardSection.scorecardQuestions.validator.invalid=The sum weight of scorecard questions is not 100.0 - -com.topcoder.admin.scorecards.ScorecardQuestion.weight.validator.invalid=The weight must be greater than 0 and less or equal to 100 -com.topcoder.admin.scorecards.ScorecardQuestion.scorecardSection.validator.invalid=The scorecard is not editable because the scorecard is in used - -com.topcoder.admin.scorecards.scorecardInUsed=The scorecard is not editable because the scorecard is in used \ No newline at end of file diff --git a/scorecard_tool/grails-app/i18n/messages_da.properties b/scorecard_tool/grails-app/i18n/messages_da.properties deleted file mode 100644 index fe680ae88..000000000 --- a/scorecard_tool/grails-app/i18n/messages_da.properties +++ /dev/null @@ -1,56 +0,0 @@ -default.doesnt.match.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] overholder ikke mønsteret [{3}] -default.invalid.url.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] er ikke en gyldig URL -default.invalid.creditCard.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] er ikke et gyldigt kreditkortnummer -default.invalid.email.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] er ikke en gyldig e-mail adresse -default.invalid.range.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] ligger ikke inden for intervallet fra [{3}] til [{4}] -default.invalid.size.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] ligger ikke inden for størrelsen fra [{3}] til [{4}] -default.invalid.max.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] overstiger den maksimale værdi [{3}] -default.invalid.min.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] er under den minimale værdi [{3}] -default.invalid.max.size.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] overstiger den maksimale størrelse på [{3}] -default.invalid.min.size.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] er under den minimale størrelse på [{3}] -default.invalid.validator.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] overholder ikke den brugerdefinerede validering -default.not.inlist.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] findes ikke i listen [{3}] -default.blank.message=Feltet [{0}] i klassen [{1}] kan ikke være tom -default.not.equal.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] må ikke være [{3}] -default.null.message=Feltet [{0}] i klassen [{1}] kan ikke være null -default.not.unique.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] skal være unik - -default.paginate.prev=Forrige -default.paginate.next=Næste -default.boolean.true=Sand -default.boolean.false=Falsk -default.date.format=yyyy-MM-dd HH:mm:ss z -default.number.format=0 - -default.created.message={0} {1} oprettet -default.updated.message={0} {1} opdateret -default.deleted.message={0} {1} slettet -default.not.deleted.message={0} {1} kunne ikke slettes -default.not.found.message={0} med id {1} er ikke fundet -default.optimistic.locking.failure=En anden bruger har opdateret denne {0} imens du har lavet rettelser - -default.home.label=Hjem -default.list.label={0} Liste -default.add.label=Tilføj {0} -default.new.label=Ny {0} -default.create.label=Opret {0} -default.show.label=Vis {0} -default.edit.label=Ret {0} - -default.button.create.label=Opret -default.button.edit.label=Ret -default.button.update.label=Opdater -default.button.delete.label=Slet -default.button.delete.confirm.message=Er du sikker? - -# Databindingsfejl. Brug "typeMismatch.$className.$propertyName for at passe til en given klasse (f.eks typeMismatch.Book.author) -typeMismatch.java.net.URL=Feltet {0} skal være en valid URL -typeMismatch.java.net.URI=Feltet {0} skal være en valid URI -typeMismatch.java.util.Date=Feltet {0} skal være en valid Dato -typeMismatch.java.lang.Double=Feltet {0} skal være et valid tal -typeMismatch.java.lang.Integer=Feltet {0} skal være et valid tal -typeMismatch.java.lang.Long=Feltet {0} skal være et valid tal -typeMismatch.java.lang.Short=Feltet {0} skal være et valid tal -typeMismatch.java.math.BigDecimal=Feltet {0} skal være et valid tal -typeMismatch.java.math.BigInteger=Feltet {0} skal være et valid tal - diff --git a/scorecard_tool/grails-app/i18n/messages_de.properties b/scorecard_tool/grails-app/i18n/messages_de.properties deleted file mode 100644 index 173d48948..000000000 --- a/scorecard_tool/grails-app/i18n/messages_de.properties +++ /dev/null @@ -1,55 +0,0 @@ -default.doesnt.match.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] entspricht nicht dem vorgegebenen Muster [{3}] -default.invalid.url.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] ist keine gültige URL -default.invalid.creditCard.message=Das Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] ist keine gültige Kreditkartennummer -default.invalid.email.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] ist keine gültige E-Mail Adresse -default.invalid.range.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] ist nicht im Wertebereich von [{3}] bis [{4}] -default.invalid.size.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] ist nicht im Wertebereich von [{3}] bis [{4}] -default.invalid.max.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] ist größer als der Höchstwert von [{3}] -default.invalid.min.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] ist kleiner als der Mindestwert von [{3}] -default.invalid.max.size.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] übersteigt den Höchstwert von [{3}] -default.invalid.min.size.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] unterschreitet den Mindestwert von [{3}] -default.invalid.validator.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] ist ungültig -default.not.inlist.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] ist nicht in der Liste [{3}] enthalten. -default.blank.message=Die Eigenschaft [{0}] des Typs [{1}] darf nicht leer sein -default.not.equal.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] darf nicht gleich [{3}] sein -default.null.message=Die Eigenschaft [{0}] des Typs [{1}] darf nicht null sein -default.not.unique.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] darf nur einmal vorkommen - -default.paginate.prev=Vorherige -default.paginate.next=Nächste -default.boolean.true=Wahr -default.boolean.false=Falsch -default.date.format=dd.MM.yyyy HH:mm:ss z -default.number.format=0 - -default.created.message={0} {1} wurde angelegt -default.updated.message={0} {1} wurde geändert -default.deleted.message={0} {1} wurde gelöscht -default.not.deleted.message={0} {1} konnte nicht gelöscht werden -default.not.found.message={0} mit der id {1} wurde nicht gefunden -default.optimistic.locking.failure=Ein anderer Benutzer hat das {0} Object geändert während Sie es bearbeitet haben - -default.home.label=Home -default.list.label={0} Liste -default.add.label={0} hinzufügen -default.new.label={0} anlegen -default.create.label={0} anlegen -default.show.label={0} anzeigen -default.edit.label={0} bearbeiten - -default.button.create.label=Anlegen -default.button.edit.label=Bearbeiten -default.button.update.label=Aktualisieren -default.button.delete.label=Löschen -default.button.delete.confirm.message=Sind Sie sicher? - -# Data binding errors. Use "typeMismatch.$className.$propertyName to customize (eg typeMismatch.Book.author) -typeMismatch.java.net.URL=Die Eigenschaft {0} muss eine gültige URL sein -typeMismatch.java.net.URI=Die Eigenschaft {0} muss eine gültige URI sein -typeMismatch.java.util.Date=Die Eigenschaft {0} muss ein gültiges Datum sein -typeMismatch.java.lang.Double=Die Eigenschaft {0} muss eine gültige Zahl sein -typeMismatch.java.lang.Integer=Die Eigenschaft {0} muss eine gültige Zahl sein -typeMismatch.java.lang.Long=Die Eigenschaft {0} muss eine gültige Zahl sein -typeMismatch.java.lang.Short=Die Eigenschaft {0} muss eine gültige Zahl sein -typeMismatch.java.math.BigDecimal=Die Eigenschaft {0} muss eine gültige Zahl sein -typeMismatch.java.math.BigInteger=Die Eigenschaft {0} muss eine gültige Zahl sein \ No newline at end of file diff --git a/scorecard_tool/grails-app/i18n/messages_es.properties b/scorecard_tool/grails-app/i18n/messages_es.properties deleted file mode 100644 index 6295b7754..000000000 --- a/scorecard_tool/grails-app/i18n/messages_es.properties +++ /dev/null @@ -1,30 +0,0 @@ -default.doesnt.match.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] no corresponde al patrón [{3}] -default.invalid.url.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] no es una URL válida -default.invalid.creditCard.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] no es un número de tarjeta de crédito válida -default.invalid.email.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] no es una dirección de correo electrónico válida -default.invalid.range.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] no entra en el rango válido de [{3}] a [{4}] -default.invalid.size.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] no entra en el tamaño válido de [{3}] a [{4}] -default.invalid.max.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] excede el valor máximo [{3}] -default.invalid.min.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] es menos que el valor mínimo [{3}] -default.invalid.max.size.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] excede el tamaño máximo de [{3}] -default.invalid.min.size.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] es menor que el tamaño mínimo de [{3}] -default.invalid.validator.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] no es válido -default.not.inlist.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] no esta contenido dentro de la lista [{3}] -default.blank.message=La propiedad [{0}] de la clase [{1}] no puede ser vacía -default.not.equal.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] no puede igualar a [{3}] -default.null.message=La propiedad [{0}] de la clase [{1}] no puede ser nulo -default.not.unique.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] debe ser única - -default.paginate.prev=Anterior -default.paginate.next=Siguiente - -# Data binding errors. Use "typeMismatch.$className.$propertyName to customize (eg typeMismatch.Book.author) -typeMismatch.java.net.URL=La propiedad {0} debe ser una URL válida -typeMismatch.java.net.URI=La propiedad {0} debe ser una URI válida -typeMismatch.java.util.Date=La propiedad {0} debe ser una fecha válida -typeMismatch.java.lang.Double=La propiedad {0} debe ser un número válido -typeMismatch.java.lang.Integer=La propiedad {0} debe ser un número válido -typeMismatch.java.lang.Long=La propiedad {0} debe ser un número válido -typeMismatch.java.lang.Short=La propiedad {0} debe ser un número válido -typeMismatch.java.math.BigDecimal=La propiedad {0} debe ser un número válido -typeMismatch.java.math.BigInteger=La propiedad {0} debe ser un número válido \ No newline at end of file diff --git a/scorecard_tool/grails-app/i18n/messages_fr.properties b/scorecard_tool/grails-app/i18n/messages_fr.properties deleted file mode 100644 index 557216414..000000000 --- a/scorecard_tool/grails-app/i18n/messages_fr.properties +++ /dev/null @@ -1,19 +0,0 @@ -default.doesnt.match.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] ne correspond pas au pattern [{3}] -default.invalid.url.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] n'est pas une URL valide -default.invalid.creditCard.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] n'est pas un numéro de carte de crédit valide -default.invalid.email.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] n'est pas une adresse e-mail valide -default.invalid.range.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] n'est pas contenue dans l'intervalle [{3}] à [{4}] -default.invalid.size.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] n'est pas contenue dans l'intervalle [{3}] à [{4}] -default.invalid.max.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] est supérieure à la valeur maximum [{3}] -default.invalid.min.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] est inférieure à la valeur minimum [{3}] -default.invalid.max.size.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] est supérieure à la valeur maximum [{3}] -default.invalid.min.size.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] est inférieure à la valeur minimum [{3}] -default.invalid.validator.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] n'est pas valide -default.not.inlist.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] ne fait pas partie de la liste [{3}] -default.blank.message=La propriété [{0}] de la classe [{1}] ne peut pas être vide -default.not.equal.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] ne peut pas être égale à [{3}] -default.null.message=La propriété [{0}] de la classe [{1}] ne peut pas être nulle -default.not.unique.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] doit être unique - -default.paginate.prev=Précédent -default.paginate.next=Suivant diff --git a/scorecard_tool/grails-app/i18n/messages_it.properties b/scorecard_tool/grails-app/i18n/messages_it.properties deleted file mode 100644 index 938b276cc..000000000 --- a/scorecard_tool/grails-app/i18n/messages_it.properties +++ /dev/null @@ -1,19 +0,0 @@ -default.doesnt.match.message=La proprietà [{0}] della classe [{1}] con valore [{2}] non corrisponde al pattern [{3}] -default.invalid.url.message=La proprietà [{0}] della classe [{1}] con valore [{2}] non è un URL valido -default.invalid.creditCard.message=La proprietà [{0}] della classe [{1}] con valore [{2}] non è un numero di carta di credito valido -default.invalid.email.message=La proprietà [{0}] della classe [{1}] con valore [{2}] non è un indirizzo email valido -default.invalid.range.message=La proprietà [{0}] della classe [{1}] con valore [{2}] non rientra nell'intervallo valido da [{3}] a [{4}] -default.invalid.size.message=La proprietà [{0}] della classe [{1}] con valore [{2}] non rientra nell'intervallo di dimensioni valide da [{3}] a [{4}] -default.invalid.max.message=La proprietà [{0}] della classe [{1}] con valore [{2}] è maggiore di [{3}] -default.invalid.min.message=La proprietà [{0}] della classe [{1}] con valore [{2}] è minore di [{3}] -default.invalid.max.size.message=La proprietà [{0}] della classe [{1}] con valore [{2}] è maggiore di [{3}] -default.invalid.min.size.message=La proprietà [{0}] della classe [{1}] con valore [{2}] è minore di [{3}] -default.invalid.validator.message=La proprietà [{0}] della classe [{1}] con valore [{2}] non è valida -default.not.inlist.message=La proprietà [{0}] della classe [{1}] con valore [{2}] non è contenuta nella lista [{3}] -default.blank.message=La proprietà [{0}] della classe [{1}] non può essere vuota -default.not.equal.message=La proprietà [{0}] della classe [{1}] con valore [{2}] non può essere uguale a [{3}] -default.null.message=La proprietà [{0}] della classe [{1}] non può essere null -default.not.unique.message=La proprietà [{0}] della classe [{1}] con valore [{2}] deve essere unica - -default.paginate.prev=Precedente -default.paginate.next=Successivo \ No newline at end of file diff --git a/scorecard_tool/grails-app/i18n/messages_ja.properties b/scorecard_tool/grails-app/i18n/messages_ja.properties deleted file mode 100644 index 3063bf9d3..000000000 --- a/scorecard_tool/grails-app/i18n/messages_ja.properties +++ /dev/null @@ -1,19 +0,0 @@ -default.doesnt.match.message=クラス[{1}]プロパティ[{0}]ã®å€¤[{2}]ã¯ã€[{3}]パターンã¨ä¸€è‡´ã—ã¦ã„ã¾ã›ã‚“。 -default.invalid.url.message=クラス[{1}]プロパティ[{0}]ã®å€¤[{2}]ã¯ã€URLã§ã¯ã‚りã¾ã›ã‚“。 -default.invalid.creditCard.message=クラス[{1}]プロパティ[{0}]ã®å€¤[{2}]ã¯ã€æ­£å½“ãªã‚¯ãƒ¬ã‚¸ãƒƒãƒˆã‚«ãƒ¼ãƒ‰ç•ªå·ã§ã¯ã‚りã¾ã›ã‚“。 -default.invalid.email.message=クラス[{1}]プロパティ[{0}]ã®å€¤[{2}]ã¯ã€ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã§ã¯ã‚りã¾ã›ã‚“。 -default.invalid.range.message=クラス[{1}]プロパティ[{0}]ã®å€¤[{2}]ã¯ã€[{3}]ã‹ã‚‰[{4}]範囲内を指定ã—ã¦ãã ã•ã„。 -default.invalid.size.message=クラス[{1}]プロパティ[{0}]ã®å€¤[{2}]ã¯ã€[{3}]ã‹ã‚‰[{4}]以内を指定ã—ã¦ãã ã•ã„。 -default.invalid.max.message=クラス[{1}]プロパティ[{0}]ã®å€¤[{2}]ã¯ã€æœ€å¤§å€¤[{3}]より大ãã„ã§ã™ã€‚ -default.invalid.min.message=クラス[{1}]プロパティ[{0}]ã®å€¤[{2}]ã¯ã€æœ€å°å€¤[{3}]よりå°ã•ã„ã§ã™ã€‚ -default.invalid.max.size.message=クラス[{1}]プロパティ[{0}]ã®å€¤[{2}]ã¯ã€æœ€å¤§å€¤[{3}]より大ãã„ã§ã™ã€‚ -default.invalid.min.size.message=クラス[{1}]プロパティ[{0}]ã®å€¤[{2}]ã¯ã€æœ€å°å€¤[{3}]よりå°ã•ã„ã§ã™ã€‚ -default.invalid.validator.message=クラス[{1}]プロパティ[{0}]ã®å€¤[{2}]ã¯ã€ã‚«ã‚¹ã‚¿ãƒ ãƒãƒªãƒ‡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’通éŽã§ãã¾ã›ã‚“。 -default.not.inlist.message=クラス[{1}]プロパティ[{0}]ã®å€¤[{2}]ã¯ã€[{3}]リスト内ã«å­˜åœ¨ã—ã¾ã›ã‚“。 -default.blank.message=[{1}]クラスã®ãƒ—ロパティ[{0}]ã®ç©ºç™½ã¯è¨±å¯ã•れã¾ã›ã‚“。 -default.not.equal.message=クラス[{1}]プロパティ[{0}]ã®å€¤[{2}]ã¯ã€[{3}]ã¨åŒç­‰ã§ã¯ã‚りã¾ã›ã‚“。 -default.null.message=[{1}]クラスã®ãƒ—ロパティ[{0}]ã«nullã¯è¨±å¯ã•れã¾ã›ã‚“。 -default.not.unique.message=クラス[{1}]プロパティ[{0}]ã®å€¤[{2}]ã¯æ—¢ã«ä½¿ç”¨ã•れã¦ã„ã¾ã™ã€‚ - -default.paginate.prev=戻る -default.paginate.next=次㸠diff --git a/scorecard_tool/grails-app/i18n/messages_nl.properties b/scorecard_tool/grails-app/i18n/messages_nl.properties deleted file mode 100644 index cd5cc94ee..000000000 --- a/scorecard_tool/grails-app/i18n/messages_nl.properties +++ /dev/null @@ -1,55 +0,0 @@ -default.doesnt.match.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] komt niet overeen met het vereiste patroon [{3}] -default.invalid.url.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] is geen geldige URL -default.invalid.creditCard.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] is geen geldig credit card nummer -default.invalid.email.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] is geen geldig e-mailadres -default.invalid.range.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] valt niet in de geldige waardenreeks van [{3}] tot [{4}] -default.invalid.size.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] valt niet in de geldige grootte van [{3}] tot [{4}] -default.invalid.max.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] overschrijdt de maximumwaarde [{3}] -default.invalid.min.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] is minder dan de minimumwaarde [{3}] -default.invalid.max.size.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] overschrijdt de maximumgrootte van [{3}] -default.invalid.min.size.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] is minder dan minimumgrootte van [{3}] -default.invalid.validator.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] is niet geldig -default.not.inlist.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] komt niet voor in de lijst [{3}] -default.blank.message=Attribuut [{0}] van entiteit [{1}] mag niet leeg zijn -default.not.equal.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] mag niet gelijk zijn aan [{3}] -default.null.message=Attribuut [{0}] van entiteit [{1}] mag niet leeg zijn -default.not.unique.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] moet uniek zijn - -default.paginate.prev=Vorige -default.paginate.next=Volgende -default.boolean.true=Ja -default.boolean.false=Nee -default.date.format=dd-MM-yyyy HH:mm:ss z -default.number.format=0 - -default.created.message={0} {1} ingevoerd -default.updated.message={0} {1} gewijzigd -default.deleted.message={0} {1} verwijderd -default.not.deleted.message={0} {1} kon niet worden verwijderd -default.not.found.message={0} met id {1} kon niet worden gevonden -default.optimistic.locking.failure=Een andere gebruiker heeft deze {0} al gewijzigd - -default.home.label=Home -default.list.label={0} Overzicht -default.add.label=Toevoegen {0} -default.new.label=Invoeren {0} -default.create.label=Invoeren {0} -default.show.label=Details {0} -default.edit.label=Wijzigen {0} - -default.button.create.label=Invoeren -default.button.edit.label=Wijzigen -default.button.update.label=Opslaan -default.button.delete.label=Verwijderen -default.button.delete.confirm.message=Weet je het zeker? - -# Data binding errors. Use "typeMismatch.$className.$propertyName to customize (eg typeMismatch.Book.author) -typeMismatch.java.net.URL=Attribuut {0} is geen geldige URL -typeMismatch.java.net.URI=Attribuut {0} is geen geldige URI -typeMismatch.java.util.Date=Attribuut {0} is geen geldige datum -typeMismatch.java.lang.Double=Attribuut {0} is geen geldig nummer -typeMismatch.java.lang.Integer=Attribuut {0} is geen geldig nummer -typeMismatch.java.lang.Long=Attribuut {0} is geen geldig nummer -typeMismatch.java.lang.Short=Attribuut {0} is geen geldig nummer -typeMismatch.java.math.BigDecimal=Attribuut {0} is geen geldig nummer -typeMismatch.java.math.BigInteger=Attribuut {0} is geen geldig nummer diff --git a/scorecard_tool/grails-app/i18n/messages_pt_BR.properties b/scorecard_tool/grails-app/i18n/messages_pt_BR.properties deleted file mode 100644 index 2a927072e..000000000 --- a/scorecard_tool/grails-app/i18n/messages_pt_BR.properties +++ /dev/null @@ -1,34 +0,0 @@ -# -# Translated by Lucas Teixeira - lucastex@gmail.com -# - -default.doesnt.match.message=O campo [{0}] da classe [{1}] com o valor [{2}] não atende ao padrão definido [{3}] -default.invalid.url.message=O campo [{0}] da classe [{1}] com o valor [{2}] não é uma URL válida -default.invalid.creditCard.message=O campo [{0}] da classe [{1}] com o valor [{2}] não é um número válido de cartão de crédito -default.invalid.email.message=O campo [{0}] da classe [{1}] com o valor [{2}] não é um endereço de email válido. -default.invalid.range.message=O campo [{0}] da classe [{1}] com o valor [{2}] não está entre a faixa de valores válida de [{3}] até [{4}] -default.invalid.size.message=O campo [{0}] da classe [{1}] com o valor [{2}] não está na faixa de tamanho válida de [{3}] até [{4}] -default.invalid.max.message=O campo [{0}] da classe [{1}] com o valor [{2}] ultrapass o valor máximo [{3}] -default.invalid.min.message=O campo [{0}] da classe [{1}] com o valor [{2}] não atinge o valor mínimo [{3}] -default.invalid.max.size.message=O campo [{0}] da classe [{1}] com o valor [{2}] ultrapassa o tamanho máximo de [{3}] -default.invalid.min.size.message=O campo [{0}] da classe [{1}] com o valor [{2}] não atinge o tamanho mínimo de [{3}] -default.invalid.validator.message=O campo [{0}] da classe [{1}] com o valor [{2}] não passou na validação -default.not.inlist.message=O campo [{0}] da classe [{1}] com o valor [{2}] não é um valor dentre os permitidos na lista [{3}] -default.blank.message=O campo [{0}] da classe [{1}] não pode ficar em branco -default.not.equal.message=O campo [{0}] da classe [{1}] com o valor [{2}] não pode ser igual a [{3}] -default.null.message=O campo [{0}] da classe [{1}] não pode ser vazia -default.not.unique.message=O campo [{0}] da classe [{1}] com o valor [{2}] deve ser único - -default.paginate.prev=Anterior -default.paginate.next=Próximo - -# Mensagens de erro em atribuição de valores. Use "typeMismatch.$className.$propertyName" para customizar (eg typeMismatch.Book.author) -typeMismatch.java.net.URL=O campo {0} deve ser uma URL válida. -typeMismatch.java.net.URI=O campo {0} deve ser uma URI válida. -typeMismatch.java.util.Date=O campo {0} deve ser uma data válida -typeMismatch.java.lang.Double=O campo {0} deve ser um número válido. -typeMismatch.java.lang.Integer=O campo {0} deve ser um número válido. -typeMismatch.java.lang.Long=O campo {0} deve ser um número válido. -typeMismatch.java.lang.Short=O campo {0} deve ser um número válido. -typeMismatch.java.math.BigDecimal=O campo {0} deve ser um número válido. -typeMismatch.java.math.BigInteger=O campo {0} deve ser um número válido. \ No newline at end of file diff --git a/scorecard_tool/grails-app/i18n/messages_pt_PT.properties b/scorecard_tool/grails-app/i18n/messages_pt_PT.properties deleted file mode 100644 index a38607067..000000000 --- a/scorecard_tool/grails-app/i18n/messages_pt_PT.properties +++ /dev/null @@ -1,34 +0,0 @@ -# -# translation by miguel.ping@gmail.com, based on pt_BR translation by Lucas Teixeira - lucastex@gmail.com -# - -default.doesnt.match.message=O campo [{0}] da classe [{1}] com o valor [{2}] não corresponde ao padrão definido [{3}] -default.invalid.url.message=O campo [{0}] da classe [{1}] com o valor [{2}] não é um URL válido -default.invalid.creditCard.message=O campo [{0}] da classe [{1}] com o valor [{2}] não é um número válido de cartão de crédito -default.invalid.email.message=O campo [{0}] da classe [{1}] com o valor [{2}] não é um endereÂço de email válido. -default.invalid.range.message=O campo [{0}] da classe [{1}] com o valor [{2}] não está dentro dos limites de valores válidos de [{3}] a [{4}] -default.invalid.size.message=O campo [{0}] da classe [{1}] com o valor [{2}] está fora dos limites de tamanho válido de [{3}] a [{4}] -default.invalid.max.message=O campo [{0}] da classe [{1}] com o valor [{2}] ultrapassa o valor máximo [{3}] -default.invalid.min.message=O campo [{0}] da classe [{1}] com o valor [{2}] não atinge o valor mínimo [{3}] -default.invalid.max.size.message=O campo [{0}] da classe [{1}] com o valor [{2}] ultrapassa o tamanho máximo de [{3}] -default.invalid.min.size.message=O campo [{0}] da classe [{1}] com o valor [{2}] não atinge o tamanho mínimo de [{3}] -default.invalid.validator.message=O campo [{0}] da classe [{1}] com o valor [{2}] não passou na validaÂção -default.not.inlist.message=O campo [{0}] da classe [{1}] com o valor [{2}] não se encontra nos valores permitidos da lista [{3}] -default.blank.message=O campo [{0}] da classe [{1}] não pode ser vazio -default.not.equal.message=O campo [{0}] da classe [{1}] com o valor [{2}] não pode ser igual a [{3}] -default.null.message=O campo [{0}] da classe [{1}] não pode ser vazio -default.not.unique.message=O campo [{0}] da classe [{1}] com o valor [{2}] deve ser único - -default.paginate.prev=Anterior -default.paginate.next=Próximo - -# Mensagens de erro em atribuiÂção de valores. Use "typeMismatch.$className.$propertyName" para personalizar(eg typeMismatch.Book.author) -typeMismatch.java.net.URL=O campo {0} deve ser um URL válido. -typeMismatch.java.net.URI=O campo {0} deve ser um URI válido. -typeMismatch.java.util.Date=O campo {0} deve ser uma data válida -typeMismatch.java.lang.Double=O campo {0} deve ser um número válido. -typeMismatch.java.lang.Integer=O campo {0} deve ser um número válido. -typeMismatch.java.lang.Long=O campo {0} deve ser um número valido. -typeMismatch.java.lang.Short=O campo {0} deve ser um número válido. -typeMismatch.java.math.BigDecimal=O campo {0} deve ser um número válido. -typeMismatch.java.math.BigInteger=O campo {0} deve ser um número válido. diff --git a/scorecard_tool/grails-app/i18n/messages_ru.properties b/scorecard_tool/grails-app/i18n/messages_ru.properties deleted file mode 100644 index 53a4bdc43..000000000 --- a/scorecard_tool/grails-app/i18n/messages_ru.properties +++ /dev/null @@ -1,31 +0,0 @@ -default.doesnt.match.message=Значение [{2}] Ð¿Ð¾Ð»Ñ [{0}] клаÑÑа [{1}] не ÑоответÑтвует образцу [{3}] -default.invalid.url.message=Значение [{2}] Ð¿Ð¾Ð»Ñ [{0}] клаÑÑа [{1}] не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимым URL-адреÑом -default.invalid.creditCard.message=Значение [{2}] Ð¿Ð¾Ð»Ñ [{0}] клаÑÑа [{1}] не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимым номером кредитной карты -default.invalid.email.message=Значение [{2}] Ð¿Ð¾Ð»Ñ [{0}] клаÑÑа [{1}] не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимым e-mail адреÑом -default.invalid.range.message=Значение [{2}] Ð¿Ð¾Ð»Ñ [{0}] клаÑÑа [{1}] не попадает в допуÑтимый интервал от [{3}] до [{4}] -default.invalid.size.message=Размер Ð¿Ð¾Ð»Ñ [{0}] клаÑÑа [{1}] (значение: [{2}]) не попадает в допуÑтимый интервал от [{3}] до [{4}] -default.invalid.max.message=Значение [{2}] Ð¿Ð¾Ð»Ñ [{0}] клаÑÑа [{1}] больше чем макÑимально допуÑтимое значение [{3}] -default.invalid.min.message=Значение [{2}] Ð¿Ð¾Ð»Ñ [{0}] клаÑÑа [{1}] меньше чем минимально допуÑтимое значение [{3}] -default.invalid.max.size.message=Размер Ð¿Ð¾Ð»Ñ [{0}] клаÑÑа [{1}] (значение: [{2}]) больше чем макÑимально допуÑтимый размер [{3}] -default.invalid.min.size.message=Размер Ð¿Ð¾Ð»Ñ [{0}] клаÑÑа [{1}] (значение: [{2}]) меньше чем минимально допуÑтимый размер [{3}] -default.invalid.validator.message=Значение [{2}] Ð¿Ð¾Ð»Ñ [{0}] клаÑÑа [{1}] не допуÑтимо -default.not.inlist.message=Значение [{2}] Ð¿Ð¾Ð»Ñ [{0}] клаÑÑа [{1}] не попадает в ÑпиÑок допуÑтимых значений [{3}] -default.blank.message=Поле [{0}] клаÑÑа [{1}] не может быть пуÑтым -default.not.equal.message=Значение [{2}] Ð¿Ð¾Ð»Ñ [{0}] клаÑÑа [{1}] не может быть равно [{3}] -default.null.message=Поле [{0}] клаÑÑа [{1}] не может иметь значение null -default.not.unique.message=Значение [{2}] Ð¿Ð¾Ð»Ñ [{0}] клаÑÑа [{1}] должно быть уникальным - -default.paginate.prev=ÐŸÑ€ÐµÐ´Ñ‹Ð´ÑƒÑˆÐ°Ñ Ñтраница -default.paginate.next=Ð¡Ð»ÐµÐ´ÑƒÑŽÑ‰Ð°Ñ Ñтраница - -# Ошибки при приÑвоении данных. Ð”Ð»Ñ Ñ‚Ð¾Ñ‡Ð½Ð¾Ð¹ наÑтройки Ð´Ð»Ñ Ð¿Ð¾Ð»ÐµÐ¹ клаÑÑов иÑпользуйте -# формат "typeMismatch.$className.$propertyName" (например, typeMismatch.Book.author) -typeMismatch.java.net.URL=Значение Ð¿Ð¾Ð»Ñ {0} не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимым URL -typeMismatch.java.net.URI=Значение Ð¿Ð¾Ð»Ñ {0} не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимым URI -typeMismatch.java.util.Date=Значение Ð¿Ð¾Ð»Ñ {0} не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимой датой -typeMismatch.java.lang.Double=Значение Ð¿Ð¾Ð»Ñ {0} не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимым чиÑлом -typeMismatch.java.lang.Integer=Значение Ð¿Ð¾Ð»Ñ {0} не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимым чиÑлом -typeMismatch.java.lang.Long=Значение Ð¿Ð¾Ð»Ñ {0} не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимым чиÑлом -typeMismatch.java.lang.Short=Значение Ð¿Ð¾Ð»Ñ {0} не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимым чиÑлом -typeMismatch.java.math.BigDecimal=Значение Ð¿Ð¾Ð»Ñ {0} не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимым чиÑлом -typeMismatch.java.math.BigInteger=Значение Ð¿Ð¾Ð»Ñ {0} не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимым чиÑлом diff --git a/scorecard_tool/grails-app/i18n/messages_th.properties b/scorecard_tool/grails-app/i18n/messages_th.properties deleted file mode 100644 index aadc41258..000000000 --- a/scorecard_tool/grails-app/i18n/messages_th.properties +++ /dev/null @@ -1,35 +0,0 @@ -default.doesnt.match.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] ไม่ถูà¸à¸•้องตามรูปà¹à¸šà¸šà¸—ี่à¸à¸³à¸«à¸™à¸”ไว้ใน [{3}] -default.invalid.url.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] ไม่ถูà¸à¸•้องตามรูปà¹à¸šà¸š URL -default.invalid.creditCard.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] ไม่ถูà¸à¸•้องตามรูปà¹à¸šà¸šà¸«à¸¡à¸²à¸¢à¹€à¸¥à¸‚บัตรเครดิต -default.invalid.email.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] ไม่ถูà¸à¸•้องตามรูปà¹à¸šà¸šà¸­à¸µà¹€à¸¡à¸¥à¹Œ -default.invalid.range.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] ไม่ได้มีค่าที่ถูà¸à¸•้องในช่วงจาภ[{3}] ถึง [{4}] -default.invalid.size.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] ไม่ได้มีขนาดที่ถูà¸à¸•้องในช่วงจาภ[{3}] ถึง [{4}] -default.invalid.max.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] มีค่าเà¸à¸´à¸”à¸à¸§à¹ˆà¸²à¸„่ามาà¸à¸ªà¸¸à¸” [{3}] -default.invalid.min.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] มีค่าน้อยà¸à¸§à¹ˆà¸²à¸„่าต่ำสุด [{3}] -default.invalid.max.size.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] มีขนาดเà¸à¸´à¸™à¸à¸§à¹ˆà¸²à¸‚นาดมาà¸à¸ªà¸¸à¸”ของ [{3}] -default.invalid.min.size.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] มีขนาดต่ำà¸à¸§à¹ˆà¸²à¸‚นาดต่ำสุดของ [{3}] -default.invalid.validator.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] ไม่ผ่านà¸à¸²à¸£à¸—วนสอบค่าที่ตั้งขึ้น -default.not.inlist.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] ไม่ได้อยู่ในรายà¸à¸²à¸£à¸•่อไปนี้ [{3}] -default.blank.message=คุณสมบัติ [{0}] ของคลาส [{1}] ไม่สามารถเป็นค่าว่างได้ -default.not.equal.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] ไม่สามารถเท่าà¸à¸±à¸š [{3}] ได้ -default.null.message=คุณสมบัติ [{0}] ของคลาส [{1}] ไม่สามารถเป็น null ได้ -default.not.unique.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] จะต้องไม่ซ้ำ (unique) - -default.paginate.prev=à¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸² -default.paginate.next=ถัดไป - -default.boolean.true=จริง -default.boolean.false=เท็จ -default.date.format=dd-MM-yyyy HH:mm:ss z -default.number.format=0 - -# Data binding errors. Use "typeMismatch.$className.$propertyName to customize (eg typeMismatch.Book.author) -typeMismatch.java.net.URL=คุณสมบัติ '{0}' จะต้องเป็นค่า URL ที่ถูà¸à¸•้อง -typeMismatch.java.net.URI=คุณสมบัติ '{0}' จะต้องเป็นค่า URI ที่ถูà¸à¸•้อง -typeMismatch.java.util.Date=คุณสมบัติ '{0}' จะต้องมีค่าเป็นวันที่ -typeMismatch.java.lang.Double=คุณสมบัติ '{0}' จะต้องมีค่าเป็นจำนวนประเภท Double -typeMismatch.java.lang.Integer=คุณสมบัติ '{0}' จะต้องมีค่าเป็นจำนวนประเภท Integer -typeMismatch.java.lang.Long=คุณสมบัติ '{0}' จะต้องมีค่าเป็นจำนวนประเภท Long -typeMismatch.java.lang.Short=คุณสมบัติ '{0}' จะต้องมีค่าเป็นจำนวนประเภท Short -typeMismatch.java.math.BigDecimal=คุณสมบัติ '{0}' จะต้องมีค่าเป็นจำนวนประเภท BigDecimal -typeMismatch.java.math.BigInteger=คุณสมบัติ '{0}' จะต้องมีค่าเป็นจำนวนประเภท BigInteger \ No newline at end of file diff --git a/scorecard_tool/grails-app/i18n/messages_zh_CN.properties b/scorecard_tool/grails-app/i18n/messages_zh_CN.properties deleted file mode 100644 index b89bc933b..000000000 --- a/scorecard_tool/grails-app/i18n/messages_zh_CN.properties +++ /dev/null @@ -1,18 +0,0 @@ -default.blank.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u4E0D\u80FD\u4E3A\u7A7A -default.doesnt.match.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u4E0E\u5B9A\u4E49\u7684\u6A21\u5F0F [{3}]\u4E0D\u5339\u914D -default.invalid.creditCard.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u4E0D\u662F\u4E00\u4E2A\u6709\u6548\u7684\u4FE1\u7528\u5361\u53F7 -default.invalid.email.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u4E0D\u662F\u4E00\u4E2A\u5408\u6CD5\u7684\u7535\u5B50\u90AE\u4EF6\u5730\u5740 -default.invalid.max.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u6BD4\u6700\u5927\u503C [{3}]\u8FD8\u5927 -default.invalid.max.size.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u7684\u5927\u5C0F\u6BD4\u6700\u5927\u503C [{3}]\u8FD8\u5927 -default.invalid.min.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u6BD4\u6700\u5C0F\u503C [{3}]\u8FD8\u5C0F -default.invalid.min.size.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u7684\u5927\u5C0F\u6BD4\u6700\u5C0F\u503C [{3}]\u8FD8\u5C0F -default.invalid.range.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u4E0D\u5728\u5408\u6CD5\u7684\u8303\u56F4\u5185( [{3}] \uFF5E [{4}] ) -default.invalid.size.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u7684\u5927\u5C0F\u4E0D\u5728\u5408\u6CD5\u7684\u8303\u56F4\u5185( [{3}] \uFF5E [{4}] ) -default.invalid.url.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u4E0D\u662F\u4E00\u4E2A\u5408\u6CD5\u7684URL -default.invalid.validator.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u672A\u80FD\u901A\u8FC7\u81EA\u5B9A\u4E49\u7684\u9A8C\u8BC1 -default.not.equal.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u4E0E[{3}]\u4E0D\u76F8\u7B49 -default.not.inlist.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u4E0D\u5728\u5217\u8868\u7684\u53D6\u503C\u8303\u56F4\u5185 -default.not.unique.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u5FC5\u987B\u662F\u552F\u4E00\u7684 -default.null.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u4E0D\u80FD\u4E3Anull -default.paginate.next=\u4E0B\u9875 -default.paginate.prev=\u4E0A\u9875 diff --git a/scorecard_tool/grails-app/services/com/topcoder/admin/scorecards/ScorecardService.groovy b/scorecard_tool/grails-app/services/com/topcoder/admin/scorecards/ScorecardService.groovy deleted file mode 100644 index e6d0abc9d..000000000 --- a/scorecard_tool/grails-app/services/com/topcoder/admin/scorecards/ScorecardService.groovy +++ /dev/null @@ -1,213 +0,0 @@ -/* -* Copyright (C) 2011 TopCoder Inc., All Rights Reserved. -*/ -package com.topcoder.admin.scorecards - -import groovy.sql.Sql - -import org.springframework.web.servlet.support.RequestContextUtils as RCU - -/** -* This class is the service for Scorecard domain. Grails will handle transaction management -* in service classes. -* -*

    -* Version 1.2 ((TCCC-3917) Scorecard Tool - Document Upload Option) Changes notes: -*

      -*
    • Changed save closure to persist the uploadDocumentRequired property of ScorecardQuestion set by -* user.
    • -*
    -*

    -* -* @author TCSASSEMBLER, pvmagacho -* @version 1.2 -*/ -class ScorecardService { - /** - * Use transaction management. - */ - static transactional = true - - /** - * The SessionFactory instance which will be injected by grails framework. - */ - def sessionFactory - - /** - * Save the scorecard data to database. - * - * @param messageSource the message source instance used to retrieve message - * @param scorecardData the scorecard data - * @param request the http request instance - * @return the scorecard id - */ - def saveScorecard(messageSource, scorecardData, request) { - try { - // save scorecard - def scorecardInstance - def toCreate = false - if (scorecardData.id && scorecardData.id > 0) { - scorecardInstance = Scorecard.get(scorecardData.id) - } else { - toCreate = true - scorecardInstance = new Scorecard() - } - - scorecardInstance.properties = [ - 'projectCategory.id': scorecardData.projectCategory, - 'scorecardName': scorecardData.scorecardName, - 'scorecardVersion': scorecardData.scorecardVersion, - 'scorecardType.id': scorecardData.scorecardType, - 'minimumScore': scorecardData.minimumScore, - 'maximumScore': scorecardData.maximumScore, - 'scorecardStatus.id': scorecardData.scorecardStatus - ] - - if (!scorecardInstance.hasErrors() && scorecardInstance.save(flush:true)) { - if (scorecardInstance.hasErrors()) { - throw new Exception(extractErrors(messageSource, scorecardInstance, request).join(";")); - } - } else { - throw new Exception(extractErrors(messageSource, scorecardInstance, request).join(";")); - } - - def groupIds = [] as Set; - def sectionIds = [] as Set; - def questionIds = [] as Set; - - // save scorecard groups - for (int i = 0; i < scorecardData.scorecardGroups.size(); i++) { - def group = scorecardData.scorecardGroups.getJSONObject(i) - def groupDomain - if (group.containsKey("id")) { - groupDomain = ScorecardGroup.get(group.id) - } else { - groupDomain = new ScorecardGroup() - } - groupDomain.properties = [ - 'groupName': group.groupName, - 'weight': group.weight, - 'sort': group.sort, - 'scorecard.id': scorecardInstance.id - ] - - if (!groupDomain.hasErrors() && groupDomain.save(flush:true)) { - if (groupDomain.hasErrors()) { - throw new Exception(extractErrors(messageSource, groupDomain, request).join(";")); - } - } else { - throw new Exception(extractErrors(messageSource, groupDomain, request).join(";")); - } - group.put("id", groupDomain.id) - groupIds << groupDomain.id - - // save group sections - for (int j = 0; j < group.scorecardSections.size(); j++) { - def section = group.scorecardSections.getJSONObject(j) - def sectionDomain - if (section.containsKey("id")) { - sectionDomain = ScorecardSection.get(section.id) - } else { - sectionDomain = new ScorecardSection() - } - sectionDomain.properties = [ - 'sectionName': section.sectionName, - 'weight': section.weight, - 'sort': section.sort, - 'scorecardGroup.id': groupDomain.id - ] - - if (!sectionDomain.hasErrors() && sectionDomain.save(flush:true)) { - if (sectionDomain.hasErrors()) { - throw new Exception(extractErrors(messageSource, sectionDomain, request).join(";")); - } - } else { - throw new Exception(extractErrors(messageSource, sectionDomain, request).join(";")); - } - section.put("id", sectionDomain.id) - sectionIds << sectionDomain.id - - // save section questions - for (int k = 0; k < section.scorecardQuestions.size(); k++) { - def question = section.scorecardQuestions.getJSONObject(k) - def questionDomain - if (question.containsKey("id")) { - questionDomain = ScorecardQuestion.get(question.id) - } else { - questionDomain = new ScorecardQuestion() - } - - questionDomain.properties = [ - 'questionType.id' : question.questionType, - 'description': question.description, - 'guideline': question.guideline, - 'weight': question.weight, - 'uploadDocument': question.uploadDocument, - 'scorecardSection.id': sectionDomain.id, - 'uploadDocumentRequired': question.uploadDocumentRequired, - sort: question.sort - ] - - if (!questionDomain.hasErrors() && questionDomain.save(flush:true)) { - if (questionDomain.hasErrors()) { - throw new Exception(extractErrors(messageSource, questionDomain, request).join(";")); - } - } else { - throw new Exception(extractErrors(messageSource, questionDomain, request).join(";")); - } - question.put("id", questionDomain.id) - questionIds << questionDomain.id - } - } - } - - // delete the unused data - if (!toCreate) { - scorecardInstance.scorecardGroups.each {group -> - group.scorecardSections.each {section -> - section.scorecardQuestions.each {question -> - if (!questionIds.contains(question.id)) { - def sql = new Sql(sessionFactory.currentSession.connection()) - sql.executeUpdate("delete from scorecard_question where scorecard_question_id=?", [question.id]) - } - } - } - } - scorecardInstance.scorecardGroups.each {group -> - group.scorecardSections.each {section -> - if (!sectionIds.contains(section.id)) { - def sql = new Sql(sessionFactory.currentSession.connection()) - sql.executeUpdate("delete from scorecard_section where scorecard_section_id=?", [section.id]) - } - } - } - scorecardInstance = Scorecard.get(scorecardData.id) - scorecardInstance.scorecardGroups.each {group -> - if (!groupIds.contains(group.id)) { - def sql = new Sql(sessionFactory.currentSession.connection()) - sql.executeUpdate("delete from scorecard_group where scorecard_group_id=?", [group.id]) - } - } - } - return scorecardInstance.id - } catch (Exception e) { - // error occurs, throw RuntimeException so that the transaction can be rollback - throw new RuntimeException(e.getMessage(), e); - } - } - - /** - * Gets the error message from domain class - * - * @param messageSource the message source instance used to retrieve message - * @param model the domain class instance - * @param request the http request instance - * @return the error message - */ - private extractErrors(messageSource, model, request) { - def locale = RCU.getLocale(request) - model.errors.fieldErrors.collect { error -> - messageSource.getMessage(error, locale) - } - } -} diff --git a/scorecard_tool/grails-app/taglib/com/topcoder/admin/scorecards/ScorecardTagLib.groovy b/scorecard_tool/grails-app/taglib/com/topcoder/admin/scorecards/ScorecardTagLib.groovy deleted file mode 100644 index 3ddc9d2b5..000000000 --- a/scorecard_tool/grails-app/taglib/com/topcoder/admin/scorecards/ScorecardTagLib.groovy +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import com.topcoder.shared.util.ApplicationServer -import com.topcoder.web.common.tag.HandleTag - -/** - * This class is the Tag Lib for Scorecard pages. - * - * @author pvmagacho - * @version 1.0 - * @since System Assembly - Direct TopCoder Scorecard Tool Integration - */ -class ScorecardTagLib { - - private static final String[] lightStyles = ["coderTextOrange", "coderTextWhite", "coderTextGray", "coderTextGreen", "coderTextBlue", - "coderTextYellow", "coderTextRed"]; - - private static final String[] darkStyles = ["coderTextOrange", "coderTextBlack", "coderTextGray", "coderTextGreen", "coderTextBlue", - "coderTextYellow", "coderTextRed"] - - /** - * Creates the member link. - */ - def memberLink = {attrs, body -> - out << new HandleTag().getLink(attrs['coderId'], "", "", null, null, lightStyles, darkStyles, false) - } -} diff --git a/scorecard_tool/grails-app/views/error.gsp b/scorecard_tool/grails-app/views/error.gsp deleted file mode 100644 index cfc512a99..000000000 --- a/scorecard_tool/grails-app/views/error.gsp +++ /dev/null @@ -1,54 +0,0 @@ - - - Grails Runtime Exception - - - - -

    Grails Runtime Exception

    -

    Error Details

    - -
    - Error ${request.'javax.servlet.error.status_code'}: ${request.'javax.servlet.error.message'.encodeAsHTML()}
    - Servlet: ${request.'javax.servlet.error.servlet_name'}
    - URI: ${request.'javax.servlet.error.request_uri'}
    - - Exception Message: ${exception.message?.encodeAsHTML()}
    - Caused by: ${exception.cause?.message?.encodeAsHTML()}
    - Class: ${exception.className}
    - At Line: [${exception.lineNumber}]
    - Code Snippet:
    -
    - - ${cs?.encodeAsHTML()}
    -
    -
    -
    -
    - -

    Stack Trace

    -
    -
    ${it.encodeAsHTML()}
    -
    -
    - - \ No newline at end of file diff --git a/scorecard_tool/grails-app/views/index.gsp b/scorecard_tool/grails-app/views/index.gsp deleted file mode 100644 index 7218afc1f..000000000 --- a/scorecard_tool/grails-app/views/index.gsp +++ /dev/null @@ -1,10 +0,0 @@ -<%-- - - Author: TCSASSEMBER - - Version: 1.0 - - Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - - - - Description: This page simply redirect to the scorecard finding page. - --%> -<% -response.sendRedirect("scorecard/find") -%> \ No newline at end of file diff --git a/scorecard_tool/grails-app/views/layouts/main.gsp b/scorecard_tool/grails-app/views/layouts/main.gsp deleted file mode 100644 index c635671c4..000000000 --- a/scorecard_tool/grails-app/views/layouts/main.gsp +++ /dev/null @@ -1,445 +0,0 @@ -<%-- - - Author: pvmagacho, GreatKevin - - Version: 1.3 - - Copyright (C) 2011 - 2014 TopCoder Inc., All Rights Reserved. - - - - Description: This page is the main layout of pages. - - - - Version 1.1 (System Assembly - Direct TopCoder Scorecard Tool Integration) Change notes: - - - added include for right bar - - - added new scripts to handle right bar - - - fixed login/help/logout links - - - fixed other direct links - - - - Version 1.2 (Release Assembly - TopCoder Scorecard Tool Ajax Loading and Static Files Sharing) Change notes: - - - Move css/javascripts/images to common folder of direct - - - - Version 1.3 (Release Assembly - TC Group Management and Scorecard Tool Rebranding) - - - Reskin the scorecard tool to the new look - --%> - - - - - - <g:layoutTitle default="topcoder Scorecard Tool" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    - -
    - -
    - - -
    -
    -
    - - -
    - - -
    - - -
    - -
    - - - - - - -
    -
      -
    • class="on">Find Scorecard
    • -
    • class="on">Create/Edit Scorecard
    • -
    -
    - - -
    - -
    - - - -
    - - - %{----}% - %{-- --}% - -
    -
    -
    -
    -
    -
    -
    - -
    - - - - - - - - - - - - -
    - - diff --git a/scorecard_tool/grails-app/views/scorecard/ajaxContent.gsp b/scorecard_tool/grails-app/views/scorecard/ajaxContent.gsp deleted file mode 100644 index 3a00d9f01..000000000 --- a/scorecard_tool/grails-app/views/scorecard/ajaxContent.gsp +++ /dev/null @@ -1,93 +0,0 @@ -<%-- - - Author: TCSASSEMBLER, pvmagacho - - Version: 1.1 - - Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - - - - Description: This page simply renders a scorecard information which will be used in AJAX - - call in scorecard editing page. - - - - Version 1.1 ((TCCC-3917) Scorecard Tool - Document Upload Option) Change notes: - - - Modified upload options from YES/NO to N/A, Optional or Required. Will use both - - - uploadDocument and uploadDocumentRequired properties. - - - --%> - -
    ${flash.message}
    -
    - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    IDScorecard NameProject TypeCategoryTypeMin. ScoreMax. ScoreStatus
    ${fieldValue(bean: scorecardInstance, field: "id")}${fieldValue(bean: scorecardInstance, field: "scorecardName")} v ${fieldValue(bean: scorecardInstance, field: "scorecardVersion")}${fieldValue(bean: scorecardInstance, field: "projectCategory.projectType.name")}${fieldValue(bean: scorecardInstance, field: "projectCategory.name")}${fieldValue(bean: scorecardInstance, field: "scorecardType.name")}${fieldValue(bean: scorecardInstance, field: "minimumScore")}${fieldValue(bean: scorecardInstance, field: "maximumScore")}${fieldValue(bean: scorecardInstance, field: "scorecardStatus.name")}
    - - -
    - - - - - - - - - - -
    Group: ${fieldValue(bean: group, field: "groupName")}
    Weight ${group.weight}
    - - - - - - - - - - - - - - - - - - - - - - -
    Section: ${fieldValue(bean: section, field: "sectionName")}
    Weight: ${fieldValue(bean: section, field: "weight")}
    QuestionTypeWeightDocument Upload
    -
    -
    Question ${i + 1}.${j + 1}.${k + 1}
    - ${fieldValue(bean: question, field: "description")} - -
    ${fieldValue(bean: question, field: "guideline")}
    -
    ${fieldValue(bean: question, field: "questionType.name")}${fieldValue(bean: question, field: "weight")}${(question.uploadDocument ? (question.uploadDocumentRequired ? 'Required' : 'Optional') : 'N/A')}
    -
    -
    -
    diff --git a/scorecard_tool/grails-app/views/scorecard/clone.gsp b/scorecard_tool/grails-app/views/scorecard/clone.gsp deleted file mode 100644 index 34fc85203..000000000 --- a/scorecard_tool/grails-app/views/scorecard/clone.gsp +++ /dev/null @@ -1,606 +0,0 @@ -<%-- - - Author: pvmagacho, GreatKevin - - Version: 1.2 - - Copyright (C) 2011 - 2014 TopCoder Inc., All Rights Reserved. - - - - Description: This page renders the scorecard cloning page. - - - - Version 1.1 ((TCCC-3917) Scorecard Tool - Document Upload Option) Change notes: - - - Modified upload options from YES/NO to N/A, Optional or Required. Will use both - - - uploadDocument and uploadDocumentRequired properties. - - - - Version 1.2 (Release Assembly - TC Group Management and Scorecard Tool Rebranding) - - - Reskin the scorecard tool to the new look - - - --%> -<%@ page import="com.topcoder.admin.scorecards.Scorecard" %> -<%@ page import="com.topcoder.admin.scorecards.ScorecardStatus" %> -<%@ page import="com.topcoder.admin.scorecards.ScorecardType" %> -<%@ page import="com.topcoder.admin.scorecards.ProjectType" %> -<%@ page import="com.topcoder.admin.scorecards.ProjectCategory" %> -<%@ page import="com.topcoder.admin.scorecards.ScorecardQuestionType" %> - - - - - - - - - - -
    -
    -
    - Dashboard > - Scorecards > - Clone Scorecard -
    -
    -
    - -

    Clone Scorecard

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    IDScorecard NameScorecard VersionProject TypeCategoryTypeMin. ScoreMax. ScoreStatus
    -
    - -
    -
    -
    - - - - - - - - - - -
    -
    - Group:   -
    - Weight   - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - Section:  -
    - Weight:  - -
    QuestionTypeWeightDocument Upload - - -
    -
    -

    Question Text:

    - -

    Question Guideline

    - -
    - - - -
    -
    -

    Question Text:

    - -

    Question Guideline

    - -
    - - - -
    - Question Weights: - - Sum of question weights within a section must total 100. -
    -
    - - - - - - - - - - - -
    - Section Weights: - - Sum of section weights within a group must total 100. -
    -
    -
    - - - - - - - - - - -
    - Group Weights: - - Sum of all group weights must equal 100. -
    -
    -
    -
    - - - -
    - - - - - - - -
    - - - - - - - - - - -
    -
    - Group:   -
    - Weight   - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - Section:  -
    - Weight:  - -
    QuestionTypeWeightDocument Upload - -
    -
    -

    Question Text:

    - -

    Question Guideline

    - -
    - - - -
    - Question Weights: - - - Sum of question weights within a section must total 100. -
    -
    - - - - - - - - - - -
    - Section Weights: - - Sum of section weights within a group must total 100. -
    -
    - - - diff --git a/scorecard_tool/grails-app/views/scorecard/create.gsp b/scorecard_tool/grails-app/views/scorecard/create.gsp deleted file mode 100644 index 70c02f080..000000000 --- a/scorecard_tool/grails-app/views/scorecard/create.gsp +++ /dev/null @@ -1,612 +0,0 @@ -<%-- - - Author: pvmagacho, GreatKevin - - Version: 1.4 - - Copyright (C) 2011 - 2014 TopCoder Inc., All Rights Reserved. - - - - Description: This page renders the scorecard creating page. - - - - Version 1.1 (System Assembly - Direct TopCoder Scorecard Tool Integration) Change notes: - - - set "NO" as default value for Document Upload - - - fixed direct links - - - - Version 1.2 (Release Assembly - TopCoder Scorecard Tool Ajax Loading and Static Files Sharing) Change notes: - - - Fix typo of "Guideline" - - - - Version 1.3 ((TCCC-3917) Scorecard Tool - Document Upload Option) Change notes: - - - Modified upload options from YES/NO to N/A, Optional or Required. Will use both - - - uploadDocument and uploadDocumentRequired properties. - - - - Version 1.4 (Release Assembly - TC Group Management and Scorecard Tool Rebranding) - - - Reskin the scorecard tool to the new look - - - --%> -<%@ page import="com.topcoder.admin.scorecards.Scorecard" %> -<%@ page import="com.topcoder.admin.scorecards.ScorecardStatus" %> -<%@ page import="com.topcoder.admin.scorecards.ScorecardType" %> -<%@ page import="com.topcoder.admin.scorecards.ProjectType" %> -<%@ page import="com.topcoder.admin.scorecards.ProjectCategory" %> -<%@ page import="com.topcoder.admin.scorecards.ScorecardQuestionType" %> - - - - - - - - - -
    -
    -
    - Dashboard > - Scorecards > - Create Scorecard -
    -
    -
    - -

    Create Scorecard

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    IDScorecard NameScorecard VersionProject TypeCategoryTypeMin. ScoreMax. ScoreStatus
    -
    - -
    -
    -
    - - - - - - - - - - -
    -
    - Group:   -
    - Weight   - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - Section:  -
    - Weight:  - -
    QuestionTypeWeightDocument Upload - - -
    -
    -

    Question Text:

    - -

    Question Guideline

    - -
    - - - -
    -
    -

    Question Text:

    - -

    Question Guideline

    - -
    - - - -
    - Question Weights: - - Sum of question weights within a section must total 100. -
    -
    - - - - - - - - - - - -
    - Section Weights: - - Sum of section weights within a group must total 100. -
    -
    -
    - - - - - - - - - - -
    - Group Weights: - - Sum of all group weights must equal 100. -
    -
    -
    -
    - - - -
    - - - - - - - -
    - - - - - - - - - - -
    -
    - Group:   -
    - Weight   - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - Section:  -
    - Weight:  - -
    QuestionTypeWeightDocument Upload - -
    -
    -

    Question Text:

    - -

    Question Guideline

    - -
    - - - -
    - Question Weights: - - - Sum of question weights within a section must total 100. -
    -
    - - - - - - - - - - -
    - Section Weights: - - Sum of section weights within a group must total 100. -
    -
    - - - diff --git a/scorecard_tool/grails-app/views/scorecard/edit.gsp b/scorecard_tool/grails-app/views/scorecard/edit.gsp deleted file mode 100644 index 3a7ba9dbd..000000000 --- a/scorecard_tool/grails-app/views/scorecard/edit.gsp +++ /dev/null @@ -1,616 +0,0 @@ -<%-- - - Author: pvmagacho, GreatKevin - - Version: 1.4 - - Copyright (C) 2011 - 2014 TopCoder Inc., All Rights Reserved. - - - - Description: This page renders the scorecard finding page. - - - - Version 1.1 (System Assembly - Direct TopCoder Scorecard Tool Integration) Change notes: - - - set "NO" as default value for Document Upload - - - fixed direct links - - - - Version 1.2 (Release Assembly - TopCoder Scorecard Tool Ajax Loading and Static Files Sharing) Change notes: - - - Fix typo of "Guideline" - - - - Version 1.3 ((TCCC-3917) Scorecard Tool - Document Upload Option) Change notes: - - - Modified upload options from YES/NO to N/A, Optional or Required. Will use both - - - uploadDocument and uploadDocumentRequired properties. - - - - Version 1.4 (Release Assembly - TC Group Management and Scorecard Tool Rebranding) - - - Reskin the scorecard tool to the new look - - - --%> -<%@ page import="com.topcoder.admin.scorecards.Scorecard" %> -<%@ page import="com.topcoder.admin.scorecards.ScorecardStatus" %> -<%@ page import="com.topcoder.admin.scorecards.ScorecardType" %> -<%@ page import="com.topcoder.admin.scorecards.ProjectType" %> -<%@ page import="com.topcoder.admin.scorecards.ProjectCategory" %> -<%@ page import="com.topcoder.admin.scorecards.ScorecardQuestionType" %> - - - - - - - - - -
    -
    -
    - Dashboard > - Scorecards > - Edit Scorecard -
    -
    -
    - -

    Edit Scorecard

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    IDScorecard NameScorecard VersionProject TypeCategoryTypeMin. ScoreMax. ScoreStatus
    ${scorecardInstance.id}
    -
    - -
    -
    - -
    - - - - - - - - - - -
    -
    - Group:   -
    - Weight   - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - Section:  -
    - Weight:  - -
    QuestionTypeWeightDocument Upload - - -
    -
    -

    Question Text:

    - -

    Question Guideline

    - -
    - - - -
    -
    -

    Question Text:

    - -

    Question Guideline

    - -
    - - - -
    - Question Weights: - - Sum of question weights within a section must total 100. -
    -
    -
    - - - - - - - - - - - -
    - Section Weights: - - Sum of section weights within a group must total 100. -
    -
    -
    -
    - - - - - - - - - - -
    - Group Weights: - - Sum of all group weights must equal 100. -
    -
    -
    -
    - - - -
    - - - - - - - -
    - - - - - - - - - - -
    -
    - Group:   -
    - Weight   - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - Section:  -
    - Weight:  - -
    QuestionTypeWeightDocument Upload - -
    -
    -

    Question Text:

    - -

    Question Guideline

    - -
    - - - -
    - Question Weights: - - - Sum of question weights within a section must total 100. -
    -
    - - - - - - - - - - -
    - Section Weights: - - Sum of section weights within a group must total 100. -
    -
    - - diff --git a/scorecard_tool/grails-app/views/scorecard/find.gsp b/scorecard_tool/grails-app/views/scorecard/find.gsp deleted file mode 100644 index 6df5d0020..000000000 --- a/scorecard_tool/grails-app/views/scorecard/find.gsp +++ /dev/null @@ -1,223 +0,0 @@ -<%-- - - Author: pvmagacho, GreatKevin - - Version: 1.2 - - Copyright (C) 2011 - 2014 TopCoder Inc., All Rights Reserved. - - - - Description: This page renders the scorecard finding page. - - Version 1.1 (System Assembly - Direct TopCoder Scorecard Tool Integration) Change notes: - - - fixed direct links - - - - Version 1.2 (Release Assembly - TC Group Management and Scorecard Tool Rebranding) - - - Reskin the scorecard tool to the new look - --%> -<%@ page import="com.topcoder.admin.scorecards.ScorecardStatus" %> -<%@ page import="com.topcoder.admin.scorecards.ScorecardType" %> -<%@ page import="com.topcoder.admin.scorecards.ProjectType" %> -<%@ page import="com.topcoder.admin.scorecards.ProjectCategory" %> - - - - - - - - -
    ${flash.message}
    -
    - -
    - -
    -
    - -
    -
    -
    - Dashboard > - Scorecards > - Find Scorecard -
    -
    -

    Scorecard Search

    -
    - -
    -
    - -
    - -
    -
    Search Criteria
    - APPLY -
    - -
    -
    -
    -
    -
    - -
    - - -
    -
    - - - - - - - - -
    - - -
    -
    - - -
    - - -
    -
    - - -
    -
    Scorecard Type
    -
    - -
    -
    -
    -
    -
    - - - - - -
    -
    Status
    -
    - - - -
    -
    -
    -
    -
    -
    -
    - -
    - CLEAR - SEARCH -
    - -
    -

    0 Scorecards found based on your search criteria

    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - -
    Scorecard Name  TypeCategoryStatusAction
    - -
    -
    -
    -
    -
    -
    -
    - - - diff --git a/scorecard_tool/grails-app/views/scorecard/list.gsp b/scorecard_tool/grails-app/views/scorecard/list.gsp deleted file mode 100644 index 2ac0b75fa..000000000 --- a/scorecard_tool/grails-app/views/scorecard/list.gsp +++ /dev/null @@ -1,89 +0,0 @@ - -<%@ page import="com.topcoder.admin.scorecards.Scorecard" %> - - - - - - <g:message code="default.list.label" args="[entityName]" /> - - - -
    -

    - -
    ${flash.message}
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ${fieldValue(bean: scorecardInstance, field: "id")}${fieldValue(bean: scorecardInstance, field: "scorecardName")}${fieldValue(bean: scorecardInstance, field: "scorecardVersion")}${fieldValue(bean: scorecardInstance, field: "minimumScore")}${fieldValue(bean: scorecardInstance, field: "maximumScore")}${fieldValue(bean: scorecardInstance, field: "scorecardType")}${fieldValue(bean: scorecardInstance, field: "scorecardStatus")}${fieldValue(bean: scorecardInstance, field: "projectCategory")}${fieldValue(bean: scorecardInstance, field: "createUser")}${fieldValue(bean: scorecardInstance, field: "modifyUser")}
    -
    -
    - -
    -
    - - diff --git a/scorecard_tool/grails-app/views/scorecard/right.gsp b/scorecard_tool/grails-app/views/scorecard/right.gsp deleted file mode 100644 index 031b70a4e..000000000 --- a/scorecard_tool/grails-app/views/scorecard/right.gsp +++ /dev/null @@ -1,110 +0,0 @@ -<%-- - - Author: pvmagacho, GreatKevin - - Version: 1.3 - - Copyright (C) 2011 - 2014 TopCoder Inc., All Rights Reserved. - - - - Description: The right side of the topcoder cockpit scorecard page. - - - - Version 1.1(Module Assembly - TopCoder Scorecard Tool Right Bar v1.0) changes - - - Added html codes for customer and project dropdown and the contests list panel - - - - Version 1.2 (TCCC-4119 - scorecard - update right side bar) changes - - Modified scorecard right side bar to match direct application right side bar. - - - - Version 1.3 (Release Assembly - TC Group Management and Scorecard Tool Rebranding) - - - Reskin the scorecard tool to the new look ---%> - -
    -
    - - -
    -
    -
    - - - - - - - - - - - - -
    - -
    - Status - Contest Title - Type -
    -
    - - - - - - - - - - - - - - - - -
    c1c2c3
    -
    - -
    -
    - - - -
    - - - - -
    - - - \ No newline at end of file diff --git a/scorecard_tool/grails-app/views/scorecard/show.gsp b/scorecard_tool/grails-app/views/scorecard/show.gsp deleted file mode 100644 index 27ef71398..000000000 --- a/scorecard_tool/grails-app/views/scorecard/show.gsp +++ /dev/null @@ -1,123 +0,0 @@ -<%-- - - Author: pvmagacho, GreatKevin - - Version: 1.3 - - Copyright (C) 2011 - 2014 TopCoder Inc., All Rights Reserved. - - - - Description: This page render the UI for a scorecard. - - - - Version 1.1 (System Assembly - Direct TopCoder Scorecard Tool Integration) Change notes: - - - fixed minimum number format - - - - Version 1.2 ((TCCC-3917) Scorecard Tool - Document Upload Option) Change notes: - - - Modified upload options from YES/NO to N/A, Optional or Required. Will use both - - - uploadDocument and uploadDocumentRequired properties. - - - - Version 1.3 (Release Assembly - TC Group Management and Scorecard Tool Rebranding) - - - Reskin the scorecard tool to the new look - --%> - -<%@ page import="com.topcoder.admin.scorecards.Scorecard" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> - - - - - - - - -
    ${flash.message}
    -
    - -
    - -
    -
    - -
    -
    -
    - Dashboard > - Scorecards > - Scorecard Details -
    -
    -
    - - Expand All  |  - Collapse All EDIT - -
    -

    Scorecard Details

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    IDScorecard NameProject TypeCategoryTypeMin. ScoreMax. ScoreStatus
    ${scorecardInstance.id}${fieldValue(bean: scorecardInstance, field: "scorecardName")} v ${fieldValue(bean: scorecardInstance, field: "scorecardVersion")}${fieldValue(bean: scorecardInstance, field: "projectCategory.projectType.name")}${fieldValue(bean: scorecardInstance, field: "projectCategory.name")}${fieldValue(bean: scorecardInstance, field: "scorecardType.name")}${fieldValue(bean: scorecardInstance, field: "scorecardStatus.name")}
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Group: ${fieldValue(bean: group, field: "groupName")}Weight
    Section: ${fieldValue(bean: section, field: "sectionName")}Weight:
    QuestionTypeWeightDocument Upload
    -
    Question ${i + 1}.${j + 1}.${k + 1}
    - ${fieldValue(bean: question, field: "description").replaceAll('\n', '
    ')}
    -
    - ${fieldValue(bean: question, field: "guideline").replaceAll('\n', '
    ')} -
    -
    -
    ${fieldValue(bean: question, field: "questionType.name")}${(question.uploadDocument ? (question.uploadDocumentRequired ? 'Required' : 'Optional') : 'N/A')}
    -
    -
    -
    - - diff --git a/scorecard_tool/ivy.xml b/scorecard_tool/ivy.xml deleted file mode 100644 index bfc3e3f77..000000000 --- a/scorecard_tool/ivy.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/scorecard_tool/ivysettings.xml b/scorecard_tool/ivysettings.xml deleted file mode 100644 index 22812d519..000000000 --- a/scorecard_tool/ivysettings.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/scorecard_tool/lib/base_exception.jar b/scorecard_tool/lib/base_exception.jar deleted file mode 100644 index 53aaa7fb4..000000000 Binary files a/scorecard_tool/lib/base_exception.jar and /dev/null differ diff --git a/scorecard_tool/lib/build/ant-1.7.1.jar b/scorecard_tool/lib/build/ant-1.7.1.jar deleted file mode 100644 index 704717779..000000000 Binary files a/scorecard_tool/lib/build/ant-1.7.1.jar and /dev/null differ diff --git a/scorecard_tool/lib/build/ant-launcher-1.7.1.jar b/scorecard_tool/lib/build/ant-launcher-1.7.1.jar deleted file mode 100644 index 7c8f849ec..000000000 Binary files a/scorecard_tool/lib/build/ant-launcher-1.7.1.jar and /dev/null differ diff --git a/scorecard_tool/lib/build/gant_groovy1.7-1.9.2.jar b/scorecard_tool/lib/build/gant_groovy1.7-1.9.2.jar deleted file mode 100644 index 6fcfc4250..000000000 Binary files a/scorecard_tool/lib/build/gant_groovy1.7-1.9.2.jar and /dev/null differ diff --git a/scorecard_tool/lib/build/gpars-0.9.jar b/scorecard_tool/lib/build/gpars-0.9.jar deleted file mode 100644 index 43e0dd0e8..000000000 Binary files a/scorecard_tool/lib/build/gpars-0.9.jar and /dev/null differ diff --git a/scorecard_tool/lib/build/grails-bootstrap-1.3.7.jar b/scorecard_tool/lib/build/grails-bootstrap-1.3.7.jar deleted file mode 100644 index 60249d61e..000000000 Binary files a/scorecard_tool/lib/build/grails-bootstrap-1.3.7.jar and /dev/null differ diff --git a/scorecard_tool/lib/build/groovy-all-1.7.8.jar b/scorecard_tool/lib/build/groovy-all-1.7.8.jar deleted file mode 100644 index 73f7dc1a4..000000000 Binary files a/scorecard_tool/lib/build/groovy-all-1.7.8.jar and /dev/null differ diff --git a/scorecard_tool/lib/build/ivy-2.2.0.jar b/scorecard_tool/lib/build/ivy-2.2.0.jar deleted file mode 100644 index 7e73dab66..000000000 Binary files a/scorecard_tool/lib/build/ivy-2.2.0.jar and /dev/null differ diff --git a/scorecard_tool/lib/build/jcl-over-slf4j-1.5.8.jar b/scorecard_tool/lib/build/jcl-over-slf4j-1.5.8.jar deleted file mode 100644 index 4281c5935..000000000 Binary files a/scorecard_tool/lib/build/jcl-over-slf4j-1.5.8.jar and /dev/null differ diff --git a/scorecard_tool/lib/build/jsr166y-070108.jar b/scorecard_tool/lib/build/jsr166y-070108.jar deleted file mode 100644 index 1b3e22061..000000000 Binary files a/scorecard_tool/lib/build/jsr166y-070108.jar and /dev/null differ diff --git a/scorecard_tool/lib/build/jul-to-slf4j-1.5.8.jar b/scorecard_tool/lib/build/jul-to-slf4j-1.5.8.jar deleted file mode 100644 index dfcbf8cfb..000000000 Binary files a/scorecard_tool/lib/build/jul-to-slf4j-1.5.8.jar and /dev/null differ diff --git a/scorecard_tool/lib/build/slf4j-api-1.5.8.jar b/scorecard_tool/lib/build/slf4j-api-1.5.8.jar deleted file mode 100644 index 20d1d3718..000000000 Binary files a/scorecard_tool/lib/build/slf4j-api-1.5.8.jar and /dev/null differ diff --git a/scorecard_tool/lib/build/svnkit-1.2.3.5521.jar b/scorecard_tool/lib/build/svnkit-1.2.3.5521.jar deleted file mode 100644 index 2559b42c0..000000000 Binary files a/scorecard_tool/lib/build/svnkit-1.2.3.5521.jar and /dev/null differ diff --git a/scorecard_tool/lib/commons-codec-1.4.jar b/scorecard_tool/lib/commons-codec-1.4.jar deleted file mode 100644 index 458d432da..000000000 Binary files a/scorecard_tool/lib/commons-codec-1.4.jar and /dev/null differ diff --git a/scorecard_tool/lib/commons-logging-1.1.1.jar b/scorecard_tool/lib/commons-logging-1.1.1.jar deleted file mode 100644 index 1deef144c..000000000 Binary files a/scorecard_tool/lib/commons-logging-1.1.1.jar and /dev/null differ diff --git a/scorecard_tool/lib/ezmorph-1.0.6.jar b/scorecard_tool/lib/ezmorph-1.0.6.jar deleted file mode 100644 index 30fad12d8..000000000 Binary files a/scorecard_tool/lib/ezmorph-1.0.6.jar and /dev/null differ diff --git a/scorecard_tool/lib/http-builder-0.5.1.jar b/scorecard_tool/lib/http-builder-0.5.1.jar deleted file mode 100644 index 47aa03514..000000000 Binary files a/scorecard_tool/lib/http-builder-0.5.1.jar and /dev/null differ diff --git a/scorecard_tool/lib/httpclient-4.1.1.jar b/scorecard_tool/lib/httpclient-4.1.1.jar deleted file mode 100644 index c845ef961..000000000 Binary files a/scorecard_tool/lib/httpclient-4.1.1.jar and /dev/null differ diff --git a/scorecard_tool/lib/httpclient-cache-4.1.1.jar b/scorecard_tool/lib/httpclient-cache-4.1.1.jar deleted file mode 100644 index 3e1da0895..000000000 Binary files a/scorecard_tool/lib/httpclient-cache-4.1.1.jar and /dev/null differ diff --git a/scorecard_tool/lib/httpcore-4.1.jar b/scorecard_tool/lib/httpcore-4.1.jar deleted file mode 100644 index a357c076c..000000000 Binary files a/scorecard_tool/lib/httpcore-4.1.jar and /dev/null differ diff --git a/scorecard_tool/lib/httpmime-4.1.1.jar b/scorecard_tool/lib/httpmime-4.1.1.jar deleted file mode 100644 index 01af40b24..000000000 Binary files a/scorecard_tool/lib/httpmime-4.1.1.jar and /dev/null differ diff --git a/scorecard_tool/lib/ifxjdbc.jar b/scorecard_tool/lib/ifxjdbc.jar deleted file mode 100644 index e1aebff54..000000000 Binary files a/scorecard_tool/lib/ifxjdbc.jar and /dev/null differ diff --git a/scorecard_tool/lib/json-lib-2.4-jdk15.jar b/scorecard_tool/lib/json-lib-2.4-jdk15.jar deleted file mode 100644 index 68d4f3b09..000000000 Binary files a/scorecard_tool/lib/json-lib-2.4-jdk15.jar and /dev/null differ diff --git a/scorecard_tool/lib/morph-1.1.1.jar b/scorecard_tool/lib/morph-1.1.1.jar deleted file mode 100644 index c9d4f3527..000000000 Binary files a/scorecard_tool/lib/morph-1.1.1.jar and /dev/null differ diff --git a/scorecard_tool/lib/nekohtml.jar b/scorecard_tool/lib/nekohtml.jar deleted file mode 100644 index 16261d2eb..000000000 Binary files a/scorecard_tool/lib/nekohtml.jar and /dev/null differ diff --git a/scorecard_tool/lib/resolver.jar b/scorecard_tool/lib/resolver.jar deleted file mode 100644 index e535bdc07..000000000 Binary files a/scorecard_tool/lib/resolver.jar and /dev/null differ diff --git a/scorecard_tool/lib/security.jar b/scorecard_tool/lib/security.jar deleted file mode 100644 index e6620aca8..000000000 Binary files a/scorecard_tool/lib/security.jar and /dev/null differ diff --git a/scorecard_tool/lib/shared.jar b/scorecard_tool/lib/shared.jar deleted file mode 100644 index a5a83df0d..000000000 Binary files a/scorecard_tool/lib/shared.jar and /dev/null differ diff --git a/scorecard_tool/lib/tcwebcommon.jar b/scorecard_tool/lib/tcwebcommon.jar deleted file mode 100644 index 61b81c1cb..000000000 Binary files a/scorecard_tool/lib/tcwebcommon.jar and /dev/null differ diff --git a/scorecard_tool/scripts/_Events.groovy b/scorecard_tool/scripts/_Events.groovy deleted file mode 100644 index 096c488fa..000000000 --- a/scorecard_tool/scripts/_Events.groovy +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -import groovy.xml.StreamingMarkupBuilder - -/** - * JBOSS - Remove log4j configuration stuff (when running with JBoss or GlassFish a.s.o) - * - * refer to http://blog.saddey.net/2010/03/06/how-to-deploy-a-grails-application-to-jboss-5/ - * - * @author pvmagacho - * @version 1.0 - * @since System Assembly - Direct TopCoder Scorecard Tool Integration - */ -eventWebXmlEnd = {String tmpfile -> - - def root = new XmlSlurper().parse(webXmlFile) - - // When running with JBoss (or GlassFish a.s.o) remove log4j configuration stuff - def log4j = root.listener.findAll {node -> - node.'listener-class'.text() == 'org.codehaus.groovy.grails.web.util.Log4jConfigListener' - } - log4j.replaceNode {} - - def log4jFile = root.'context-param'.findAll {node -> - node.'param-name'.text() == 'log4jConfigLocation' - } - log4jFile.replaceNode {} - - webXmlFile.text = new StreamingMarkupBuilder().bind { - mkp.declareNamespace("": "http://java.sun.com/xml/ns/j2ee") - mkp.yield(root) - } -} \ No newline at end of file diff --git a/scorecard_tool/src/groovy/com/topcoder/admin/scorecards/Audit.groovy b/scorecard_tool/src/groovy/com/topcoder/admin/scorecards/Audit.groovy deleted file mode 100644 index 732ead3fe..000000000 --- a/scorecard_tool/src/groovy/com/topcoder/admin/scorecards/Audit.groovy +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import java.util.Date - -/** - * This class is a abstract class providing the basic fields for audit. The Domain classes - * will extend this class. - * - * @author TCSASSEMBER - * @version 1.0 - */ -abstract class Audit { - /** - * Represents the create user of a database record. - * - * TODO:We use hard coded values currently, will be fixed later - */ - String createUser = "System" - - /** - * Represents the creation time of this project category. - */ - Date dateCreated - - /** - * Represents the modify user of a database record. - * - * TODO:We use hard coded values currently, will be fixed later - */ - String modifyUser = "System" - - /** - * Represents the last updated time of this project category. - */ - Date lastUpdated -} diff --git a/scorecard_tool/src/groovy/com/topcoder/admin/scorecards/Util.groovy b/scorecard_tool/src/groovy/com/topcoder/admin/scorecards/Util.groovy deleted file mode 100644 index 138486b55..000000000 --- a/scorecard_tool/src/groovy/com/topcoder/admin/scorecards/Util.groovy +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -/** - * This class is a utility class for this application. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class Util { - /** - * Checks whether the Scorecard is editable. - * - * @param scorecard the Scorecard instance - * @return true if the scorecard is editable, false otherwise - */ - public static boolean checkScorecardEditable(Scorecard scorecard) { - def r = Review.findByScorecard(scorecard, [max:1]); - r == null - } -} diff --git a/scorecard_tool/src/java/com/topcoder/database/utilities/TopCoderTableHiLoGenerator.java b/scorecard_tool/src/java/com/topcoder/database/utilities/TopCoderTableHiLoGenerator.java deleted file mode 100644 index 5426c3dc3..000000000 --- a/scorecard_tool/src/java/com/topcoder/database/utilities/TopCoderTableHiLoGenerator.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.database.utilities; - -import java.io.Serializable; -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.Properties; - -import org.hibernate.HibernateException; -import org.hibernate.MappingException; -import org.hibernate.dialect.Dialect; -import org.hibernate.engine.SessionImplementor; -import org.hibernate.engine.TransactionHelper; -import org.hibernate.id.Configurable; -import org.hibernate.id.IdentifierGenerator; -import org.hibernate.type.Type; -import org.hibernate.util.PropertiesHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - *

    - * This class is the customized id generator which is used by the tool to generate the ids based the corresponding - * sequence name in id_sequence table. - *

    - * - * @author FireIce, TCSASSEMBER - * @version 1.1 - */ -public class TopCoderTableHiLoGenerator extends TransactionHelper implements IdentifierGenerator, Configurable { - /** - * Represents whether is test environment. - */ - public static boolean TEST_ENV = false; - - /** - * Represents the logger. - */ - private static final Logger log = LoggerFactory.getLogger(TopCoderTableHiLoGenerator.class); - - /** - * Represents the parameter name for sequence name configuration. - */ - private static final String SEQ_NAME = "seq_name"; - - /** - * The next_block_start field name of table id_sequences. - */ - private static final String NEXT_BLOCK_START = "next_block_start"; - - /** - * The block_size field name of table id_sequences. - */ - private static final String BLOCK_SIZE = "block_size"; - - /** - * The exausted field name of table id_sequences. - */ - private static final String EXHAUSTED = "exhausted"; - - /** - * The select sql sentence used for retrieving data from table. - */ - private static final String SELECT_NEXT_BLOCK = - "SELECT next_block_start, block_size, exhausted FROM id_sequences WHERE name = ? FOR UPDATE"; - - /** - * The select sql sentence used for retrieving data from table in test environment. - */ - private static final String SELECT_NEXT_BLOCK_TEST = - "SELECT next_block_start, block_size, exhausted FROM id_sequences WHERE name = ?"; - - /** - * Update the next_block_start of the table. - */ - private static final String UPDATE_NEXT_BLOCK_START = "UPDATE id_sequences SET next_block_start = ? WHERE name = ?"; - - /** - * The sql sentence to set the exausted to 1. - */ - private static final String UPDATE_EXHAUSTED = "UPDATE id_sequences SET exhausted = 1 WHERE name = ?"; - - /** - * This is the next value that will be generated for this sequence. - */ - private long nextID; - - /** - * Indicate the ids left in the current block for the generate method. - */ - private int idsLeft = 0; - - /** - * Represents the sequence name to generate the next id. - */ - private String sequenceName; - - /** - * Configures the id generator. - * - * @param type the id type. - * @param params the configured parameters. - * @param d the database dialect - * @throws MappingException if any mapping problem occurs. - */ - public void configure(Type type, Properties params, Dialect d) - throws MappingException { - sequenceName = PropertiesHelper.getString(SEQ_NAME, params, null); - } - - /** - * Generates next id. - * - * @param session the session implementor. - * @param obj the object - * @throws SQLException if any error occurs. - */ - public Serializable generate(SessionImplementor session, Object obj) - throws HibernateException { - if (idsLeft <= 0) { - // if no ids left, - // acquire a new block - synchronized (TopCoderTableHiLoGenerator.class) { - doWorkInNewTransaction(session); - } - } - - --idsLeft; - - return nextID++; - } - - /** - * The does the real id generation, the logic is similar as ID Generator component. - * @param conn the database connection. - * @param sql the sql string. - * @throws SQLException if any error occurs. - */ - protected Serializable doWorkInCurrentTransaction(Connection conn, - String sql) throws SQLException { - // access the database - ResultSet rs = null; - PreparedStatement selectStmt = null; - PreparedStatement updateExaustedStmt = null; - PreparedStatement updateStartStmt = null; - - try { - selectStmt = conn.prepareStatement(TEST_ENV ? SELECT_NEXT_BLOCK_TEST : SELECT_NEXT_BLOCK); - selectStmt.setString(1, sequenceName); - rs = selectStmt.executeQuery(); - - if (!rs.next()) { - throw new SQLException("The specified IDName does not exist in the database."); - } - - // if the ids are exausted yet, simply throw exception - if (rs.getBoolean(EXHAUSTED)) { - throw new SQLException("The ids of specified IDName are exausted yet."); - } - - // otherwise, read the new block and update this id - long myNextID = rs.getLong(NEXT_BLOCK_START); - int blockSize = rs.getInt(BLOCK_SIZE); - - // if the ids left are not sufficient to make a full block, - // throw exception - if ((myNextID - 1) > (Long.MAX_VALUE - blockSize)) { - throw new SQLException("The ids left are not sufficient to make a block."); - } - - // From here, we need to consider the rollback problem while error occurs - // if the ids are exausted, set the flag - if ((myNextID - 1) >= (Long.MAX_VALUE - blockSize)) { - updateExaustedStmt = conn.prepareStatement(UPDATE_EXHAUSTED); - updateExaustedStmt.setString(1, sequenceName); - updateExaustedStmt.executeUpdate(); - } - - long myMaxBlockID = (myNextID + blockSize) - 1; - - // update the next block start - updateStartStmt = conn.prepareStatement(UPDATE_NEXT_BLOCK_START); - updateStartStmt.setLong(1, myMaxBlockID + 1); - updateStartStmt.setString(2, sequenceName); - updateStartStmt.executeUpdate(); - - // it is safe to assign all the value now - idsLeft = blockSize; - nextID = myNextID; - - return myNextID; - } catch (SQLException e) { - log.error("could not get next id", e); - - throw e; - } finally { - if (updateStartStmt != null) { - try { - updateStartStmt.close(); - } catch (SQLException e) { - // ignore - } - } - - if (updateExaustedStmt != null) { - try { - updateExaustedStmt.close(); - } catch (SQLException e) { - // ignore - } - } - - if (rs != null) { - try { - rs.close(); - } catch (SQLException e) { - // ignore - } - } - - if (selectStmt != null) { - try { - selectStmt.close(); - } catch (SQLException e) { - // ignore - } - } - } - } - -} diff --git a/scorecard_tool/src/java/com/topcoder/scorecard/security/AuthenticationHelper.java b/scorecard_tool/src/java/com/topcoder/scorecard/security/AuthenticationHelper.java deleted file mode 100644 index 8b91926b6..000000000 --- a/scorecard_tool/src/java/com/topcoder/scorecard/security/AuthenticationHelper.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.scorecard.security; - -import java.util.HashSet; -import java.util.Set; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.topcoder.shared.security.SimpleUser; -import org.apache.log4j.Logger; - -import com.topcoder.security.RolePrincipal; -import com.topcoder.security.TCPrincipal; -import com.topcoder.security.TCSubject; -import com.topcoder.shared.dataAccess.DataAccess; -import com.topcoder.shared.dataAccess.Request; -import com.topcoder.shared.dataAccess.resultSet.ResultSetContainer; -import com.topcoder.shared.security.Resource; -import com.topcoder.shared.security.SimpleResource; -import com.topcoder.shared.security.User; -import com.topcoder.shared.util.DBMS; -import com.topcoder.web.common.SimpleRequest; -import com.topcoder.web.common.SimpleResponse; -import com.topcoder.web.common.security.BasicAuthentication; -import com.topcoder.web.common.security.SessionPersistor; - -/** - *

    - * Helper class to be used to authenticate user and user's role. - *

    - * - * @author pvmagacho - * @version 1.0 - * @since System Assembly - Direct TopCoder Scorecard Tool Integration - */ -public class AuthenticationHelper { - - /** - * Scorecard Tool cookie. - */ - public static final String SSO_COOKIE = "direct_sso"; - - /** - *

    Represents the name of the scorecard administrator role.

    - */ - private static final String SCORECARD_ADMIN_ROLE = "Scorecard Administrator"; - - /** - *

    A Logger to be used for logging the events encountered during user authentication.

    - */ - private static final Logger logger = Logger.getLogger(AuthenticationHelper.class); - - /** - * Private constructor. - */ - private AuthenticationHelper() { - // empty - } - - /** - * Creates a new TCSubject instance from user identifier. - * - * @param userId the user login identifier - * @return a new TCSubject instance - * @throws Exception if any error occurs - */ - public static TCSubject getTCSubject(long userId) throws Exception { - DataAccess dataAccessor = new DataAccess(DBMS.TCS_OLTP_DATASOURCE_NAME); - Request request = new Request(); - request.setContentHandle("security_roles"); - request.setProperty("uid", String.valueOf(userId)); - - final ResultSetContainer resultContainer = dataAccessor.getData(request).get("security_roles"); - - final int recordNum = resultContainer.size(); - - Set principals = new HashSet(); - for (int i = 0; i < recordNum; i++) { - long roleId = resultContainer.getLongItem(i, "role_id"); - String description = resultContainer.getStringItem(i, "description"); - - logger.debug("Adding role" + description); - principals.add(new RolePrincipal(description, roleId)); - } - - return new TCSubject(principals, userId); - } - - /** - * Check for scorecard administrator role - * - * @param tcSubject the user to be checked - * @return true if user has scorecard administrator role, false otherwise - */ - @SuppressWarnings("unchecked") - public static boolean isScorecardAdmin(TCSubject tcSubject) { - Set roles = tcSubject.getPrincipals(); - if (roles != null) { - for (RolePrincipal role : roles) { - if (role.getName().equalsIgnoreCase(SCORECARD_ADMIN_ROLE)) { - return true; - } - } - } - return false; - } - - /** - * Get the current user from DIRECT SSO or TC SSO cookie. - * - * @param request the servlet http request - * @param response the servlet http response - * @return the current logged user, null otherwise - * @throws Exception if any error occurs - */ - public static User getCurrentUser(HttpServletRequest request, HttpServletResponse response) throws Exception { - logger.debug("Entering method getCurrentUser"); - // check user in DIRECT SSO cookie (logged from Direct web site) - User user = getUser(request, response, new SimpleResource(SSO_COOKIE)); - - if (user == null || user.isAnonymous()) { - logger.warn("DIRECT SSO cookie not found. Trying TC SSO cookie"); - - // check user in TC SSO cookie (logged from TC web site) - user = getUser(request, response, BasicAuthentication.MAIN_SITE); - - if (user == null || user.isAnonymous()) { - logger.error("No user was found."); - - return new SimpleUser(132456, "heffan", "password"); - } - } - - return user; - } - - - /** - * Removes DIRECT SSO cookie from session. - * - * @param request the servlet http request - * @param response the servlet http response - * @throws Exception if any error occurs - */ - public static void logout(HttpServletRequest request, HttpServletResponse response) throws Exception { - BasicAuthentication auth = new BasicAuthentication(new SessionPersistor(request.getSession()), new SimpleRequest(request), - new SimpleResponse(response), new SimpleResource(SSO_COOKIE), DBMS.JTS_OLTP_DATASOURCE_NAME); - auth.logout(); - } - - /** - * Get user from cookie. - * - * @param request the servlet http request - * @param response the servlet http response - * @param cookie the cookie to use to check user - * @return the current logged user, null otherwise - * @throws Exception if any error occurs - */ - private static User getUser(HttpServletRequest request, HttpServletResponse response, Resource cookie) throws Exception { - BasicAuthentication auth = new BasicAuthentication(new SessionPersistor(request.getSession()), new SimpleRequest(request), - new SimpleResponse(response), cookie, DBMS.JTS_OLTP_DATASOURCE_NAME); - return auth.getUser(); - } -} diff --git a/scorecard_tool/src/templates/artifacts/Controller.groovy b/scorecard_tool/src/templates/artifacts/Controller.groovy deleted file mode 100644 index 310a58115..000000000 --- a/scorecard_tool/src/templates/artifacts/Controller.groovy +++ /dev/null @@ -1,4 +0,0 @@ -@artifact.package@class @artifact.name@ { - - def index = { } -} diff --git a/scorecard_tool/src/templates/artifacts/DomainClass.groovy b/scorecard_tool/src/templates/artifacts/DomainClass.groovy deleted file mode 100644 index 5a611dcde..000000000 --- a/scorecard_tool/src/templates/artifacts/DomainClass.groovy +++ /dev/null @@ -1,5 +0,0 @@ -@artifact.package@class @artifact.name@ { - - static constraints = { - } -} diff --git a/scorecard_tool/src/templates/artifacts/Filters.groovy b/scorecard_tool/src/templates/artifacts/Filters.groovy deleted file mode 100644 index da8ca6042..000000000 --- a/scorecard_tool/src/templates/artifacts/Filters.groovy +++ /dev/null @@ -1,17 +0,0 @@ -@artifact.package@class @artifact.name@ { - - def filters = { - all(controller:'*', action:'*') { - before = { - - } - after = { - - } - afterView = { - - } - } - } - -} diff --git a/scorecard_tool/src/templates/artifacts/Script.groovy b/scorecard_tool/src/templates/artifacts/Script.groovy deleted file mode 100644 index 2ba402050..000000000 --- a/scorecard_tool/src/templates/artifacts/Script.groovy +++ /dev/null @@ -1,7 +0,0 @@ -includeTargets << grailsScript("Init") - -target(main: "The description of the script goes here!") { - // TODO: Implement script here -} - -setDefaultTarget(main) diff --git a/scorecard_tool/src/templates/artifacts/Service.groovy b/scorecard_tool/src/templates/artifacts/Service.groovy deleted file mode 100644 index 9eb1a5e6d..000000000 --- a/scorecard_tool/src/templates/artifacts/Service.groovy +++ /dev/null @@ -1,8 +0,0 @@ -@artifact.package@class @artifact.name@ { - - static transactional = true - - def serviceMethod() { - - } -} diff --git a/scorecard_tool/src/templates/artifacts/TagLib.groovy b/scorecard_tool/src/templates/artifacts/TagLib.groovy deleted file mode 100644 index 8aea148eb..000000000 --- a/scorecard_tool/src/templates/artifacts/TagLib.groovy +++ /dev/null @@ -1,3 +0,0 @@ -@artifact.package@class @artifact.name@ { - -} diff --git a/scorecard_tool/src/templates/artifacts/Tests.groovy b/scorecard_tool/src/templates/artifacts/Tests.groovy deleted file mode 100644 index 37c12e243..000000000 --- a/scorecard_tool/src/templates/artifacts/Tests.groovy +++ /dev/null @@ -1,15 +0,0 @@ -@artifact.package@import grails.test.* - -class @artifact.name@ extends @artifact.superclass@ { - protected void setUp() { - super.setUp() - } - - protected void tearDown() { - super.tearDown() - } - - void testSomething() { - - } -} diff --git a/scorecard_tool/src/templates/artifacts/WebTest.groovy b/scorecard_tool/src/templates/artifacts/WebTest.groovy deleted file mode 100644 index d446d3533..000000000 --- a/scorecard_tool/src/templates/artifacts/WebTest.groovy +++ /dev/null @@ -1,54 +0,0 @@ -class @webtest.name.caps@Test extends grails.util.WebTest { - - // Unlike unit tests, functional tests are often sequence dependent. - // Specify that sequence here. - void suite() { - test@webtest.name.caps@ListNewDelete() - // add tests for more operations here - } - - def test@webtest.name.caps@ListNewDelete() { - webtest('@webtest.name.caps@ basic operations: view list, create new entry, view, edit, delete, view') { - invoke(url:'@webtest.name.lower@') - verifyText(text:'Home') - - verifyListPage(0) - - clickLink(label:'New @webtest.name.caps@') - verifyText(text:'Create @webtest.name.caps@') - clickButton(label:'Create') - verifyText(text:'Show @webtest.name.caps@', description:'Detail page') - clickLink(label:'List', description:'Back to list view') - - verifyListPage(1) - - group(description:'edit the one element') { - clickLink(label:'Show', description:'go to detail view') - clickButton(label:'Edit') - verifyText(text:'Edit @webtest.name.caps@') - clickButton(label:'Update') - verifyText(text:'Show @webtest.name.caps@') - clickLink(label:'List', description:'Back to list view') - } - - verifyListPage(1) - - group(description:'delete the only element') { - clickLink(label:'Show', description:'go to detail view') - clickButton(label:'Delete') - verifyXPath(xpath:"//div[@class='message']", text:/@webtest.name.caps@.*deleted./, regex:true) - } - - verifyListPage(0) - } - } - - String ROW_COUNT_XPATH = "count(//td[@class='actionButtons']/..)" - - def verifyListPage(int count) { - ant.group(description:"verify @webtest.name.caps@ list view with $count row(s)") { - verifyText(text:'@webtest.name.caps@ List') - verifyXPath(xpath:ROW_COUNT_XPATH, text:count, description:"$count row(s) of data expected") - } - } -} \ No newline at end of file diff --git a/scorecard_tool/src/templates/artifacts/hibernate.cfg.xml b/scorecard_tool/src/templates/artifacts/hibernate.cfg.xml deleted file mode 100644 index f0e8dbfed..000000000 --- a/scorecard_tool/src/templates/artifacts/hibernate.cfg.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - diff --git a/scorecard_tool/src/templates/scaffolding/Controller.groovy b/scorecard_tool/src/templates/scaffolding/Controller.groovy deleted file mode 100644 index 14bd3e2ec..000000000 --- a/scorecard_tool/src/templates/scaffolding/Controller.groovy +++ /dev/null @@ -1,110 +0,0 @@ -<%=packageName ? "package ${packageName}\n\n" : ''%>class ${className}Controller { - - static allowedMethods = [save: "POST", update: "POST", delete: "POST"] - - def index = { - redirect(action: "list", params: params) - } - - def list = { - params.max = Math.min(params.max ? params.int('max') : 10, 100) - [${propertyName}List: ${className}.list(params), ${propertyName}Total: ${className}.count()] - } - - def create = { - def ${propertyName} = new ${className}() - ${propertyName}.properties = params - return [${propertyName}: ${propertyName}] - } - - def save = { - def ${propertyName} = new ${className}(params) - if (${propertyName}.save(flush: true)) { - if (${propertyName}.hasErrors()) { - render(view: "create", model: [${propertyName}: ${propertyName}]) - } else { - flash.message = "\${message(code: 'default.created.message', args: [message(code: '${domainClass.propertyName}.label', default: '${className}'), ${propertyName}.id])}" - redirect(action: "show", id: ${propertyName}.id) - } - } - else { - render(view: "create", model: [${propertyName}: ${propertyName}]) - } - } - - def show = { - def ${propertyName} = ${className}.get(params.id) - if (!${propertyName}) { - flash.message = "\${message(code: 'default.not.found.message', args: [message(code: '${domainClass.propertyName}.label', default: '${className}'), params.id])}" - redirect(action: "list") - } - else { - [${propertyName}: ${propertyName}] - } - } - - def edit = { - def ${propertyName} = ${className}.get(params.id) - if (!${propertyName}) { - flash.message = "\${message(code: 'default.not.found.message', args: [message(code: '${domainClass.propertyName}.label', default: '${className}'), params.id])}" - redirect(action: "list") - } - else { - return [${propertyName}: ${propertyName}] - } - } - - def update = { - def ${propertyName} = ${className}.get(params.id) - if (${propertyName}) { - if (params.version) { - def version = params.version.toLong() - if (${propertyName}.version > version) { - <% def lowerCaseName = grails.util.GrailsNameUtils.getPropertyName(className) %> - ${propertyName}.errors.rejectValue("version", "default.optimistic.locking.failure", [message(code: '${domainClass.propertyName}.label', default: '${className}')] as Object[], "Another user has updated this ${className} while you were editing") - render(view: "edit", model: [${propertyName}: ${propertyName}]) - return - } - } - ${propertyName}.properties = params - if (!${propertyName}.hasErrors() && ${propertyName}.save(flush: true)) { - if (${propertyName}.hasErrors()) { - render(view: "edit", model: [${propertyName}: ${propertyName}]) - } else { - flash.message = "\${message(code: 'default.updated.message', args: [message(code: '${domainClass.propertyName}.label', default: '${className}'), ${propertyName}.id])}" - redirect(action: "show", id: ${propertyName}.id) - } - } - else { - render(view: "edit", model: [${propertyName}: ${propertyName}]) - } - } - else { - flash.message = "\${message(code: 'default.not.found.message', args: [message(code: '${domainClass.propertyName}.label', default: '${className}'), params.id])}" - redirect(action: "list") - } - } - - def delete = { - def ${propertyName} = ${className}.get(params.id) - if (${propertyName}) { - try { - ${propertyName}.delete(flush: true) - if (${propertyName}.hasErrors()) { - render(view: "show", model: [${propertyName}: ${propertyName}]) - } else { - flash.message = "\${message(code: 'default.deleted.message', args: [message(code: '${domainClass.propertyName}.label', default: '${className}'), params.id])}" - redirect(action: "list") - } - } - catch (org.springframework.dao.DataIntegrityViolationException e) { - flash.message = "\${message(code: 'default.not.deleted.message', args: [message(code: '${domainClass.propertyName}.label', default: '${className}'), params.id])}" - redirect(action: "show", id: params.id) - } - } - else { - flash.message = "\${message(code: 'default.not.found.message', args: [message(code: '${domainClass.propertyName}.label', default: '${className}'), params.id])}" - redirect(action: "list") - } - } -} diff --git a/scorecard_tool/src/templates/scaffolding/create.gsp b/scorecard_tool/src/templates/scaffolding/create.gsp deleted file mode 100644 index 1adfd6bdc..000000000 --- a/scorecard_tool/src/templates/scaffolding/create.gsp +++ /dev/null @@ -1,61 +0,0 @@ -<% import grails.persistence.Event %> -<% import org.codehaus.groovy.grails.plugins.PluginManagerHolder %> -<%=packageName%> - - - - - - <g:message code="default.create.label" args="[entityName]" /> - - - -
    -

    - -
    \${flash.message}
    -
    - -
    - -
    -
    - > -
    - - - <% excludedProps = Event.allEvents.toList() << 'version' << 'id' << 'dateCreated' << 'lastUpdated' - persistentPropNames = domainClass.persistentProperties*.name - props = domainClass.properties.findAll { persistentPropNames.contains(it.name) && !excludedProps.contains(it.name) } - Collections.sort(props, comparator.constructors[0].newInstance([domainClass] as Object[])) - display = true - boolean hasHibernate = PluginManagerHolder.pluginManager.hasGrailsPlugin('hibernate') - props.each { p -> - if (!Collection.class.isAssignableFrom(p.type)) { - if (hasHibernate) { - cp = domainClass.constrainedProperties[p.name] - display = (cp ? cp.display : true) - } - if (display) { %> - - - - - <% } } } %> - -
    - - - ${renderEditor(p)} -
    -
    -
    - -
    -
    -
    - - diff --git a/scorecard_tool/src/templates/scaffolding/edit.gsp b/scorecard_tool/src/templates/scaffolding/edit.gsp deleted file mode 100644 index ce1f29334..000000000 --- a/scorecard_tool/src/templates/scaffolding/edit.gsp +++ /dev/null @@ -1,64 +0,0 @@ -<% import grails.persistence.Event %> -<% import org.codehaus.groovy.grails.plugins.PluginManagerHolder %> -<%=packageName%> - - - - - - <g:message code="default.edit.label" args="[entityName]" /> - - - -
    -

    - -
    \${flash.message}
    -
    - -
    - -
    -
    - > - - -
    - - - <% excludedProps = Event.allEvents.toList() << 'version' << 'id' << 'dateCreated' << 'lastUpdated' - persistentPropNames = domainClass.persistentProperties*.name - props = domainClass.properties.findAll { persistentPropNames.contains(it.name) && !excludedProps.contains(it.name) } - Collections.sort(props, comparator.constructors[0].newInstance([domainClass] as Object[])) - display = true - boolean hasHibernate = PluginManagerHolder.pluginManager.hasGrailsPlugin('hibernate') - props.each { p -> - if (hasHibernate) { - cp = domainClass.constrainedProperties[p.name] - display = (cp?.display ?: true) - } - if (display) { %> - - - - - <% } } %> - -
    - - - ${renderEditor(p)} -
    -
    -
    - - -
    -
    -
    - - diff --git a/scorecard_tool/src/templates/scaffolding/list.gsp b/scorecard_tool/src/templates/scaffolding/list.gsp deleted file mode 100644 index ccee8917d..000000000 --- a/scorecard_tool/src/templates/scaffolding/list.gsp +++ /dev/null @@ -1,61 +0,0 @@ -<% import grails.persistence.Event %> -<%=packageName%> - - - - - - <g:message code="default.list.label" args="[entityName]" /> - - - -
    -

    - -
    \${flash.message}
    -
    -
    - - - - <% excludedProps = Event.allEvents.toList() << 'version' - allowedNames = domainClass.persistentProperties*.name << 'id' << 'dateCreated' << 'lastUpdated' - props = domainClass.properties.findAll { allowedNames.contains(it.name) && !excludedProps.contains(it.name) && !Collection.isAssignableFrom(it.type) } - Collections.sort(props, comparator.constructors[0].newInstance([domainClass] as Object[])) - props.eachWithIndex { p, i -> - if (true) { - if (p.isAssociation()) { %> - - <% } else { %> - - <% } } } %> - - - - - - <% props.eachWithIndex { p, i -> - if (i == 0) { %> - - <% } else if (true) { - if (p.type == Boolean.class || p.type == boolean.class) { %> - - <% } else if (p.type == Date.class || p.type == java.sql.Date.class || p.type == java.sql.Time.class || p.type == Calendar.class) { %> - - <% } else { %> - - <% } } } %> - - - -
    \${fieldValue(bean: ${propertyName}, field: "${p.name}")}\${fieldValue(bean: ${propertyName}, field: "${p.name}")}
    -
    -
    - -
    -
    - - diff --git a/scorecard_tool/src/templates/scaffolding/renderEditor.template b/scorecard_tool/src/templates/scaffolding/renderEditor.template deleted file mode 100644 index 79e528d4a..000000000 --- a/scorecard_tool/src/templates/scaffolding/renderEditor.template +++ /dev/null @@ -1,174 +0,0 @@ -<% if (property.type == Boolean.class || property.type == boolean.class) - out << renderBooleanEditor(domainClass, property) - else if (Number.class.isAssignableFrom(property.type) || (property.type.isPrimitive() && property.type != boolean.class)) - out << renderNumberEditor(domainClass, property) - else if (property.type == String.class) - out << renderStringEditor(domainClass, property) - else if (property.type == Date.class || property.type == java.sql.Date.class || property.type == java.sql.Time.class || property.type == Calendar.class) - out << renderDateEditor(domainClass, property) - else if (property.type == URL.class) - out << renderStringEditor(domainClass, property) - else if (property.isEnum()) - out << renderEnumEditor(domainClass, property) - else if (property.type == TimeZone.class) - out << renderSelectTypeEditor("timeZone", domainClass, property) - else if (property.type == Locale.class) - out << renderSelectTypeEditor("locale", domainClass, property) - else if (property.type == Currency.class) - out << renderSelectTypeEditor("currency", domainClass, property) - else if (property.type==([] as Byte[]).class) //TODO: Bug in groovy means i have to do this :( - out << renderByteArrayEditor(domainClass, property) - else if (property.type==([] as byte[]).class) //TODO: Bug in groovy means i have to do this :( - out << renderByteArrayEditor(domainClass, property) - else if (property.manyToOne || property.oneToOne) - out << renderManyToOne(domainClass, property) - else if ((property.oneToMany && !property.bidirectional) || (property.manyToMany && property.isOwningSide())) - out << renderManyToMany(domainClass, property) - else if (property.oneToMany) - out << renderOneToMany(domainClass, property) - - private renderEnumEditor(domainClass, property) { - return "" - } - - private renderStringEditor(domainClass, property) { - if (!cp) { - return "" - } - else { - if ("textarea" == cp.widget || (cp.maxSize > 250 && !cp.password && !cp.inList)) { - return "" - } - else { - if (cp.inList) { - return "" - } - else { - def sb = new StringBuffer("" - return sb.toString() - } - } - } - } - - private renderByteArrayEditor(domainClass, property) { - return "" - } - - private renderManyToOne(domainClass,property) { - if (property.association) { - return "" - } - } - - private renderManyToMany(domainClass, property) { - return "" - } - - private renderOneToMany(domainClass, property) { - def sw = new StringWriter() - def pw = new PrintWriter(sw) - pw.println() - pw.println "
      " - pw.println "" - pw.println "
    • \${${property.name[0]}?.encodeAsHTML()}
    • " - pw.println "
      " - pw.println "
    " - pw.println "\${message(code: 'default.add.label', args: [message(code: '${property.referencedDomainClass.propertyName}.label', default: '${property.referencedDomainClass.shortName}')])}" - return sw.toString() - } - - private renderNumberEditor(domainClass, property) { - if (!cp) { - if (property.type == Byte.class) { - return "" - } - else { - return "" - } - } - else { - if (cp.range) { - return "" - } - else if (cp.inList) { - return "" - } - else { - return "" - } - } - } - - private renderBooleanEditor(domainClass, property) { - if (!cp) { - return "" - } - else { - def sb = new StringBuffer(" - sb << "${k}=\"${v}\" " - } - sb << "value=\"\${${domainInstance}?.${property.name}}\" />" - return sb.toString() - } - } - - private renderDateEditor(domainClass, property) { - def precision = (property.type == Date.class || property.type == java.sql.Date.class || property.type == Calendar.class) ? "day" : "minute"; - if (!cp) { - return "" - } - else { - if (!cp.editable) { - return "\${${domainInstance}?.${property.name}?.toString()}" - } - else { - def sb = new StringBuffer(" - sb << "${k}=\"${v}\" " - } - sb << "precision=\"${precision}\" value=\"\${${domainInstance}?.${property.name}}\" ${renderNoSelection(property)} />" - return sb.toString() - } - } - } - - private renderSelectTypeEditor(type, domainClass,property) { - if (!cp) { - return "" - } - else { - def sb = new StringBuffer(" - sb << "${k}=\"${v}\" " - } - sb << "value=\"\${${domainInstance}?.${property.name}}\" ${renderNoSelection(property)} />" - return sb.toString() - } - } - - private renderNoSelection(property) { - if (property.optional) { - if (property.manyToOne || property.oneToOne) { - return "noSelection=\"['null': '']\"" - } - else if (property.type == Date.class || property.type == java.sql.Date.class || property.type == java.sql.Time.class || property.type == Calendar.class) { - return "default=\"none\" noSelection=\"['': '']\"" - } - else { - return "noSelection=\"['': '']\"" - } - } - return "" - } -%> \ No newline at end of file diff --git a/scorecard_tool/src/templates/scaffolding/show.gsp b/scorecard_tool/src/templates/scaffolding/show.gsp deleted file mode 100644 index d40ca8cbd..000000000 --- a/scorecard_tool/src/templates/scaffolding/show.gsp +++ /dev/null @@ -1,69 +0,0 @@ -<% import grails.persistence.Event %> -<%=packageName%> - - - - - - <g:message code="default.show.label" args="[entityName]" /> - - - -
    -

    - -
    \${flash.message}
    -
    - -
    - -
    -
    -
    - - - <% excludedProps = Event.allEvents.toList() << 'version' - allowedNames = domainClass.persistentProperties*.name << 'id' << 'dateCreated' << 'lastUpdated' - props = domainClass.properties.findAll { allowedNames.contains(it.name) && !excludedProps.contains(it.name) } - Collections.sort(props, comparator.constructors[0].newInstance([domainClass] as Object[])) - props.each { p -> %> - - - <% if (p.isEnum()) { %> - - <% } else if (p.oneToMany || p.manyToMany) { %> - - <% } else if (p.manyToOne || p.oneToOne) { %> - - <% } else if (p.type == Boolean.class || p.type == boolean.class) { %> - - <% } else if (p.type == Date.class || p.type == java.sql.Date.class || p.type == java.sql.Time.class || p.type == Calendar.class) { %> - - <% } else if(!p.type.isArray()) { %> - - <% } %> - - <% } %> - -
    \${${propertyName}?.${p.name}?.encodeAsHTML()} -
      - -
    • \${${p.name[0]}?.encodeAsHTML()}
    • -
      -
    -
    \${${propertyName}?.${p.name}?.encodeAsHTML()}\${fieldValue(bean: ${propertyName}, field: "${p.name}")}
    -
    -
    - - - - - -
    -
    - - diff --git a/scorecard_tool/src/templates/war/web.xml b/scorecard_tool/src/templates/war/web.xml deleted file mode 100644 index f2ec4903f..000000000 --- a/scorecard_tool/src/templates/war/web.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - /scorecard - - - - - contextConfigLocation - /WEB-INF/applicationContext.xml - - - - webAppRootKey - /scorecard - - - - - - sitemesh - org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter - - - - charEncodingFilter - org.springframework.web.filter.DelegatingFilterProxy - - targetBeanName - characterEncodingFilter - - - targetFilterLifecycle - true - - - - - charEncodingFilter - /* - - - - sitemesh - /* - - - - org.codehaus.groovy.grails.web.util.Log4jConfigListener - - - - org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener - - - - - grails - org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet - 1 - - - - - gsp - org.codehaus.groovy.grails.web.pages.GroovyPagesServlet - - - - gsp - *.gsp - - - - - index.html - index.jsp - index.gsp - - - - - http://java.sun.com/jsp/jstl/core - /WEB-INF/tld/c.tld - - - http://java.sun.com/jsp/jstl/fmt - /WEB-INF/tld/fmt.tld - - - http://www.springframework.org/tags - /WEB-INF/tld/spring.tld - - - http://grails.codehaus.org/tags - /WEB-INF/tld/grails.tld - - - - \ No newline at end of file diff --git a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ProjectCategoryIntegrationTests.groovy b/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ProjectCategoryIntegrationTests.groovy deleted file mode 100644 index b0034551e..000000000 --- a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ProjectCategoryIntegrationTests.groovy +++ /dev/null @@ -1,449 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import grails.test.* -import groovyx.net.http.RESTClient - -/** - * This class is integration test cases for ProjectCategory domain. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class ProjectCategoryIntegrationTests extends GroovyTestCase { - /** - * A ProjectType instance to persists to database for test. - */ - ProjectType aProjectType - - /** - * Set up the test environment. - */ - protected void setUp() { - super.setUp() - - aProjectType = new ProjectType( - name:'type', - description:'desc', - isGeneric:true, - createUser:'root', - modifyUser:'root' - ) - - aProjectType.save(flush:true) - } - - /** - * Tear down the test environment - */ - protected void tearDown() { - super.tearDown() - - ProjectType.findByName('type').delete(flush:true) - } - - /** - * Test the the project category name cannot be null. - */ - void testNameNull() { - // project category name is null - def projectCategory = new ProjectCategory( - description:'description', - display:true, - displayOrder:1, - projectType:aProjectType, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectCategory.validate() - assertEquals "There should be only 1 error", 1, projectCategory.errors.getAllErrors().size() - def badField = projectCategory.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - } - - /** - * Test the project category name cannot be blank. - */ - void testNameBlank() { - // project category name is blank - def projectCategory = new ProjectCategory( - name:' ', - description:'description', - display:true, - displayOrder:1, - projectType:aProjectType, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectCategory.validate() - assertEquals "There should be only 1 error", 1, projectCategory.errors.getAllErrors().size() - def badField = projectCategory.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - } - - /** - * Test the project category name under a specific project type must be unique. - */ - void testNameUnique() { - // create a project category instance - def p = new ProjectCategory( - name:'type', - description:'description', - display:true, - displayOrder:1, - projectType:aProjectType, - createUser:'root', - modifyUser:'root' - ) - p.save(flush:true) - - // try to create another category instance with the same name and project type - def projectCategory = new ProjectCategory( - name:'type', - description:'description', - display:true, - displayOrder:1, - projectType:aProjectType, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectCategory.validate() - assertEquals "There should be only 1 error", 1, projectCategory.errors.getAllErrors().size() - def badField = projectCategory.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - - p.delete() - } - - /** - * Test the max size of the project category name. - */ - void testNameMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def projectCategory = new ProjectCategory( - name:sb, - description:'description', - display:true, - displayOrder:1, - projectType:aProjectType, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectCategory.validate() - assertEquals "There should be only 1 error", 1, projectCategory.errors.getAllErrors().size() - def badField = projectCategory.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - } - - /** - * Test that the project category description cannot be null. - */ - void testDescriptionNull() { - // description is null - def projectCategory = new ProjectCategory( - name:'type', - display:true, - displayOrder:1, - projectType:aProjectType, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectCategory.validate() - assertEquals "There should be only 1 error", 1, projectCategory.errors.getAllErrors().size() - def badField = projectCategory.errors.getFieldError('description') - assertNotNull "Expecting to find an error on the description field", badField - } - - /** - * Test that the project category description cannot be blank. - */ - void testDescriptionBlank() { - // description is blank - def projectCategory = new ProjectCategory( - name:'type', - description:' ', - display:true, - displayOrder:1, - projectType:aProjectType, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectCategory.validate() - assertEquals "There should be only 1 error", 1, projectCategory.errors.getAllErrors().size() - def badField = projectCategory.errors.getFieldError('description') - assertNotNull "Expecting to find an error on the description field", badField - } - - /** - * Test the max size of project category description. - */ - void testDescriptionMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 255; i++) { - sb.append 'a' - } - def projectCategory = new ProjectCategory( - name:'type', - description:sb, - display:true, - displayOrder:1, - projectType:aProjectType, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectCategory.validate() - assertEquals "There should be only 1 error", 1, projectCategory.errors.getAllErrors().size() - def badField = projectCategory.errors.getFieldError('description') - assertNotNull "Expecting to find an error on the description field", badField - } - - /** - * Test the display field cannot be null. - */ - void testDisplayNull() { - // display field is null - def projectCategory = new ProjectCategory( - name:'type', - description:'desc', - displayOrder:1, - projectType:aProjectType, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectCategory.validate() - assertEquals "There should be only 1 error", 1, projectCategory.errors.getAllErrors().size() - def badField = projectCategory.errors.getFieldError('display') - assertNotNull "Expecting to find an error on the description field", badField - } - - /** - * Test the display order field cannot be null. - */ - void testDisplayOrderNull() { - // display order field is null - def projectCategory = new ProjectCategory( - name:'type', - description:'desc', - display:true, - projectType:aProjectType, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectCategory.validate() - assertEquals "There should be only 1 error", 1, projectCategory.errors.getAllErrors().size() - def badField = projectCategory.errors.getFieldError('displayOrder') - assertNotNull "Expecting to find an error on the description field", badField - } - - /** - * Test that the display order field must be non-negative. - */ - void testDisplayOrderNegative() { - def projectCategory = new ProjectCategory( - name:'type', - description:'desc', - display:true, - displayOrder:-1, - projectType:aProjectType, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectCategory.validate() - assertEquals "There should be only 1 error", 1, projectCategory.errors.getAllErrors().size() - def badField = projectCategory.errors.getFieldError('displayOrder') - assertNotNull "Expecting to find an error on the description field", badField - } - - /** - * Test that the project type field cannot be null. - */ - void testProjectTypeNull() { - def projectCategory = new ProjectCategory( - name:'type', - description:'desc', - display:true, - displayOrder:1, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectCategory.validate() - assertEquals "There should be only 1 error", 1, projectCategory.errors.getAllErrors().size() - def badField = projectCategory.errors.getFieldError('projectType') - assertNotNull "Expecting to find an error on the description field", badField - } - - /** - * Test that the create user field cannot be blank. - */ - void testCreateUserBlank() { - def projectCategory = new ProjectCategory( - name:'name', - description:'description', - display:true, - displayOrder:1, - projectType:aProjectType, - createUser:' ', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectCategory.validate() - assertEquals "There should be only 1 error", 1, projectCategory.errors.getAllErrors().size() - def badField = projectCategory.errors.getFieldError('createUser') - assertNotNull "Expecting to find an error on the createUser field", badField - } - - /** - * Test the max size of create user field. - */ - void testCreateUserMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def projectCategory = new ProjectCategory( - name:'name', - description:'description', - display:true, - displayOrder:1, - projectType:aProjectType, - createUser:sb, - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectCategory.validate() - assertEquals "There should be only 1 error", 1, projectCategory.errors.getAllErrors().size() - def badField = projectCategory.errors.getFieldError('createUser') - assertNotNull "Expecting to find an error on the createUser field", badField - } - - /** - * Test that the modify user field cannot be blank. - */ - void testModifyUserBlank() { - def projectCategory = new ProjectCategory( - name:'name', - description:'description', - display:true, - displayOrder:1, - projectType:aProjectType, - createUser:'root', - modifyUser:' ' - ) - - assertFalse "Validation should not succeed", projectCategory.validate() - assertEquals "There should be only 1 error", 1, projectCategory.errors.getAllErrors().size() - def badField = projectCategory.errors.getFieldError('modifyUser') - assertNotNull "Expecting to find an error on the modifyUser field", badField - } - - /** - * Test the max size of the modify user field. - */ - void testModifyUserMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def projectCategory = new ProjectCategory( - name:'name', - description:'description', - display:true, - displayOrder:1, - projectType:aProjectType, - createUser:'root', - modifyUser:sb - ) - - assertFalse "Validation should not succeed", projectCategory.validate() - assertEquals "There should be only 1 error", 1, projectCategory.errors.getAllErrors().size() - def badField = projectCategory.errors.getFieldError('modifyUser') - assertNotNull "Expecting to find an error on the modifyUser field", badField - } - - /** - * Test the project category name can be the same if the project type is different. - */ - void testSameNameWithDifferentProjectType() { - // create a different project type - def projectType = new ProjectType( - name:'type2', - description:'desc', - isGeneric:true, - createUser:'root', - modifyUser:'root' - ) - projectType.save(flush:true) - - // create a project category whose project type is the first project type - def projectCategory = new ProjectCategory( - name:'name', - description:'description', - display:true, - displayOrder:1, - projectType:aProjectType, - createUser:'root', - modifyUser:'root' - ) - projectCategory.save(flush:true) - - // try to create a project category with the same name whose project type is the second project type - def projectCategory2 = new ProjectCategory( - name:'name', - description:'description', - display:true, - displayOrder:1, - projectType:projectType, - createUser:'root', - modifyUser:'root' - ) - assertTrue "Validation should succeed", projectCategory2.validate() - - projectCategory.delete(flush:true) - projectType.delete(flush:true) - } - - /** - * Test that the ORM mapping can work. - */ - void testMapping() { - def projectCategory = new ProjectCategory( - name:'name', - description:'description', - display:true, - displayOrder:1, - projectType:aProjectType, - createUser:'root', - modifyUser:'root' - ) - projectCategory.save(flush:true) - - def reteiveProjectCategory = ProjectCategory.findByName('name') - assertNotNull 'The object should be persistence to the database', reteiveProjectCategory - assertEquals reteiveProjectCategory.name, projectCategory.name - assertEquals reteiveProjectCategory.description, projectCategory.description - assertEquals reteiveProjectCategory.display, projectCategory.display - assertEquals reteiveProjectCategory.displayOrder, projectCategory.displayOrder - assertEquals reteiveProjectCategory.projectType.id, projectCategory.projectType.id - assertEquals reteiveProjectCategory.createUser, projectCategory.createUser - assertEquals reteiveProjectCategory.modifyUser, projectCategory.modifyUser - assertNotNull reteiveProjectCategory.dateCreated - assertNotNull reteiveProjectCategory.lastUpdated - projectCategory.delete(flush:true) - } -} diff --git a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ProjectCategoryRESTfulTests.groovy b/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ProjectCategoryRESTfulTests.groovy deleted file mode 100644 index 50b85c54a..000000000 --- a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ProjectCategoryRESTfulTests.groovy +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Copyright (C) 2011 TopCoder Inc., All Rights Reserved. -*/ -package com.topcoder.admin.scorecards; - -import static org.junit.Assert.* -import groovyx.net.http.ContentType -import groovyx.net.http.HttpResponseException -import groovyx.net.http.RESTClient - -import org.junit.After -import org.junit.Before -import org.junit.Test - -/** - * This class is unit test class for the RESTful service of ProjectCategory - * domain. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class ProjectCategoryRESTfulTests extends GroovyTestCase { - /** - * Set up the environment. - */ - public void setUp() throws Exception { - } - - /** - * Tear down the environment. - */ - public void tearDown() throws Exception { - } - - /** - * Test the RESTful functionality. - */ - void testRESTfulCURD() { - def client = new RESTClient("http://localhost:8080/scorecard_tool/json/") - def response - - // first, we create a project type for test - response = client.post( - path: "project-type", - body: [ data: [ name: "test project type", description: "test project type", isGeneric: false, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def projectTypeId = response.data.data.id - - // POST, create a new instance - response = client.post( - path: "project-category", - body: [ data: [ name: "test project category", description: "test project category", display: true, displayOrder: 1, projectType: projectTypeId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - assertEquals "test project category", response.data.data.name - assertEquals "test project category", response.data.data.description - assertTrue response.data.data.display - assertEquals 1, response.data.data.displayOrder - assertEquals projectTypeId, response.data.data.projectType - - def id = response.data.data.id - - // GET (list) - response = client.get(path: "project-category") - assertTrue response.data.success - - // GET (single item) - response = client.get(path: "project-category/${id}") - assertTrue response.data.success - assertEquals "test project category", response.data.data.name - assertEquals "test project category", response.data.data.description - assertTrue response.data.data.display - assertEquals 1, response.data.data.displayOrder - assertEquals projectTypeId, response.data.data.projectType - - // PUT - response = client.put( - path: "project-category/${id}", - body: [ data: [ name: "test project category2", description: "test project category2", display: false, displayOrder: 2, projectType: projectTypeId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - assertEquals "test project category2", response.data.data.name - assertEquals "test project category2", response.data.data.description - assertFalse response.data.data.display - assertEquals 2, response.data.data.displayOrder - assertEquals projectTypeId, response.data.data.projectType - - // DELETE - response = client.delete(path: "project-category/${id}") - assertTrue response.data.success - assertEquals "test project category2", response.data.data.name - assertEquals "test project category2", response.data.data.description - - // verify the item is deleted - try { - response = client.get(path: "project-category/${id}") - fail "the item should be deleted" - } catch (HttpResponseException e) { - assert e.response.status == 404 - assert e.response.data.success == false - assert e.response.data.message.contains("not found") - } - - response = client.delete(path: "project-type/${projectTypeId}") - assertTrue response.data.success - } - - /** - * Error will occurs when saving the instance. - */ - void testRESTfulSavingFail() { - def client = new RESTClient("http://localhost:8080/scorecard_tool/json/") - try { - client.post( - path: "project-category", - body: [ data: [ : ] ], - requestContentType : ContentType.JSON.toString() - ) - fail "Should throw HttpResponseException" - } catch (HttpResponseException e) { - assert e.response.status == 500 - assert e.response.data.success == false - assert e.response.data.message.contains("null") - } - } -} diff --git a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ProjectTypeIntegrationTests.groovy b/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ProjectTypeIntegrationTests.groovy deleted file mode 100644 index 6fe8d230c..000000000 --- a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ProjectTypeIntegrationTests.groovy +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import grails.test.* - -/** - * This class is integration test cases for ProjectType domain. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class ProjectTypeIntegrationTests extends GroovyTestCase { - /** - * Set up the test environment. - */ - protected void setUp() { - super.setUp() - } - - /** - * Tear down the test environment - */ - protected void tearDown() { - super.tearDown() - } - - /** - * Test that the project type name cannot be null. - */ - void testNameNull() { - def projectType = new ProjectType( - description:'description', - isGeneric:true, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectType.validate() - assertEquals "There should be only 1 error", 1, projectType.errors.getAllErrors().size() - def badField = projectType.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - } - - /** - * Test that the project type name cannot be blank. - */ - void testNameBlank() { - def projectType = new ProjectType( - name:' ', - description:'description', - isGeneric:true, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectType.validate() - assertEquals "There should be only 1 error", 1, projectType.errors.getAllErrors().size() - def badField = projectType.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - } - - /** - * Test that the project type name must be unique. - */ - void testNameUnique() { - // create a project type first - def p = new ProjectType( - name:'type', - description:'description', - isGeneric:true, - createUser:'root', - modifyUser:'root' - ) - p.save(flush:true) - - // try to create another project type with the same name - def projectType = new ProjectType( - name:'type', - description:'description', - isGeneric:true, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectType.validate() - assertEquals "There should be only 1 error", 1, projectType.errors.getAllErrors().size() - def badField = projectType.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - - p.delete() - } - - /** - * Test the max size of the project type name. - */ - void testNameMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def projectType = new ProjectType( - name:sb, - description:'description', - isGeneric:true, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectType.validate() - assertEquals "There should be only 1 error", 1, projectType.errors.getAllErrors().size() - def badField = projectType.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - } - - /** - * Test that the project type description cannot be null. - */ - void testDescriptionNull() { - def projectType = new ProjectType( - name:'type', - isGeneric:true, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectType.validate() - assertEquals "There should be only 1 error", 1, projectType.errors.getAllErrors().size() - def badField = projectType.errors.getFieldError('description') - assertNotNull "Expecting to find an error on the description field", badField - } - - /** - * Test that the project type description cannot be blank. - */ - void testDescriptionBlank() { - def projectType = new ProjectType( - name:'type', - description:' ', - isGeneric:true, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectType.validate() - assertEquals "There should be only 1 error", 1, projectType.errors.getAllErrors().size() - def badField = projectType.errors.getFieldError('description') - assertNotNull "Expecting to find an error on the description field", badField - } - - /** - * Test the max size of the project type description. - */ - void testDescriptionMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 255; i++) { - sb.append 'a' - } - def projectType = new ProjectType( - name:'type', - description:sb, - isGeneric:true, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectType.validate() - assertEquals "There should be only 1 error", 1, projectType.errors.getAllErrors().size() - def badField = projectType.errors.getFieldError('description') - assertNotNull "Expecting to find an error on the description field", badField - } - - /** - * Test that the isGeneric field cannot be null. - */ - void testIsGenericNull() { - def projectType = new ProjectType( - name:'type', - description:'desc', - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectType.validate() - assertEquals "There should be only 1 error", 1, projectType.errors.getAllErrors().size() - def badField = projectType.errors.getFieldError('isGeneric') - assertNotNull "Expecting to find an error on the isGeneric field", badField - } - - /** - * Test that the create user field cannot be blank. - */ - void testCreateUserBlank() { - def projectType = new ProjectType( - name:'type', - description:'desc', - isGeneric:true, - createUser:' ', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectType.validate() - assertEquals "There should be only 1 error", 1, projectType.errors.getAllErrors().size() - def badField = projectType.errors.getFieldError('createUser') - assertNotNull "Expecting to find an error on the createUser field", badField - } - - /** - * Test the max size of create user field. - */ - void testCreateUserMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def projectType = new ProjectType( - name:'type', - description:'desc', - isGeneric:true, - createUser:sb, - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", projectType.validate() - assertEquals "There should be only 1 error", 1, projectType.errors.getAllErrors().size() - def badField = projectType.errors.getFieldError('createUser') - assertNotNull "Expecting to find an error on the createUser field", badField - } - - /** - * Test that the modify user field cannot be blank. - */ - void testModifyUserBlank() { - def projectType = new ProjectType( - name:'type', - description:'desc', - isGeneric:true, - createUser:'root', - modifyUser:' ' - ) - - assertFalse "Validation should not succeed", projectType.validate() - assertEquals "There should be only 1 error", 1, projectType.errors.getAllErrors().size() - def badField = projectType.errors.getFieldError('modifyUser') - assertNotNull "Expecting to find an error on the modifyUser field", badField - } - - /** - * Test the max size of the modify user field. - */ - void testModifyUserMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def projectType = new ProjectType( - name:'type', - description:'desc', - isGeneric:true, - createUser:'root', - modifyUser:sb - ) - - assertFalse "Validation should not succeed", projectType.validate() - assertEquals "There should be only 1 error", 1, projectType.errors.getAllErrors().size() - def badField = projectType.errors.getFieldError('modifyUser') - assertNotNull "Expecting to find an error on the modifyUser field", badField - } - - /** - * Test that the ORM mapping can work. - */ - void testMapping() { - def projectType = new ProjectType( - name:'type', - description:'desc', - isGeneric:true, - createUser:'root', - modifyUser:'root' - ) - - projectType.save(flush:true) - - def retrieveProjectType = ProjectType.findByName('type') - assertNotNull 'The object should be persistence to the database', retrieveProjectType - assertEquals retrieveProjectType.name, projectType.name - assertEquals retrieveProjectType.description, projectType.description - assertEquals retrieveProjectType.isGeneric, projectType.isGeneric - assertEquals retrieveProjectType.createUser, projectType.createUser - assertEquals retrieveProjectType.modifyUser, projectType.modifyUser - assertNotNull retrieveProjectType.dateCreated - assertNotNull retrieveProjectType.lastUpdated - - retrieveProjectType.delete() - } -} diff --git a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ProjectTypeRESTfulTests.groovy b/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ProjectTypeRESTfulTests.groovy deleted file mode 100644 index e8fc15119..000000000 --- a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ProjectTypeRESTfulTests.groovy +++ /dev/null @@ -1,112 +0,0 @@ -/* -* Copyright (C) 2011 TopCoder Inc., All Rights Reserved. -*/ -package com.topcoder.admin.scorecards - -import grails.test.* -import groovyx.net.http.ContentType -import groovyx.net.http.HttpResponseException -import groovyx.net.http.RESTClient - - -/** -* This class is unit test class for the RESTful service of ProjectType -* domain. -* -* @author TCSASSEMBER -* @version 1.0 -*/ -class ProjectTypeRESTfulTests extends GroovyTestCase { - /** - * Set up the environment. - */ - protected void setUp() { - super.setUp() - } - - /** - * Tear down the environment. - */ - protected void tearDown() { - super.tearDown() - } - - /** - * Test the RESTful functionality. - */ - void testRESTfulCURD() { - def client = new RESTClient("http://localhost:8080/scorecard_tool/json/") - def response - - // POST, create a new instance - response = client.post( - path: "project-type", - body: [ data: [ name: "test project type", description: "test project type", isGeneric: false, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - assertEquals "test project type", response.data.data.name - assertEquals "test project type", response.data.data.description - assertFalse response.data.data.isGeneric - - def id = response.data.data.id - - // GET (list) - response = client.get(path: "project-type") - assertTrue response.data.success - - // GET (single item) - response = client.get(path: "project-type/${id}") - assertTrue response.data.success - assertEquals "test project type", response.data.data.name - assertEquals "test project type", response.data.data.description - assertFalse response.data.data.isGeneric - - // PUT - response = client.put( - path: "project-type/${id}", - body: [ data: [ name: "test project type2", description: "test project type2", isGeneric: true, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - assertEquals "test project type2", response.data.data.name - assertEquals "test project type2", response.data.data.description - assertTrue response.data.data.isGeneric - - // DELETE - response = client.delete(path: "project-type/${id}") - assertTrue response.data.success - assertEquals "test project type2", response.data.data.name - assertEquals "test project type2", response.data.data.description - assertTrue response.data.data.isGeneric - - // verify the item is deleted - try { - response = client.get(path: "project-type/${id}") - fail "the item should be deleted" - } catch (HttpResponseException e) { - assert e.response.status == 404 - assert e.response.data.success == false - assert e.response.data.message.contains("not found") - } - } - - /** - * Error will occurs when saving the instance. - */ - void testRESTfulSavingFail() { - def client = new RESTClient("http://localhost:8080/scorecard_tool/json/") - try { - client.post( - path: "project-type", - body: [ data: [ : ] ], - requestContentType : ContentType.JSON.toString() - ) - fail "Should throw HttpResponseException" - } catch (HttpResponseException e) { - assert e.response.status == 500 - assert e.response.data.success == false - assert e.response.data.message.contains("null") - } - } -} diff --git a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardGroupIntegrationTests.groovy b/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardGroupIntegrationTests.groovy deleted file mode 100644 index 0d6db0e41..000000000 --- a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardGroupIntegrationTests.groovy +++ /dev/null @@ -1,585 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import grails.test.* - -import org.hibernate.SessionFactory - -/** - * This class is integration test cases for ScorecardGroup domain. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class ScorecardGroupIntegrationTests extends GroovyTestCase { - /** - * Represents the Hibernate session factory. It will be injected by grails framework. - */ - SessionFactory sessionFactory - - /** - * A ProjectType instance to persists to database for test. - */ - ProjectType projectType - - /** - * A ProjectCategory instance to persists to database for test. - */ - ProjectCategory projectCategory - - /** - * A ScorecardType instance to persists to database for test. - */ - ScorecardType scorecardType - - /** - * A ScorecardStatus instance to persists to database for test. - */ - ScorecardStatus scorecardStatus - - /** - * A Scorecard instance to persists to database for test. - */ - Scorecard scorecard - - /** - * Set up the test environment. - */ - protected void setUp() { - super.setUp() - - projectType = new ProjectType( - name:'Application', - description:'Application', - isGeneric:false, - createUser:'root', - modifyUser:'root' - ); - projectType.save() - - projectCategory = new ProjectCategory( - name:'Assembly', - description:'Assembly', - display:true, - displayOrder:1, - projectType:projectType, - createUser:'root', - modifyUser:'root' - ); - projectCategory.save() - - scorecardType = new ScorecardType( - name:'Screening', - description:'Screening', - createUser:'root', - modifyUser:'root' - ); - scorecardType.save() - - scorecardStatus = new ScorecardStatus( - name:'Active', - description:'Active', - createUser:'root', - modifyUser:'root'); - scorecardStatus.save() - - scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - scorecard.save() - } - - /** - * Tear down the test environment - */ - protected void tearDown() { - super.tearDown() - - scorecard.delete() - projectCategory.delete() - projectType.delete() - scorecardType.delete() - scorecardStatus.delete() - } - - /** - * Test that the group name cannot be null. - */ - void testGroupNameNull() { - def scorecardGroup = new ScorecardGroup( - weight:100.0, - sort:1, - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardGroup.validate() - assertEquals "There should be only 1 error", 1, scorecardGroup.errors.getAllErrors().size() - def badField = scorecardGroup.errors.getFieldError('groupName') - assertNotNull "Expecting to find an error on the groupName field", badField - } - - /** - * Test that the group name cannot be blank. - */ - void testGroupNameBlank() { - def scorecardGroup = new ScorecardGroup( - groupName:' ', - weight:100.0, - sort:1, - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardGroup.validate() - assertEquals "There should be only 1 error", 1, scorecardGroup.errors.getAllErrors().size() - def badField = scorecardGroup.errors.getFieldError('groupName') - assertNotNull "Expecting to find an error on the groupName field", badField - } - - /** - * Test the max size of the group name. - */ - void testGroupNameMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def scorecardGroup = new ScorecardGroup( - groupName:sb, - weight:100.0, - sort:1, - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardGroup.validate() - assertEquals "There should be only 1 error", 1, scorecardGroup.errors.getAllErrors().size() - def badField = scorecardGroup.errors.getFieldError('groupName') - assertNotNull "Expecting to find an error on the groupName field", badField - } - - /** - * Test that the group name under the same scorecard must be unique. - */ - void testGroupNameUnique() { - // create a scorecard group first - def scorecardGroup = new ScorecardGroup( - groupName:'group', - weight:100.0, - sort:1, - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - scorecardGroup.save(flush:true) - - // try to create another scorecard with the same group name and scorecard - def scorecardGroup2 = new ScorecardGroup( - groupName:'group', - weight:100.0, - sort:1, - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - assertFalse "Validation should not succeed", scorecardGroup2.validate() - assertEquals "There should be only 1 error", 1, scorecardGroup2.errors.getAllErrors().size() - def badField = scorecardGroup2.errors.getFieldError('groupName') - assertNotNull "Expecting to find an error on the groupName field", badField - - scorecardGroup.delete(flush:true) - } - - /** - * Test that the group name can be the same if the scorecard is different - */ - void testGroupNameUnique2() { - // create a new Scorecard - def scorecard2 = new Scorecard( - scorecardName:'name2', - scorecardVersion:'1.0.1', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - scorecard2.save(flush:true) - - // create a scorecard group whose scorecard is the first scorecard - def scorecardGroup = new ScorecardGroup( - groupName:'group', - weight:100.0, - sort:1, - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - scorecardGroup.save(flush:true) - - // try to create another scorecard group with the same group name whose scorecard is the second scorecard - def scorecardGroup2 = new ScorecardGroup( - groupName:'group', - weight:100.0, - sort:1, - scorecard:scorecard2, - createUser:'root', - modifyUser:'root' - ) - assertTrue "Validation should succeed", scorecardGroup2.validate() - scorecardGroup.delete(flush:true) - scorecard2.delete(flush:true) - } - - /** - * Test that the weight field cannot be null. - */ - void testWeightNull() { - def scorecardGroup = new ScorecardGroup( - groupName:'name', - sort:1, - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardGroup.validate() - assertEquals "There should be only 1 error", 1, scorecardGroup.errors.getAllErrors().size() - def badField = scorecardGroup.errors.getFieldError('weight') - assertNotNull "Expecting to find an error on the weight field", badField - } - - /** - * Test that the weight field must be a number. - */ - void testWeightNotNumber() { - def scorecardGroup = new ScorecardGroup( - groupName:'name', - weight:'asdf', - sort:1, - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardGroup.validate() - assertEquals "There should be only 1 error", 1, scorecardGroup.errors.getAllErrors().size() - def badField = scorecardGroup.errors.getFieldError('weight') - assertNotNull "Expecting to find an error on the weight field", badField - } - - /** - * Test that the weight field cannot be zero. - */ - void testWeightZero() { - def scorecardGroup = new ScorecardGroup( - groupName:'name', - weight:0.0, - sort:1, - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardGroup.validate() - assertEquals "There should be only 1 error", 1, scorecardGroup.errors.getAllErrors().size() - def badField = scorecardGroup.errors.getFieldError('weight') - assertNotNull "Expecting to find an error on the weight field", badField - } - - /** - * Test that the weight field cannot be negative. - */ - void testWeightNegative() { - def scorecardGroup = new ScorecardGroup( - groupName:'name', - weight:-10.0, - sort:1, - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardGroup.validate() - assertEquals "There should be only 1 error", 1, scorecardGroup.errors.getAllErrors().size() - def badField = scorecardGroup.errors.getFieldError('weight') - assertNotNull "Expecting to find an error on the weight field", badField - } - - /** - * Test the max value of the weight field. - */ - void testWeightMax() { - def scorecardGroup = new ScorecardGroup( - groupName:'name', - weight:101.0, - sort:1, - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardGroup.validate() - assertEquals "There should be only 1 error", 1, scorecardGroup.errors.getAllErrors().size() - def badField = scorecardGroup.errors.getFieldError('weight') - assertNotNull "Expecting to find an error on the weight field", badField - } - - /** - * Test that the sort field cannot be null. - */ - void testSortNull() { - def scorecardGroup = new ScorecardGroup( - groupName:'name', - weight:70.0, - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardGroup.validate() - assertEquals "There should be only 1 error", 1, scorecardGroup.errors.getAllErrors().size() - def badField = scorecardGroup.errors.getFieldError('sort') - assertNotNull "Expecting to find an error on the sort field", badField - } - - /** - * Test that the sort field must be a number. - */ - void testSortNotNumber() { - def scorecardGroup = new ScorecardGroup( - groupName:'name', - weight:70.0, - sort:'asdf', - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardGroup.validate() - assertEquals "There should be only 1 error", 1, scorecardGroup.errors.getAllErrors().size() - def badField = scorecardGroup.errors.getFieldError('sort') - assertNotNull "Expecting to find an error on the sort field", badField - } - - /** - * Test that the sort field cannot be negative. - */ - void testSortNegative() { - def scorecardGroup = new ScorecardGroup( - groupName:'name', - weight:70.0, - sort:-1, - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardGroup.validate() - assertEquals "There should be only 1 error", 1, scorecardGroup.errors.getAllErrors().size() - def badField = scorecardGroup.errors.getFieldError('sort') - assertNotNull "Expecting to find an error on the sort field", badField - } - - /** - * Test that the scorecard field cannot be null. - */ - void testScorecardNull() { - def scorecardGroup = new ScorecardGroup( - groupName:'name', - weight:70.0, - sort:1, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardGroup.validate() - assertEquals "There should be only 1 error", 1, scorecardGroup.errors.getAllErrors().size() - def badField = scorecardGroup.errors.getFieldError('scorecard') - assertNotNull "Expecting to find an error on the scorecard field", badField - } - - /** - * Test that the create user field cannot be blank. - */ - void testCreateUserBlank() { - def scorecardGroup = new ScorecardGroup( - groupName:'name', - weight:70.0, - sort:1, - scorecard:scorecard, - createUser:' ', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardGroup.validate() - assertEquals "There should be only 1 error", 1, scorecardGroup.errors.getAllErrors().size() - def badField = scorecardGroup.errors.getFieldError('createUser') - assertNotNull "Expecting to find an error on the createUser field", badField - } - - /** - * Test the max size of create user field. - */ - void testCreateUserMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def scorecardGroup = new ScorecardGroup( - groupName:'name', - weight:70.0, - sort:1, - scorecard:scorecard, - createUser:sb, - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardGroup.validate() - assertEquals "There should be only 1 error", 1, scorecardGroup.errors.getAllErrors().size() - def badField = scorecardGroup.errors.getFieldError('createUser') - assertNotNull "Expecting to find an error on the createUser field", badField - } - - /** - * Test that the modify user field cannot be blank. - */ - void testModifyUserBlank() { - def scorecardGroup = new ScorecardGroup( - groupName:'name', - weight:70.0, - sort:1, - scorecard:scorecard, - createUser:'root', - modifyUser:' ' - ) - - assertFalse "Validation should not succeed", scorecardGroup.validate() - assertEquals "There should be only 1 error", 1, scorecardGroup.errors.getAllErrors().size() - def badField = scorecardGroup.errors.getFieldError('modifyUser') - assertNotNull "Expecting to find an error on the modifyUser field", badField - } - - /** - * Test the max size of the modify user field. - */ - void testModifyUserMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def scorecardGroup = new ScorecardGroup( - groupName:'name', - weight:70.0, - sort:1, - scorecard:scorecard, - createUser:'root', - modifyUser:sb - ) - - assertFalse "Validation should not succeed", scorecardGroup.validate() - assertEquals "There should be only 1 error", 1, scorecardGroup.errors.getAllErrors().size() - def badField = scorecardGroup.errors.getFieldError('modifyUser') - assertNotNull "Expecting to find an error on the modifyUser field", badField - } - - /** - * Test that the scorecard must not be in used when updating/inserting the scorecard group. - */ - void testScorecardInUsed1() { - // create a review for this scorecard so that the scorecard is in used - def review = new Review(scorecard:scorecard) - review.save(flush:true) - - def scorecardGroup = new ScorecardGroup( - groupName:'name', - weight:100.0, - sort:1, - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - assertFalse "Validation should not succeed", scorecardGroup.validate() - assertEquals "There should be only 1 error", 1, scorecardGroup.errors.getAllErrors().size() - def badField = scorecardGroup.errors.getFieldError('scorecard') - assertNotNull "Expecting to find an error on the scorecard field", badField - - review.delete(flush:true) - } - - /** - * Test that the scorecard must not be in used when deleting the scorecard group. - */ - void testScorecardInUsed2() { - // create a new scorecard group - def scorecardGroup = new ScorecardGroup( - groupName:'name', - weight:100.0, - sort:1, - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - scorecardGroup.save(flush:true) - assertFalse "The object should have persisted to database", scorecardGroup.hasErrors() - - // create a review for this scorecard so that the scorecard is in used - def review = new Review(scorecard:scorecard) - scorecard = Scorecard.get(scorecard.id) - review.save(flush:true) - - sessionFactory.getCurrentSession().clear() - - // try to delete the scorecard group - scorecardGroup.delete(flush:true) - assertTrue "There should be errors when delete the scorecard group", scorecardGroup.hasErrors() - - sessionFactory.getCurrentSession().clear() - assertNotNull "The scorecard group should not be deleted", ScorecardGroup.get(scorecardGroup.id) - Review.get(review.id).delete(flush:true) - ScorecardGroup.get(scorecardGroup.id).delete(flush:true) - scorecard = Scorecard.get(scorecard.id) - } - - /** - * Test that the ORM mapping can work. - */ - void testMapping() { - def scorecardGroup = new ScorecardGroup( - groupName:'name', - weight:70.0, - sort:1, - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - scorecardGroup.save(flush:true) - def retrieveScorecardGroup = ScorecardGroup.findByGroupNameAndScorecard('name', scorecard) - assertNotNull "The object should be persisted to the database", retrieveScorecardGroup - assertEquals retrieveScorecardGroup.groupName, scorecardGroup.groupName - assertEquals retrieveScorecardGroup.weight, scorecardGroup.weight - assertEquals retrieveScorecardGroup.sort, scorecardGroup.sort - assertEquals retrieveScorecardGroup.scorecard.id, scorecardGroup.scorecard.id - assertEquals retrieveScorecardGroup.createUser, scorecardGroup.createUser - assertEquals retrieveScorecardGroup.modifyUser, scorecardGroup.modifyUser - assertNotNull retrieveScorecardGroup.dateCreated - assertNotNull retrieveScorecardGroup.lastUpdated - scorecardGroup.delete(flush:true) - } -} diff --git a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardGroupRESTfulTests.groovy b/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardGroupRESTfulTests.groovy deleted file mode 100644 index 4928069a5..000000000 --- a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardGroupRESTfulTests.groovy +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Copyright (C) 2011 TopCoder Inc., All Rights Reserved. -*/ -package com.topcoder.admin.scorecards - -import grails.test.* -import groovyx.net.http.ContentType -import groovyx.net.http.HttpResponseException -import groovyx.net.http.RESTClient - - -/** -* This class is unit test class for the RESTful service of ScorecardGroup -* domain. -* -* @author TCSASSEMBER -* @version 1.0 -*/ -class ScorecardGroupRESTfulTests extends GroovyTestCase { - /** - * Set up the environment. - */ - protected void setUp() { - super.setUp() - } - - /** - * Tear down the environment. - */ - protected void tearDown() { - super.tearDown() - } - - /** - * Test the RESTful functionality. - */ - void testRESTfulCURD() { - def client = new RESTClient("http://localhost:8080/scorecard_tool/json/") - def response - - // first, we create a project type for test - response = client.post( - path: "project-type", - body: [ data: [ name: "test project type", description: "test project type", isGeneric: false, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def projectTypeId = response.data.data.id - - // create a project category for test - response = client.post( - path: "project-category", - body: [ data: [ name: "test project category", description: "test project category", display: true, displayOrder: 1, projectType: projectTypeId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def projectCategoryId = response.data.data.id - - // create a scorecard type first - response = client.post( - path: "scorecard-type", - body: [ data: [ name: "test scorecard type", description: "test scorecard type", dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def scorecardTypeId = response.data.data.id - - // create a socrecard status first - response = client.post( - path: "scorecard-status", - body: [ data: [ name: "test scorecard status", description: "test scorecard status", dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def scorecardStatusId = response.data.data.id - - // create a scorecard first - response = client.post( - path: "scorecard", - body: [ data: [scorecardName: "test scorecard", scorecardVersion: '1.0.0', minimumScore:75.0, maximumScore: 100.0, scorecardType: scorecardTypeId, scorecardStatus: scorecardStatusId, projectCategory: projectCategoryId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - def scorecardId = response.data.data.id - - // POST, create a new instance - response = client.post( - path: "scorecard-group", - body: [ data: [groupName: "test scorecard group", weight: 100.0, sort: 1, scorecard: scorecardId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - assertEquals "test scorecard group", response.data.data.groupName - assertEquals 100.0, response.data.data.weight - assertEquals 1, response.data.data.sort - - def id = response.data.data.id - - // GET (list) - response = client.get(path: "scorecard-group") - assertTrue response.data.success - - // GET (single item) - response = client.get(path: "scorecard-group/${id}") - assertTrue response.data.success - assertEquals "test scorecard group", response.data.data.groupName - assertEquals 100.0, response.data.data.weight - assertEquals 1, response.data.data.sort - - // PUT - response = client.put( - path: "scorecard-group/${id}", - body: [ data: [groupName: "test scorecard group2", weight: 100.0, sort: 2, scorecard: scorecardId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - assertEquals "test scorecard group2", response.data.data.groupName - assertEquals 100.0, response.data.data.weight - assertEquals 2, response.data.data.sort - - // DELETE - response = client.delete(path: "scorecard-group/${id}") - assertTrue response.data.success - assertEquals "test scorecard group2", response.data.data.groupName - assertEquals 100.0, response.data.data.weight - assertEquals 2, response.data.data.sort - - // verify the item is deleted - try { - response = client.get(path: "scorecard-group/${id}") - fail "the item should be deleted" - } catch (HttpResponseException e) { - assert e.response.status == 404 - assert e.response.data.success == false - assert e.response.data.message.contains("not found") - } - - response = client.delete(path: "scorecard/${scorecardId}") - assertTrue response.data.success - - response = client.delete(path: "project-category/${projectCategoryId}") - assertTrue response.data.success - - response = client.delete(path: "project-type/${projectTypeId}") - assertTrue response.data.success - - response = client.delete(path: "scorecard-type/${scorecardTypeId}") - assertTrue response.data.success - - response = client.delete(path: "scorecard-status/${scorecardStatusId}") - assertTrue response.data.success - } - - /** - * Error will occurs when saving the instance. - */ - void testRESTfulSavingFail() { - def client = new RESTClient("http://localhost:8080/scorecard_tool/json/") - try { - client.post( - path: "scorecard-group", - body: [ data: [ : ] ], - requestContentType : ContentType.JSON.toString() - ) - fail "Should throw HttpResponseException" - } catch (HttpResponseException e) { - assert e.response.status == 500 - assert e.response.data.success == false - assert e.response.data.message.contains("null") - } - } -} diff --git a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardIntegrationTests.groovy b/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardIntegrationTests.groovy deleted file mode 100644 index 8ef0064b0..000000000 --- a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardIntegrationTests.groovy +++ /dev/null @@ -1,789 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import grails.test.* - -import org.hibernate.SessionFactory - -/** - * This class is integration test cases for Scorecard domain. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class ScorecardIntegrationTests extends GroovyTestCase { - /** - * Represents the Hibernate session factory. It will be injected by grails framework. - */ - SessionFactory sessionFactory - - /** - * A ProjectType instance to persists to database for test. - */ - ProjectType projectType - - /** - * A ProjectCategory instance to persists to database for test. - */ - ProjectCategory projectCategory - - /** - * A ScorecardType instance to persists to database for test. - */ - ScorecardType scorecardType - - /** - * A ScorecardStatus instance to persists to database for test. - */ - ScorecardStatus scorecardStatus - - /** - * Set up the test environment. - */ - protected void setUp() { - super.setUp() - - projectType = new ProjectType( - name:'Application', - description:'Application', - isGeneric:false, - createUser:'root', - modifyUser:'root' - ); - projectType.save(flush:true) - - projectCategory = new ProjectCategory( - name:'Assembly', - description:'Assembly', - display:true, - displayOrder:1, - projectType:projectType, - createUser:'root', - modifyUser:'root' - ); - projectCategory.save(flush:true) - - scorecardType = new ScorecardType( - name:'Screening', - description:'Screening', - createUser:'root', - modifyUser:'root' - ); - scorecardType.save(flush:true) - - scorecardStatus = new ScorecardStatus( - name:'Active', - description:'Active', - createUser:'root', - modifyUser:'root'); - scorecardStatus.save(flush:true) - } - - /** - * Tear down the test environment - */ - protected void tearDown() { - super.tearDown() - - projectCategory.delete(flush:true) - projectType.delete(flush:true) - scorecardType.delete(flush:true) - scorecardStatus.delete(flush:true) - } - - /** - * Test that the scorecard name cannot be null. - */ - void testScorecardNameNull() { - def scorecard = new Scorecard( - scorecardVersion:'1.0.0', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - assertEquals "There should be only 1 error", 1, scorecard.errors.getAllErrors().size() - def badField = scorecard.errors.getFieldError('scorecardName') - assertNotNull "Expecting to find an error on the scorecardName field", badField - } - - /** - * Test that the scorecard name cannot be blank. - */ - void testScorecardNameBlank() { - def scorecard = new Scorecard( - scorecardName:' ', - scorecardVersion:'1.0.0', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - assertEquals "There should be only 1 error", 1, scorecard.errors.getAllErrors().size() - def badField = scorecard.errors.getFieldError('scorecardName') - assertNotNull "Expecting to find an error on the scorecardName field", badField - } - - /** - * Test the max size of the scorecard name. - */ - void testScorecardNameMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def scorecard = new Scorecard( - scorecardName:sb, - scorecardVersion:'1.0.0', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - assertEquals "There should be only 1 error", 1, scorecard.errors.getAllErrors().size() - def badField = scorecard.errors.getFieldError('scorecardName') - assertNotNull "Expecting to find an error on the scorecardName field", badField - } - - /** - * Test that the scorecard name and scorecard version pair must be unique. - */ - void testScorecardNameAndScorecardVersionUnique() { - // Create a new scorecard. - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.0', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - scorecard.save(flush:true) - - // try to create another scorecard with the same scorecard name and scorecard version. - def scorecard2 = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.0', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - assertFalse "Validation should not succeed", scorecard2.validate() - assertEquals "There should be only 1 error", 1, scorecard2.errors.getAllErrors().size() - def badField = scorecard2.errors.getFieldError('scorecardName') - assertNotNull "Expecting to find an error on the scorecardName field", badField - - scorecard.delete(flush:true) - } - - /** - * Test that the scorecard version cannot be null. - */ - void testScorecardVersionNull() { - def scorecard = new Scorecard( - scorecardName:'name', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - assertEquals "There should be only 1 error", 1, scorecard.errors.getAllErrors().size() - def badField = scorecard.errors.getFieldError('scorecardVersion') - assertNotNull "Expecting to find an error on the scorecardVersion field", badField - } - - /** - * Test that the scorecard version cannot be blank. - */ - void testScorecardVersionBlank() { - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:' ', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - assertEquals "There should be only 1 error", 1, scorecard.errors.getAllErrors().size() - def badField = scorecard.errors.getFieldError('scorecardVersion') - assertNotNull "Expecting to find an error on the scorecardVersion field", badField - } - - /** - * Test that the scorecard version must be format of x.x.x. Here x is a number. - */ - void testScorecardVersionFormat1() { - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'d.x.e', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - assertEquals "There should be only 1 error", 1, scorecard.errors.getAllErrors().size() - def badField = scorecard.errors.getFieldError('scorecardVersion') - assertNotNull "Expecting to find an error on the scorecardVersion field", badField - } - - /** - * Test that the scorecard version must be format of x.x.x. Here x is a number. - */ - void testScorecardVersionFormat2() { - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.1.e', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - assertEquals "There should be only 1 error", 1, scorecard.errors.getAllErrors().size() - def badField = scorecard.errors.getFieldError('scorecardVersion') - assertNotNull "Expecting to find an error on the scorecardVersion field", badField - } - - /** - * Test that the scorecard version must be format of x.x.x. Here x is a number. - */ - void testScorecardVersionFormat3() { - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - assertEquals "There should be only 1 error", 1, scorecard.errors.getAllErrors().size() - def badField = scorecard.errors.getFieldError('scorecardVersion') - assertNotNull "Expecting to find an error on the scorecardVersion field", badField - } - - /** - * Test the max size of the scorecard version field. - */ - void testScorecardVersionMaxSize() { - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'11111.11111.11111', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - assertEquals "There should be only 1 error", 1, scorecard.errors.getAllErrors().size() - def badField = scorecard.errors.getFieldError('scorecardVersion') - assertNotNull "Expecting to find an error on the scorecardVersion field", badField - } - - /** - * Test that the minimum score must be grater or equal to 0. - */ - void testMinimumScoreMin() { - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:-10.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - assertEquals "There should be only 1 error", 1, scorecard.errors.getAllErrors().size() - def badField = scorecard.errors.getFieldError('minimumScore') - assertNotNull "Expecting to find an error on the minimumScore field", badField - } - - /** - * Test that the minimum score must be less or equal to 100. - */ - void testMinimumScoreMax() { - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:110.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - def badField = scorecard.errors.getFieldError('minimumScore') - assertNotNull "Expecting to find an error on the minimumScore field", badField - } - - /** - * Test that the maximum score must be grater or equal to 0. - */ - void testMaximumScoreMin() { - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:75.0, - maximumScore:-10.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - def badField = scorecard.errors.getFieldError('maximumScore') - assertNotNull "Expecting to find an error on the maximumScore field", badField - } - - /** - * Test that the maximum score must be less or equal to 100. - */ - void testMaximumScoreMax() { - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:75.0, - maximumScore:110.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - assertEquals "There should be only 1 error", 1, scorecard.errors.getAllErrors().size() - def badField = scorecard.errors.getFieldError('maximumScore') - assertNotNull "Expecting to find an error on the maximumScore field", badField - } - - /** - * Test that the minimum score must be less then maximum score. - */ - void testMaximumScoreGreaterThanMinimumScore1() { - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:75.0, - maximumScore:75.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - assertEquals "There should be only 1 error", 1, scorecard.errors.getAllErrors().size() - def badField = scorecard.errors.getFieldError('minimumScore') - assertNotNull "Expecting to find an error on the minimumScore field", badField - } - - /** - * Test that the minimum score must be less then maximum score. - */ - void testMaximumScoreGreaterThanMinimumScore2() { - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:75.0, - maximumScore:73.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - assertEquals "There should be only 1 error", 1, scorecard.errors.getAllErrors().size() - def badField = scorecard.errors.getFieldError('minimumScore') - assertNotNull "Expecting to find an error on the minimumScore field", badField - } - - /** - * Test that the scorecard type field cannot be null. - */ - void testScorecardTypeNull() { - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:75.0, - maximumScore:100.0, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - assertEquals "There should be only 1 error", 1, scorecard.errors.getAllErrors().size() - def badField = scorecard.errors.getFieldError('scorecardType') - assertNotNull "Expecting to find an error on the scorecardType field", badField - } - - /** - * Test that the scorecard status field cannot be null. - */ - void testScorecardStatusNull() { - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - assertEquals "There should be only 1 error", 1, scorecard.errors.getAllErrors().size() - def badField = scorecard.errors.getFieldError('scorecardStatus') - assertNotNull "Expecting to find an error on the scorecardStatus field", badField - } - - /** - * Test that the create user field cannot be blank. - */ - void testCreateUserBlank() { - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:' ', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - assertEquals "There should be only 1 error", 1, scorecard.errors.getAllErrors().size() - def badField = scorecard.errors.getFieldError('createUser') - assertNotNull "Expecting to find an error on the createUser field", badField - } - - /** - * Test the max size of create user field. - */ - void testCreateUserMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:sb, - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - assertEquals "There should be only 1 error", 1, scorecard.errors.getAllErrors().size() - def badField = scorecard.errors.getFieldError('createUser') - assertNotNull "Expecting to find an error on the createUser field", badField - } - - /** - * Test that the modify user field cannot be blank. - */ - void testModifyUserBlank() { - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:' ' - ) - - assertFalse "Validation should not succeed", scorecard.validate() - assertEquals "There should be only 1 error", 1, scorecard.errors.getAllErrors().size() - def badField = scorecard.errors.getFieldError('modifyUser') - assertNotNull "Expecting to find an error on the modifyUser field", badField - } - - /** - * Test the max size of the modify user field. - */ - void testModifyUserMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:sb - ) - - assertFalse "Validation should not succeed", scorecard.validate() - assertEquals "There should be only 1 error", 1, scorecard.errors.getAllErrors().size() - def badField = scorecard.errors.getFieldError('modifyUser') - assertNotNull "Expecting to find an error on the modifyUser field", badField - } - - /** - * Test that the scorecard name can be the same if the scorecard version is different. - */ - void testSameNameWithDifferentVersion() { - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.0', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - scorecard.save(flush:true) - - def scorecard2 = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - scorecard2.save(flush:true) - assertNotNull "The object should be persisted to the database", Scorecard.findByScorecardNameAndScorecardVersion('name', '1.0.1') - scorecard2.delete(flush:true) - scorecard.delete(flush:true) - } - - /** - * Test that the scorecard can't be deleted when the scorecard has been used. - */ - void testCannotDeleteScorecardWhenUsed() { - // create a new scorecard - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - scorecard.save(flush:true) - assertNotNull "The scorecard shoud be persisted to the database", Scorecard.findByScorecardNameAndScorecardVersion('name', '1.0.1') - // create a review for this scorecard so that the scorecard is in used - def review = new Review(scorecard:scorecard) - review.save(flush:true) - assertNotNull "The review shoud be persisted to the database", Review.findByScorecard(scorecard) - scorecard.delete(flush:true) - assertTrue "There should be errors when delete the scorecard", scorecard.hasErrors() - - sessionFactory.getCurrentSession().clear() - assertNotNull "The scorecard should not be deleted", Scorecard.findByScorecardNameAndScorecardVersion('name', '1.0.1') - - review.delete(flush:true) - scorecard = Scorecard.findByScorecardNameAndScorecardVersion('name', '1.0.1') - scorecard.delete(flush:true) - assertNull "The scorecard should be deleted", Scorecard.findByScorecardNameAndScorecardVersion('name', '1.0.1') - } - - /** - * Test that the scorecard can't be updated when the scorecard has been used. - */ - void testCannotUpdateScorecardWhenUsed() { - // create a new scorecard - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - scorecard.save(flush:true) - assertNotNull "The scorecard shoud be persisted to the database", Scorecard.findByScorecardNameAndScorecardVersion('name', '1.0.1') - // create a review for this scorecard so that the scorecard is in used - def review = new Review(scorecard:scorecard) - review.save(flush:true) - assertNotNull "The review shoud be persisted to the database", Review.findByScorecard(scorecard) - - scorecard.minimumScore = 80.0 - scorecard.save(flush:true) - - sessionFactory.getCurrentSession().clear() - assertTrue "There should be errors when update the scorecard", scorecard.hasErrors() - assertEquals "The scorecard should not be updated", 75.0, Scorecard.get(scorecard.id).minimumScore - - review.delete(flush:true) - Scorecard.get(scorecard.id).delete(flush:true) - } - - /** - * Test that the the sum wieght of groups/sections/question must be 100.0 when updating the scorecard. - */ - void testSumWeight() { - // create a new scorecard - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - scorecard.save(flush:true) - - // create a new scorecard group - def scorecardGroup1 = new ScorecardGroup( - groupName:'group1', - weight:70.0, - sort:1, - scorecard:scorecard - ) - scorecardGroup1.save(flush:true) - - // create a new scorecard group - def scorecardGroup2 = new ScorecardGroup( - groupName:'group2', - weight:30.0, - sort:1, - scorecard:scorecard - ) - scorecardGroup2.save(flush:true) - - sessionFactory.getCurrentSession().clear() - - // try to update the scorecard - scorecard = Scorecard.get(scorecard.id) - scorecard.minimumScore = 80.0 - scorecard.save(flush:true) - - sessionFactory.getCurrentSession().clear() - - assertFalse "There should be no errors when update the scorecard", scorecard.hasErrors() - assertEquals "The scorecard should be updated", 80.0, Scorecard.get(scorecard.id).minimumScore - - ScorecardGroup.get(scorecardGroup1.id).delete(flush:true) - ScorecardGroup.get(scorecardGroup2.id).delete(flush:true) - Scorecard.get(scorecard.id).delete(flush:true) - } - - /** - * Test that the ORM mapping can work. - */ - void testMapping() { - def scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - scorecard.save(flush:true) - - def retrieveScorecard = Scorecard.findByScorecardName('name') - assertNotNull 'The object should be persistence to the database', retrieveScorecard - assertEquals retrieveScorecard.scorecardName, scorecard.scorecardName - assertEquals retrieveScorecard.scorecardVersion, scorecard.scorecardVersion - assertEquals retrieveScorecard.minimumScore, scorecard.minimumScore - assertEquals retrieveScorecard.maximumScore, scorecard.maximumScore - assertEquals retrieveScorecard.createUser, scorecard.createUser - assertEquals retrieveScorecard.modifyUser, scorecard.modifyUser - assertEquals retrieveScorecard.scorecardType.id, scorecard.scorecardType.id - assertEquals retrieveScorecard.scorecardStatus.id, scorecard.scorecardStatus.id - assertEquals retrieveScorecard.projectCategory.id, scorecard.projectCategory.id - assertNotNull retrieveScorecard.dateCreated - assertNotNull retrieveScorecard.lastUpdated - scorecard.delete(flush:true) - } -} diff --git a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardQuestionIntegrationTests.groovy b/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardQuestionIntegrationTests.groovy deleted file mode 100644 index 57a57afc7..000000000 --- a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardQuestionIntegrationTests.groovy +++ /dev/null @@ -1,773 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import org.hibernate.SessionFactory; - -import grails.test.* - -/** - * This class is integration test cases for ScorecardQuestion domain. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class ScorecardQuestionIntegrationTests extends GroovyTestCase { - /** - * Represents the Hibernate session factory. It will be injected by grails framework. - */ - SessionFactory sessionFactory - - /** - * A ProjectType instance to persists to database for test. - */ - ProjectType projectType - - /** - * A ProjectCategory instance to persists to database for test. - */ - ProjectCategory projectCategory - - /** - * A ScorecardType instance to persists to database for test. - */ - ScorecardType scorecardType - - /** - * A ScorecardStatus instance to persists to database for test. - */ - ScorecardStatus scorecardStatus - - /** - * A ScorecardQuestionType instance to persists to database for test. - */ - ScorecardQuestionType questionType - - /** - * A Scorecard instance to persists to database for test. - */ - Scorecard scorecard - - /** - * A ScorecardGroup instance to persists to database for test. - */ - ScorecardGroup scorecardGroup - - /** - * A ScorecardSection instance to persists to database for test. - */ - ScorecardSection scorecardSection - - /** - * Set up the test environment. - */ - protected void setUp() { - super.setUp() - - projectType = new ProjectType( - name:'Application', - description:'Application', - isGeneric:false, - createUser:'root', - modifyUser:'root' - ); - projectType.save() - - projectCategory = new ProjectCategory( - name:'Assembly', - description:'Assembly', - display:true, - displayOrder:1, - projectType:projectType, - createUser:'root', - modifyUser:'root' - ); - projectCategory.save() - - scorecardType = new ScorecardType( - name:'Screening', - description:'Screening', - createUser:'root', - modifyUser:'root' - ); - scorecardType.save() - - scorecardStatus = new ScorecardStatus( - name:'Active', - description:'Active', - createUser:'root', - modifyUser:'root'); - scorecardStatus.save() - - questionType = new ScorecardQuestionType( - name:'Scale (1-4)', - description:'Scale (1-4)', - createUser:'root', - modifyUser:'root' - ) - questionType.save() - - scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - scorecard.save() - - scorecardGroup = new ScorecardGroup( - groupName:'name', - weight:70.0, - sort:1, - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - scorecardGroup.save() - - scorecardSection = new ScorecardSection( - sectionName:'name', - weight:70.0, - sort:1, - scorecardGroup:scorecardGroup, - createUser:'root', - modifyUser:'root' - ) - scorecardSection.save() - } - - /** - * Tear down the test environment - */ - protected void tearDown() { - super.tearDown() - - ScorecardSection.get(scorecardSection.id).delete() - ScorecardGroup.get(scorecardGroup.id).delete() - Scorecard.get(scorecard.id).delete() - ProjectCategory.get(projectCategory.id).delete() - ProjectType.get(projectType.id).delete() - ScorecardType.get(scorecardType.id).delete() - ScorecardStatus.get(scorecardStatus.id).delete() - ScorecardQuestionType.get(questionType.id).delete() - } - - /** - * Test that the description cannot be null. - */ - void testDescriptionNull() { - def scorecardQuestion = new ScorecardQuestion( - guideline:'guideline', - weight:100.0, - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('description') - assertNotNull "Expecting to find an error on the guide field", badField - } - - /** - * Test that the description cannot be blank. - */ - void testDescriptionBlank() { - def scorecardQuestion = new ScorecardQuestion( - description:' ', - guideline:'guideline', - weight:100.0, - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('description') - assertNotNull "Expecting to find an error on the guide field", badField - } - - /** - * Test the max size the description. - */ - void testDescriptionMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 4097; i++) { - sb.append 'a' - } - def scorecardQuestion = new ScorecardQuestion( - description:sb, - guideline:'guideline', - weight:100.0, - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('description') - assertNotNull "Expecting to find an error on the guide field", badField - } - - /** - * Test that the guideline cannot be null. - */ - void testGuidelineNull() { - def scorecardQuestion = new ScorecardQuestion( - description:'description', - weight:100.0, - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('guideline') - assertNotNull "Expecting to find an error on the guide field", badField - } - - /** - * Test that the guideline cannot be blank. - */ - void testGuidelineBlank() { - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:' ', - weight:100.0, - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('guideline') - assertNotNull "Expecting to find an error on the guide field", badField - } - - /** - * Test the max size of the guideline. - */ - void testGuidelineMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 4097; i++) { - sb.append 'a' - } - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:sb, - weight:100.0, - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('guideline') - assertNotNull "Expecting to find an error on the guide field", badField - } - - /** - * Test that the weight field cannot be null. - */ - void testWeightNull() { - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:'guide', - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('weight') - assertNotNull "Expecting to find an error on the weight field", badField - } - - /** - * Test that the weight field must be a number. - */ - void testWeightNotNumber() { - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:'guide', - weight:'asdf', - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('weight') - assertNotNull "Expecting to find an error on the weight field", badField - } - - /** - * Test that the weight field cannot be zero. - */ - void testWeightZero() { - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:'guide', - weight:0.0, - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('weight') - assertNotNull "Expecting to find an error on the weight field", badField - } - - /** - * Test that the weight field cannot be negative. - */ - void testWeightNegative() { - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:'guide', - weight:-1.0, - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('weight') - assertNotNull "Expecting to find an error on the weight field", badField - } - - /** - * Test the max value of the weight field. - */ - void testWeightMax() { - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:'guide', - weight:101.0, - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('weight') - assertNotNull "Expecting to find an error on the weight field", badField - } - - /** - * Test that the sort field cannot be null. - */ - void testSortNull() { - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:'guide', - weight:100.0, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('sort') - assertNotNull "Expecting to find an error on the sort field", badField - } - - /** - * Test that the sort field must be a number. - */ - void testSortNotNumber() { - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:'guide', - weight:100.0, - sort:'asdf', - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('sort') - assertNotNull "Expecting to find an error on the sort field", badField - } - - /** - * Test that the sort field cannot be negative. - */ - void testSortNegative() { - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:'guide', - weight:100.0, - sort:-1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('sort') - assertNotNull "Expecting to find an error on the sort field", badField - } - - /** - * Test that the uploadDocument field cannot be null. - */ - void testUploadDocumentNull() { - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:'guide', - weight:100.0, - sort:1, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('uploadDocument') - assertNotNull "Expecting to find an error on the uploadDocument field", badField - } - - /** - * Test that the uploadDocumentRequired field cannot be null. - */ - void testUploadDocumentRequiredNull() { - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:'guide', - weight:100.0, - sort:1, - uploadDocument:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('uploadDocumentRequired') - assertNotNull "Expecting to find an error on the uploadDocumentRequired field", badField - } - - /** - * Test that the questionType field cannot be null. - */ - void testQuestionTypeNull() { - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:'guide', - weight:100.0, - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('questionType') - assertNotNull "Expecting to find an error on the questionType field", badField - } - - /** - * Test that the scorecardSection field cannot be null. - */ - void testScorecardSectionNull() { - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:'guide', - weight:100.0, - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('scorecardSection') - assertNotNull "Expecting to find an error on the scorecardSection field", badField - } - - /** - * Test that the create user field cannot be blank. - */ - void testCreateUserBlank() { - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:'guide', - weight:100.0, - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:' ', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('createUser') - assertNotNull "Expecting to find an error on the createUser field", badField - } - - /** - * Test the max size of create user field. - */ - void testCreateUserMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:'guide', - weight:100.0, - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:sb, - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('createUser') - assertNotNull "Expecting to find an error on the createUser field", badField - } - - /** - * Test that the modify user field cannot be blank. - */ - void testModifyUserBlank() { - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:'guide', - weight:100.0, - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:' ' - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('modifyUser') - assertNotNull "Expecting to find an error on the modifyUser field", badField - } - - /** - * Test the max size of the modify user field. - */ - void testModifyUserMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:'guide', - weight:100.0, - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:sb - ) - - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('modifyUser') - assertNotNull "Expecting to find an error on the modifyUser field", badField - } - - /** - * Test that the scorecard must not be in used when updating/inserting the scorecard question. - */ - void testScorecardInUsed1() { - // create a review for this scorecard so that the scorecard is in used - def review = new Review(scorecard:scorecard) - review.save(flush:true) - - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:'guide', - weight:100.0, - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - assertFalse "Validation should not succeed", scorecardQuestion.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestion.errors.getAllErrors().size() - def badField = scorecardQuestion.errors.getFieldError('scorecardSection') - assertNotNull "Expecting to find an error on the scorecardSection field", badField - - review.delete(flush:true) - } - - /** - * Test that the scorecard must not be in used when deleting the scorecard question. - */ - void testScorecardInUsed2() { - // create a new scorecard question - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:'guide', - weight:100.0, - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - scorecardQuestion.save(flush:true) - assertFalse "The object should have persisted to database", scorecardQuestion.hasErrors() - - // create a review for this scorecard so that the scorecard is in used - def review = new Review(scorecard:scorecard) - review.save(flush:true) - - sessionFactory.getCurrentSession().clear() - - // try to delete the scorecard question - scorecardQuestion.delete(flush:true) - assertTrue "There should be errors when delete the scorecard question", scorecardQuestion.hasErrors() - - sessionFactory.getCurrentSession().clear() - assertNotNull "The scorecard question should not be deleted", ScorecardQuestion.get(scorecardQuestion.id) - Review.get(review.id).delete(flush:true) - ScorecardQuestion.get(scorecardQuestion.id).delete(flush:true) - } - - /** - * Test that the ORM mapping can work. - */ - void testMapping() { - def scorecardQuestion = new ScorecardQuestion( - description:'description', - guideline:'guide', - weight:100.0, - sort:1, - uploadDocument:true, - uploadDocumentRequired:true, - questionType:questionType, - scorecardSection:scorecardSection, - createUser:'root', - modifyUser:'root' - ) - assertNull ScorecardQuestion.findByScorecardSection(scorecardSection) - scorecardQuestion.save(flush:true) - def retrieveScorecardQuestion = ScorecardQuestion.findByScorecardSection(scorecardSection) - assertNotNull "The object should be persisted to the database", retrieveScorecardQuestion - assertEquals retrieveScorecardQuestion.description, scorecardQuestion.description - assertEquals retrieveScorecardQuestion.guideline, scorecardQuestion.guideline - assertEquals retrieveScorecardQuestion.weight, scorecardQuestion.weight - assertEquals retrieveScorecardQuestion.sort, scorecardQuestion.sort - assertEquals retrieveScorecardQuestion.uploadDocument, scorecardQuestion.uploadDocument - assertEquals retrieveScorecardQuestion.uploadDocumentRequired, scorecardQuestion.uploadDocumentRequired - assertEquals retrieveScorecardQuestion.questionType.id, scorecardQuestion.questionType.id - assertEquals retrieveScorecardQuestion.scorecardSection.id, scorecardQuestion.scorecardSection.id - assertEquals retrieveScorecardQuestion.createUser, scorecardQuestion.createUser - assertEquals retrieveScorecardQuestion.modifyUser, scorecardQuestion.modifyUser - assertNotNull retrieveScorecardQuestion.dateCreated - assertNotNull retrieveScorecardQuestion.lastUpdated - retrieveScorecardQuestion.delete(flush:true) - } -} diff --git a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardQuestionRESTfulTests.groovy b/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardQuestionRESTfulTests.groovy deleted file mode 100644 index 260e87cb0..000000000 --- a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardQuestionRESTfulTests.groovy +++ /dev/null @@ -1,223 +0,0 @@ -/* -* Copyright (C) 2011 TopCoder Inc., All Rights Reserved. -*/ -package com.topcoder.admin.scorecards - -import grails.test.* -import groovyx.net.http.ContentType -import groovyx.net.http.HttpResponseException -import groovyx.net.http.RESTClient - - -/** -* This class is unit test class for the RESTful service of ScorecardQuestion -* domain. -* -* @author TCSASSEMBER -* @version 1.0 -*/ -class ScorecardQuestionRESTfulTests extends GroovyTestCase { - /** - * Set up the environment. - */ - protected void setUp() { - super.setUp() - } - - /** - * Tear down the environment. - */ - protected void tearDown() { - super.tearDown() - } - - /** - * Test the RESTful functionality. - */ - void testRESTfulCURD() { - def client = new RESTClient("http://localhost:8080/scorecard_tool/json/") - def response - - // first, we create a project type for test - response = client.post( - path: "project-type", - body: [ data: [ name: "test project type", description: "test project type", isGeneric: false, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def projectTypeId = response.data.data.id - - // create a project category for test - response = client.post( - path: "project-category", - body: [ data: [ name: "test project category", description: "test project category", display: true, displayOrder: 1, projectType: projectTypeId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def projectCategoryId = response.data.data.id - - // create a scorecard type first - response = client.post( - path: "scorecard-type", - body: [ data: [ name: "test scorecard type", description: "test scorecard type", dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def scorecardTypeId = response.data.data.id - - // create a socrecard status first - response = client.post( - path: "scorecard-status", - body: [ data: [ name: "test scorecard status", description: "test scorecard status", dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def scorecardStatusId = response.data.data.id - - // create a scorecard first - response = client.post( - path: "scorecard", - body: [ data: [scorecardName: "test scorecard", scorecardVersion: '1.0.0', minimumScore:75.0, maximumScore: 100.0, scorecardType: scorecardTypeId, scorecardStatus: scorecardStatusId, projectCategory: projectCategoryId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - def scorecardId = response.data.data.id - - // create a scorecard group first - response = client.post( - path: "scorecard-group", - body: [ data: [groupName: "test scorecard group", weight: 100.0, sort: 1, scorecard: scorecardId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def scorecardGroupId = response.data.data.id - - // create a scorecard section first - response = client.post( - path: "scorecard-section", - body: [ data: [sectionName: "test scorecard section", weight: 100.0, sort: 1, scorecardGroup: scorecardGroupId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def scorecardSectionId = response.data.data.id - - // create a scorecard question type first - response = client.post( - path: "scorecard-question-type", - body: [ data: [ name: "test scorecard question type", description: "test scorecard question type", dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def scorecardQuestionTypeId = response.data.data.id - - // POST, create a new instance - response = client.post( - path: "scorecard-question", - body: [ data: [description: "test scorecard question", guideline: "guideline", weight: 100.0, sort: 1, uploadDocument: false, uploadDocumentRequired: false, questionType: scorecardQuestionTypeId, scorecardSection: scorecardSectionId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - assertEquals "test scorecard question", response.data.data.description - assertEquals "guideline", response.data.data.guideline - assertEquals 100.0, response.data.data.weight - assertEquals 1, response.data.data.sort - assertFalse response.data.data.uploadDocument - assertFalse response.data.data.uploadDocumentRequired - assertEquals scorecardQuestionTypeId, response.data.data.questionType - - def id = response.data.data.id - - // GET (list) - response = client.get(path: "scorecard-question") - assertTrue response.data.success - - // GET (single item) - response = client.get(path: "scorecard-question/${id}") - assertTrue response.data.success - assertEquals "test scorecard question", response.data.data.description - assertEquals "guideline", response.data.data.guideline - assertEquals 100.0, response.data.data.weight - assertEquals 1, response.data.data.sort - assertFalse response.data.data.uploadDocument - assertFalse response.data.data.uploadDocumentRequired - assertEquals scorecardQuestionTypeId, response.data.data.questionType - - // PUT - response = client.put( - path: "scorecard-question/${id}", - body: [ data: [description: "test scorecard question2", guideline: "guideline2", weight: 90.0, sort: 2, uploadDocument: true, uploadDocumentRequired: true, questionType: scorecardQuestionTypeId, scorecardSection: scorecardSectionId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - assertEquals "test scorecard question2", response.data.data.description - assertEquals "guideline2", response.data.data.guideline - assertEquals 90.0, response.data.data.weight - assertEquals 2, response.data.data.sort - assertTrue response.data.data.uploadDocument - assertTrue response.data.data.uploadDocumentRequired - assertEquals scorecardQuestionTypeId, response.data.data.questionType - - // DELETE - response = client.delete(path: "scorecard-question/${id}") - assertTrue response.data.success - assertEquals "test scorecard question2", response.data.data.description - assertEquals "guideline2", response.data.data.guideline - assertEquals 90.0, response.data.data.weight - assertEquals 2, response.data.data.sort - assertTrue response.data.data.uploadDocument - assertTrue response.data.data.uploadDocumentRequired - assertEquals scorecardQuestionTypeId, response.data.data.questionType - - // verify the item is deleted - try { - response = client.get(path: "scorecard-question/${id}") - fail "the item should be deleted" - } catch (HttpResponseException e) { - assert e.response.status == 404 - assert e.response.data.success == false - assert e.response.data.message.contains("not found") - } - - response = client.delete(path: "scorecard-question-type/${scorecardQuestionTypeId}") - assertTrue response.data.success - - response = client.delete(path: "scorecard-section/${scorecardSectionId}") - assertTrue response.data.success - - response = client.delete(path: "scorecard-group/${scorecardGroupId}") - assertTrue response.data.success - - response = client.delete(path: "scorecard/${scorecardId}") - assertTrue response.data.success - - response = client.delete(path: "project-category/${projectCategoryId}") - assertTrue response.data.success - - response = client.delete(path: "project-type/${projectTypeId}") - assertTrue response.data.success - - response = client.delete(path: "scorecard-type/${scorecardTypeId}") - assertTrue response.data.success - - response = client.delete(path: "scorecard-status/${scorecardStatusId}") - assertTrue response.data.success - } - - /** - * Error will occurs when saving the instance. - */ - void testRESTfulSavingFail() { - def client = new RESTClient("http://localhost:8080/scorecard_tool/json/") - try { - client.post( - path: "scorecard-question", - body: [ data: [ : ] ], - requestContentType : ContentType.JSON.toString() - ) - fail "Should throw HttpResponseException" - } catch (HttpResponseException e) { - assert e.response.status == 500 - assert e.response.data.success == false - assert e.response.data.message.contains("null") - } - } -} diff --git a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardQuestionTypeIntegrationTests.groovy b/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardQuestionTypeIntegrationTests.groovy deleted file mode 100644 index 46111eb08..000000000 --- a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardQuestionTypeIntegrationTests.groovy +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import grails.test.* - -/** - * This class is integration test cases for ScorecardQuestionType domain. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class ScorecardQuestionTypeIntegrationTests extends GroovyTestCase { - /** - * Set up the test environment. - */ - protected void setUp() { - super.setUp() - } - - /** - * Tear down the test environment - */ - protected void tearDown() { - super.tearDown() - } - - /** - * Test that the name cannot be null. - */ - void testNameNull() { - def scorecardQuestionType = new ScorecardQuestionType( - description:'description', - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestionType.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestionType.errors.getAllErrors().size() - def badField = scorecardQuestionType.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - } - - /** - * Test that the name cannot be blank. - */ - void testNameBlank() { - def scorecardQuestionType = new ScorecardQuestionType( - name:' ', - description:'description', - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestionType.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestionType.errors.getAllErrors().size() - def badField = scorecardQuestionType.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - } - - /** - * Test that the name must be unique. - */ - void testNameUnique() { - def p = new ScorecardQuestionType( - name:'type', - description:'description', - createUser:'root', - modifyUser:'root' - ) - p.save(flush:true) - - def scorecardQuestionType = new ScorecardQuestionType( - name:'type', - description:'description', - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestionType.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestionType.errors.getAllErrors().size() - def badField = scorecardQuestionType.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - - p.delete() - } - - /** - * Test the max size of the name. - */ - void testNameMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def scorecardQuestionType = new ScorecardQuestionType( - name:sb, - description:'description', - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestionType.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestionType.errors.getAllErrors().size() - def badField = scorecardQuestionType.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - } - - /** - * Test that the description cannot be null. - */ - void testDescriptionNull() { - def scorecardQuestionType = new ScorecardQuestionType( - name:'type', - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestionType.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestionType.errors.getAllErrors().size() - def badField = scorecardQuestionType.errors.getFieldError('description') - assertNotNull "Expecting to find an error on the description field", badField - } - - /** - * Test that the description cannot be blank. - */ - void testDescriptionBlank() { - def scorecardQuestionType = new ScorecardQuestionType( - name:'type', - description:' ', - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestionType.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestionType.errors.getAllErrors().size() - def badField = scorecardQuestionType.errors.getFieldError('description') - assertNotNull "Expecting to find an error on the description field", badField - } - - /** - * Test the max size the description. - */ - void testDescriptionMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 255; i++) { - sb.append 'a' - } - def scorecardQuestionType = new ScorecardQuestionType( - name:'type', - description:sb, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestionType.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestionType.errors.getAllErrors().size() - def badField = scorecardQuestionType.errors.getFieldError('description') - assertNotNull "Expecting to find an error on the description field", badField - } - - /** - * Test that the create user field cannot be blank. - */ - void testCreateUserBlank() { - def scorecardQuestionType = new ScorecardQuestionType( - name:'type', - description:'desc', - createUser:' ', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestionType.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestionType.errors.getAllErrors().size() - def badField = scorecardQuestionType.errors.getFieldError('createUser') - assertNotNull "Expecting to find an error on the createUser field", badField - } - - /** - * Test the max size of create user field. - */ - void testCreateUserMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def scorecardQuestionType = new ScorecardQuestionType( - name:'type', - description:'desc', - createUser:sb, - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardQuestionType.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestionType.errors.getAllErrors().size() - def badField = scorecardQuestionType.errors.getFieldError('createUser') - assertNotNull "Expecting to find an error on the createUser field", badField - } - - /** - * Test that the modify user field cannot be blank. - */ - void testModifyUserBlank() { - def scorecardQuestionType = new ScorecardQuestionType( - name:'type', - description:'desc', - createUser:'root', - modifyUser:' ' - ) - - assertFalse "Validation should not succeed", scorecardQuestionType.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestionType.errors.getAllErrors().size() - def badField = scorecardQuestionType.errors.getFieldError('modifyUser') - assertNotNull "Expecting to find an error on the modifyUser field", badField - } - - /** - * Test the max size of the modify user field. - */ - void testModifyUserMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def scorecardQuestionType = new ScorecardQuestionType( - name:'type', - description:'desc', - createUser:'root', - modifyUser:sb - ) - - assertFalse "Validation should not succeed", scorecardQuestionType.validate() - assertEquals "There should be only 1 error", 1, scorecardQuestionType.errors.getAllErrors().size() - def badField = scorecardQuestionType.errors.getFieldError('modifyUser') - assertNotNull "Expecting to find an error on the modifyUser field", badField - } - - /** - * Test that the ORM mapping can work. - */ - void testMapping() { - def scorecardQuestionType = new ScorecardQuestionType( - name:'type', - description:'desc', - createUser:'root', - modifyUser:'root' - ) - - scorecardQuestionType.save(flush:true) - def retrieveScorecardQuestionType = ScorecardQuestionType.findByName('type') - assertNotNull 'The object should be persistence to the database', retrieveScorecardQuestionType - assertEquals retrieveScorecardQuestionType.name, scorecardQuestionType.name - assertEquals retrieveScorecardQuestionType.description, scorecardQuestionType.description - assertEquals retrieveScorecardQuestionType.createUser, scorecardQuestionType.createUser - assertEquals retrieveScorecardQuestionType.modifyUser, scorecardQuestionType.modifyUser - assertNotNull retrieveScorecardQuestionType.dateCreated - assertNotNull retrieveScorecardQuestionType.lastUpdated - scorecardQuestionType.delete(flush:true) - } -} diff --git a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardQuestionTypeRESTfulTests.groovy b/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardQuestionTypeRESTfulTests.groovy deleted file mode 100644 index 8eeae6ee8..000000000 --- a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardQuestionTypeRESTfulTests.groovy +++ /dev/null @@ -1,108 +0,0 @@ -/* -* Copyright (C) 2011 TopCoder Inc., All Rights Reserved. -*/ -package com.topcoder.admin.scorecards - -import grails.test.* -import groovyx.net.http.ContentType -import groovyx.net.http.HttpResponseException -import groovyx.net.http.RESTClient - - -/** -* This class is unit test class for the RESTful service of ScorecardQuestionType -* domain. -* -* @author TCSASSEMBER -* @version 1.0 -*/ -class ScorecardQuestionTypeRESTfulTests extends GroovyTestCase { - /** - * Set up the environment. - */ - protected void setUp() { - super.setUp() - } - - /** - * Tear down the environment. - */ - protected void tearDown() { - super.tearDown() - } - - /** - * Test the RESTful functionality. - */ - void testRESTfulCURD() { - def client = new RESTClient("http://localhost:8080/scorecard_tool/json/") - def response - - // POST, create a new instance - response = client.post( - path: "scorecard-question-type", - body: [ data: [ name: "test scorecard question type", description: "test scorecard question type", dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - assertEquals "test scorecard question type", response.data.data.name - assertEquals "test scorecard question type", response.data.data.description - - def id = response.data.data.id - - // GET (list) - response = client.get(path: "scorecard-question-type") - assertTrue response.data.success - - // GET (single item) - response = client.get(path: "scorecard-question-type/${id}") - assertTrue response.data.success - assertEquals "test scorecard question type", response.data.data.name - assertEquals "test scorecard question type", response.data.data.description - - // PUT - response = client.put( - path: "scorecard-question-type/${id}", - body: [ data: [ name: "test scorecard question type2", description: "test scorecard question type2", dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - assertEquals "test scorecard question type2", response.data.data.name - assertEquals "test scorecard question type2", response.data.data.description - - // DELETE - response = client.delete(path: "scorecard-question-type/${id}") - assertTrue response.data.success - assertEquals "test scorecard question type2", response.data.data.name - assertEquals "test scorecard question type2", response.data.data.description - - // verify the item is deleted - try { - response = client.get(path: "scorecard-question-type/${id}") - fail "the item should be deleted" - } catch (HttpResponseException e) { - assert e.response.status == 404 - assert e.response.data.success == false - assert e.response.data.message.contains("not found") - } - } - - /** - * Error will occurs when saving the instance. - */ - void testRESTfulSavingFail() { - def client = new RESTClient("http://localhost:8080/scorecard_tool/json/") - try { - client.post( - path: "scorecard-question-type", - body: [ data: [ : ] ], - requestContentType : ContentType.JSON.toString() - ) - fail "Should throw HttpResponseException" - } catch (HttpResponseException e) { - assert e.response.status == 500 - assert e.response.data.success == false - assert e.response.data.message.contains("null") - } - } -} diff --git a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardRESTfulTests.groovy b/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardRESTfulTests.groovy deleted file mode 100644 index 75b04a35f..000000000 --- a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardRESTfulTests.groovy +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Copyright (C) 2011 TopCoder Inc., All Rights Reserved. -*/ -package com.topcoder.admin.scorecards - -import grails.test.* -import groovyx.net.http.ContentType -import groovyx.net.http.HttpResponseException -import groovyx.net.http.RESTClient - - -/** -* This class is unit test class for the RESTful service of Scorecard -* domain. -* -* @author TCSASSEMBER -* @version 1.0 -*/ -class ScorecardRESTfulTests extends GroovyTestCase { - /** - * Set up the environment. - */ - protected void setUp() { - super.setUp() - } - - /** - * Tear down the environment. - */ - protected void tearDown() { - super.tearDown() - } - - /** - * Test the RESTful functionality. - */ - void testRESTfulCURD() { - def client = new RESTClient("http://localhost:8080/scorecard_tool/json/") - def response - - // first, we create a project type for test - response = client.post( - path: "project-type", - body: [ data: [ name: "test project type", description: "test project type", isGeneric: false, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def projectTypeId = response.data.data.id - - // create a project category for test - response = client.post( - path: "project-category", - body: [ data: [ name: "test project category", description: "test project category", display: true, displayOrder: 1, projectType: projectTypeId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def projectCategoryId = response.data.data.id - - // create a scorecard type first - response = client.post( - path: "scorecard-type", - body: [ data: [ name: "test scorecard type", description: "test scorecard type", dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def scorecardTypeId = response.data.data.id - - // create a socrecard status first - response = client.post( - path: "scorecard-status", - body: [ data: [ name: "test scorecard status", description: "test scorecard status", dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def scorecardStatusId = response.data.data.id - - // POST, create a new instance - response = client.post( - path: "scorecard", - body: [ data: [scorecardName: "test scorecard", scorecardVersion: '1.0.0', minimumScore:75.0, maximumScore: 100.0, scorecardType: scorecardTypeId, scorecardStatus: scorecardStatusId, projectCategory: projectCategoryId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - assertEquals "test scorecard", response.data.data.scorecardName - assertEquals "1.0.0", response.data.data.scorecardVersion - assertEquals 75.0, response.data.data.minimumScore - assertEquals 100.0, response.data.data.maximumScore - - def id = response.data.data.id - - // GET (list) - response = client.get(path: "scorecard") - assertTrue response.data.success - - // GET (single item) - response = client.get(path: "scorecard/${id}") - assertTrue response.data.success - assertEquals "test scorecard", response.data.data.scorecardName - assertEquals "1.0.0", response.data.data.scorecardVersion - assertEquals 75.0, response.data.data.minimumScore - assertEquals 100.0, response.data.data.maximumScore - - // PUT - response = client.put( - path: "scorecard/${id}", - body: [ data: [scorecardName: "test scorecard2", scorecardVersion: '1.0.1', minimumScore:80.0, maximumScore: 100.0, scorecardType: scorecardTypeId, scorecardStatus: scorecardStatusId, projectCategory: projectCategoryId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - assertEquals "test scorecard2", response.data.data.scorecardName - assertEquals "1.0.1", response.data.data.scorecardVersion - assertEquals 80.0, response.data.data.minimumScore - assertEquals 100.0, response.data.data.maximumScore - - // DELETE - response = client.delete(path: "scorecard/${id}") - assertTrue response.data.success - assertEquals "test scorecard2", response.data.data.scorecardName - assertEquals "1.0.1", response.data.data.scorecardVersion - assertEquals 80.0, response.data.data.minimumScore - assertEquals 100.0, response.data.data.maximumScore - - // verify the item is deleted - try { - response = client.get(path: "scorecard/${id}") - fail "the item should be deleted" - } catch (HttpResponseException e) { - assert e.response.status == 404 - assert e.response.data.success == false - assert e.response.data.message.contains("not found") - } - - response = client.delete(path: "project-category/${projectCategoryId}") - assertTrue response.data.success - - response = client.delete(path: "project-type/${projectTypeId}") - assertTrue response.data.success - - response = client.delete(path: "scorecard-type/${scorecardTypeId}") - assertTrue response.data.success - - response = client.delete(path: "scorecard-status/${scorecardStatusId}") - assertTrue response.data.success - } - - /** - * Error will occurs when saving the instance. - */ - void testRESTfulSavingFail() { - def client = new RESTClient("http://localhost:8080/scorecard_tool/json/") - try { - client.post( - path: "scorecard", - body: [ data: [ : ] ], - requestContentType : ContentType.JSON.toString() - ) - fail "Should throw HttpResponseException" - } catch (HttpResponseException e) { - assert e.response.status == 500 - assert e.response.data.success == false - assert e.response.data.message.contains("null") - } - } -} diff --git a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardSearchIntegrationTests.groovy b/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardSearchIntegrationTests.groovy deleted file mode 100644 index 8d010edd0..000000000 --- a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardSearchIntegrationTests.groovy +++ /dev/null @@ -1,431 +0,0 @@ -/* -* Copyright (C) 2011 TopCoder Inc., All Rights Reserved. -*/ -package com.topcoder.admin.scorecards - -import static groovyx.net.http.ContentType.JSON -import static groovyx.net.http.Method.GET -import grails.test.* -import groovyx.net.http.ContentType -import groovyx.net.http.HTTPBuilder -import groovyx.net.http.Method -import groovyx.net.http.RESTClient - - -/** -* This class is unit test class for the search service of ScorecardController -* controller. -* -* @author TCSASSEMBER -* @version 1.0 -*/ -class ScorecardSearchIntegrationTests extends GroovyTestCase { - /** - * The RESTClient instance used to send rest request to server. - */ - def client - - /** - * The id of new created project type entity. - */ - def projectTypeId - - /** - * The id of new created project category entity. - */ - def projectCategoryId - - /** - * The id of new created scorecard type entity. - */ - def scorecardTypeId - - /** - * The id of new created scorecard status entity. - */ - def scorecardStatusId - - /** - * The id of new created scorecard entity. - */ - def scorecardId - - /** - * Set up the environment. - */ - protected void setUp() { - super.setUp() - - client = new RESTClient("http://localhost:8080/scorecard_tool/json/") - def response - - // first, we create a project type for test - response = client.post( - path: "project-type", - body: [ data: [ name: "test project type", description: "test project type", isGeneric: false, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - projectTypeId = response.data.data.id - - // create a project category for test - response = client.post( - path: "project-category", - body: [ data: [ name: "test project category", description: "test project category", display: true, displayOrder: 1, projectType: projectTypeId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - projectCategoryId = response.data.data.id - - // create a scorecard type first - response = client.post( - path: "scorecard-type", - body: [ data: [ name: "test scorecard type", description: "test scorecard type", dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - scorecardTypeId = response.data.data.id - - // create a socrecard status first - response = client.post( - path: "scorecard-status", - body: [ data: [ name: "test scorecard status", description: "test scorecard status", dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - scorecardStatusId = response.data.data.id - - // create a scorecard first - response = client.post( - path: "scorecard", - body: [ data: [scorecardName: "test scorecard", scorecardVersion: '1.0.0', minimumScore:75.0, maximumScore: 100.0, scorecardType: scorecardTypeId, scorecardStatus: scorecardStatusId, projectCategory: projectCategoryId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - scorecardId = response.data.data.id - } - - /** - * Tear down the environment. - */ - protected void tearDown() { - super.tearDown() - - def response - - response = client.delete(path: "scorecard/${scorecardId}") - assertTrue response.data.success - - response = client.delete(path: "project-category/${projectCategoryId}") - assertTrue response.data.success - - response = client.delete(path: "project-type/${projectTypeId}") - assertTrue response.data.success - - response = client.delete(path: "scorecard-type/${scorecardTypeId}") - assertTrue response.data.success - - response = client.delete(path: "scorecard-status/${scorecardStatusId}") - assertTrue response.data.success - } - - /** - * Checks whether the scorecards json data returned by server contains a specified scorecard. - */ - def checkJSONScorecards = {scorecards, needsId -> - for (int i = 0; i < scorecards.size(); i++) { - if (scorecards.getAt(i).id == needsId) { - return true - } - } - false - } - - /** - * Test the search functionality. No filter parameters. - */ - void testSearchNoParams() { - def http = new HTTPBuilder('http://localhost:8080') - http.request(GET, JSON) { - uri.path = '/scorecard_tool/scorecard/search' - uri.query = [ : ] - - response.success = { resp, json -> - assertTrue json.success - assertTrue json.totalCount > 0 - assertTrue json.count > 0 - assertTrue json.data.size() == json.count - assertTrue checkJSONScorecards(json.data, scorecardId) - } - } - } - - /** - * Test the search functionality. Search by scorecard name. - */ - void testSearchBySN1() { - def http = new HTTPBuilder('http://localhost:8080') - http.request(GET, JSON) { - uri.path = '/scorecard_tool/scorecard/search' - uri.query = [ sn : 'teSt' ] - - response.success = { resp, json -> - assertTrue json.success - assertTrue json.totalCount > 0 - assertTrue json.count > 0 - assertTrue json.data.size() == json.count - assertTrue checkJSONScorecards(json.data, scorecardId) - } - } - } - - /** - * Test the search functionality. Search by scorecard name. - */ - void testSearchBySN2() { - def http = new HTTPBuilder('http://localhost:8080') - http.request(GET, JSON) { - uri.path = '/scorecard_tool/scorecard/search' - uri.query = [ sn : 'teStxxxx' ] - - response.success = { resp, json -> - assertTrue json.success - assertTrue json.data.size() == json.count - assertFalse checkJSONScorecards(json.data, scorecardId) - } - } - } - - /** - * Test the search functionality. Search by project type. - */ - void testSearchBySPT1() { - def http = new HTTPBuilder('http://localhost:8080') - http.request(GET, JSON) { - uri.path = '/scorecard_tool/scorecard/search' - uri.query = [ spt : projectTypeId ] - - response.success = { resp, json -> - assertTrue json.success - assertTrue json.totalCount > 0 - assertTrue json.count > 0 - assertTrue json.data.size() == json.count - assertTrue checkJSONScorecards(json.data, scorecardId) - } - } - } - - /** - * Test the search functionality. Search by project type. - */ - void testSearchBySPT2() { - def http = new HTTPBuilder('http://localhost:8080') - http.request(GET, JSON) { - uri.path = '/scorecard_tool/scorecard/search' - uri.query = [ spt : -1 ] - - response.success = { resp, json -> - assertTrue json.success - assertTrue json.totalCount == 0 - assertTrue json.count == 0 - assertTrue json.data.size() == json.count - assertFalse checkJSONScorecards(json.data, scorecardId) - } - } - } - - /** - * Test the search functionality. Search by project type (Invalid parameters). - */ - void testSearchBySPT3() { - def http = new HTTPBuilder('http://localhost:8080') - http.request(GET, JSON) { - uri.path = '/scorecard_tool/scorecard/search' - uri.query = [ spt : 'ddd' ] - - response.success = { resp, json -> - assertFalse json.success - assertEquals json.message, 'spt must be numbers.' - } - } - } - - /** - * Test the search functionality. Search by project category. - */ - void testSearchBySC1() { - def http = new HTTPBuilder('http://localhost:8080') - http.request(GET, JSON) { - uri.path = '/scorecard_tool/scorecard/search' - uri.query = [ sc : projectCategoryId ] - - response.success = { resp, json -> - assertTrue json.success - assertTrue json.totalCount > 0 - assertTrue json.count > 0 - assertTrue json.data.size() == json.count - assertTrue checkJSONScorecards(json.data, scorecardId) - } - } - } - - /** - * Test the search functionality. Search by project category. - */ - void testSearchBySC2() { - def http = new HTTPBuilder('http://localhost:8080') - http.request(GET, JSON) { - uri.path = '/scorecard_tool/scorecard/search' - uri.query = [ sc : -1 ] - - response.success = { resp, json -> - assertTrue json.success - assertTrue json.totalCount == 0 - assertTrue json.count == 0 - assertTrue json.data.size() == json.count - assertFalse checkJSONScorecards(json.data, scorecardId) - } - } - } - - /** - * Test the search functionality. Search by project category (Invalid parameters). - */ - void testSearchBySC3() { - def http = new HTTPBuilder('http://localhost:8080') - http.request(GET, JSON) { - uri.path = '/scorecard_tool/scorecard/search' - uri.query = [ sc : 'ddd' ] - - response.success = { resp, json -> - assertFalse json.success - assertEquals json.message, 'sc must be numbers.' - } - } - } - - /** - * Test the search functionality. Search by scorecard type. - */ - void testSearchByST1() { - def http = new HTTPBuilder('http://localhost:8080') - http.request(GET, JSON) { - uri.path = '/scorecard_tool/scorecard/search' - uri.query = [ st : scorecardTypeId ] - - response.success = { resp, json -> - assertTrue json.success - assertTrue json.totalCount > 0 - assertTrue json.count > 0 - assertTrue json.data.size() == json.count - assertTrue checkJSONScorecards(json.data, scorecardId) - } - } - } - - /** - * Test the search functionality. Search by scorecard type. - */ - void testSearchByST2() { - def http = new HTTPBuilder('http://localhost:8080') - http.request(GET, JSON) { - uri.path = '/scorecard_tool/scorecard/search' - uri.query = [ st : -1 ] - - response.success = { resp, json -> - assertTrue json.success - assertTrue json.totalCount == 0 - assertTrue json.count == 0 - assertTrue json.data.size() == json.count - assertFalse checkJSONScorecards(json.data, scorecardId) - } - } - } - - /** - * Test the search functionality. Search by scorecard type (Invalid parameters). - */ - void testSearchByST3() { - def http = new HTTPBuilder('http://localhost:8080') - http.request(GET, JSON) { - uri.path = '/scorecard_tool/scorecard/search' - uri.query = [ st : 'ddd' ] - - response.success = { resp, json -> - assertFalse json.success - assertEquals json.message, 'st must be numbers.' - } - } - } - - /** - * Test the search functionality. Search by scorecard status. - */ - void testSearchBySS1() { - def http = new HTTPBuilder('http://localhost:8080') - http.request(GET, JSON) { - uri.path = '/scorecard_tool/scorecard/search' - uri.query = [ ss : scorecardStatusId ] - - response.success = { resp, json -> - assertTrue json.success - assertTrue json.totalCount > 0 - assertTrue json.count > 0 - assertTrue json.data.size() == json.count - assertTrue checkJSONScorecards(json.data, scorecardId) - } - } - } - - /** - * Test the search functionality. Search by scorecard status. - */ - void testSearchBySS2() { - def http = new HTTPBuilder('http://localhost:8080') - http.request(GET, JSON) { - uri.path = '/scorecard_tool/scorecard/search' - uri.query = [ ss : -1 ] - - response.success = { resp, json -> - assertTrue json.success - assertTrue json.totalCount == 0 - assertTrue json.count == 0 - assertTrue json.data.size() == json.count - assertFalse checkJSONScorecards(json.data, scorecardId) - } - } - } - - /** - * Test the search functionality. Search by scorecard status (Invalid parameters). - */ - void testSearchBySS3() { - def http = new HTTPBuilder('http://localhost:8080') - http.request(GET, JSON) { - uri.path = '/scorecard_tool/scorecard/search' - uri.query = [ ss : 'ddd' ] - - response.success = { resp, json -> - assertFalse json.success - assertEquals json.message, 'ss must be a number.' - } - } - } - - /** - * Test the search functionality. Specified the parameters related to paging and sort functinality. - */ - void testSortAndPaging() { - def http = new HTTPBuilder('http://localhost:8080') - http.request(GET, JSON) { - uri.path = '/scorecard_tool/scorecard/search' - uri.query = [ offset : 0, max : 1, sort : 'scorecardName', asc : true ] - - response.success = { resp, json -> - assertTrue json.success - assertTrue json.totalCount > 0 - assertTrue json.count == 1 - assertTrue json.data.size() == json.count - } - } - } -} diff --git a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardSectionIntegrationTests.groovy b/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardSectionIntegrationTests.groovy deleted file mode 100644 index 233a65da6..000000000 --- a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardSectionIntegrationTests.groovy +++ /dev/null @@ -1,564 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import org.hibernate.SessionFactory; - -import grails.test.* - -/** - * This class is integration test cases for ScorecardSection domain. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class ScorecardSectionIntegrationTests extends GroovyTestCase { - /** - * Represents the Hibernate session factory. It will be injected by grails framework. - */ - SessionFactory sessionFactory - - /** - * A ProjectType instance to persists to database for test. - */ - ProjectType projectType - - /** - * A ProjectCategory instance to persists to database for test. - */ - ProjectCategory projectCategory - - /** - * A ScorecardType instance to persists to database for test. - */ - ScorecardType scorecardType - - /** - * A ScorecardStatus instance to persists to database for test. - */ - ScorecardStatus scorecardStatus - - /** - * A Scorecard instance to persists to database for test. - */ - Scorecard scorecard - - /** - * A ScorecardGroup instance to persists to database for test. - */ - ScorecardGroup scorecardGroup - - /** - * Set up the test environment. - */ - protected void setUp() { - super.setUp() - - projectType = new ProjectType( - name:'Application', - description:'Application', - isGeneric:false, - createUser:'root', - modifyUser:'root' - ); - projectType.save() - - projectCategory = new ProjectCategory( - name:'Assembly', - description:'Assembly', - display:true, - displayOrder:1, - projectType:projectType, - createUser:'root', - modifyUser:'root' - ); - projectCategory.save() - - scorecardType = new ScorecardType( - name:'Screening', - description:'Screening', - createUser:'root', - modifyUser:'root' - ); - scorecardType.save() - - scorecardStatus = new ScorecardStatus( - name:'Active', - description:'Active', - createUser:'root', - modifyUser:'root'); - scorecardStatus.save() - - scorecard = new Scorecard( - scorecardName:'name', - scorecardVersion:'1.0.1', - minimumScore:75.0, - maximumScore:100.0, - scorecardType:scorecardType, - scorecardStatus:scorecardStatus, - projectCategory:projectCategory, - createUser:'root', - modifyUser:'root' - ) - scorecard.save() - - scorecardGroup = new ScorecardGroup( - groupName:'name', - weight:70.0, - sort:1, - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - scorecardGroup.save() - } - - /** - * Tear down the test environment - */ - protected void tearDown() { - super.tearDown() - - ScorecardGroup.get(scorecardGroup.id).delete() - Scorecard.get(scorecard.id).delete() - ProjectCategory.get(projectCategory.id).delete() - ProjectType.get(projectType.id).delete() - ScorecardType.get(scorecardType.id).delete() - ScorecardStatus.get(scorecardStatus.id).delete() - } - - /** - * Test that the section name cannot be null. - */ - void testSectionNameNull() { - def scorecardSection = new ScorecardSection( - weight:100.0, - sort:1, - scorecardGroup:scorecardGroup, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardSection.validate() - assertEquals "There should be only 1 error", 1, scorecardSection.errors.getAllErrors().size() - def badField = scorecardSection.errors.getFieldError('sectionName') - assertNotNull "Expecting to find an error on the sectionName field", badField - } - - /** - * Test that the section name cannot be blank. - */ - void testSectionNameBlank() { - def scorecardSection = new ScorecardSection( - sectionName:' ', - weight:100.0, - sort:1, - scorecardGroup:scorecardGroup, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardSection.validate() - assertEquals "There should be only 1 error", 1, scorecardSection.errors.getAllErrors().size() - def badField = scorecardSection.errors.getFieldError('sectionName') - assertNotNull "Expecting to find an error on the sectionName field", badField - } - - /** - * Test the max size of the section name. - */ - void testSectionNameMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 1025; i++) { - sb.append 'a' - } - def scorecardSection = new ScorecardSection( - sectionName:sb, - weight:100.0, - sort:1, - scorecardGroup:scorecardGroup, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardSection.validate() - assertEquals "There should be only 1 error", 1, scorecardSection.errors.getAllErrors().size() - def badField = scorecardSection.errors.getFieldError('sectionName') - assertNotNull "Expecting to find an error on the sectionName field", badField - } - - /** - * Test that the section name can be the same if the group is different. - */ - void testSectionNameUnique2() { - // create a new ScorecardGroup - def scorecardGroup2 = new ScorecardGroup( - groupName:'name2', - weight:70.0, - sort:1, - scorecard:scorecard, - createUser:'root', - modifyUser:'root' - ) - scorecardGroup2.save(flush:true) - - // create a new section whose group is the first scorecard group - def scorecardSection = new ScorecardSection( - sectionName:'group', - weight:100.0, - sort:1, - scorecardGroup:scorecardGroup, - createUser:'root', - modifyUser:'root' - ) - scorecardSection.save(flush:true) - - // try to create another new section with the same name whose group is the second scorecard group - def scorecardSection2 = new ScorecardSection( - sectionName:'group', - weight:100.0, - sort:1, - scorecardGroup:scorecardGroup2, - createUser:'root', - modifyUser:'root' - ) - assertTrue "Validation should succeed", scorecardSection2.validate() - scorecardSection.delete(flush:true) - scorecardGroup2.delete(flush:true) - } - - /** - * Test that the weight field cannot be null. - */ - void testWeightNull() { - def scorecardSection = new ScorecardSection( - sectionName:'name', - sort:1, - scorecardGroup:scorecardGroup, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardSection.validate() - assertEquals "There should be only 1 error", 1, scorecardSection.errors.getAllErrors().size() - def badField = scorecardSection.errors.getFieldError('weight') - assertNotNull "Expecting to find an error on the weight field", badField - } - - /** - * Test that the weight field must be a number. - */ - void testWeightNotNumber() { - def scorecardSection = new ScorecardSection( - sectionName:'name', - weight:'asdf', - sort:1, - scorecardGroup:scorecardGroup, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardSection.validate() - assertEquals "There should be only 1 error", 1, scorecardSection.errors.getAllErrors().size() - def badField = scorecardSection.errors.getFieldError('weight') - assertNotNull "Expecting to find an error on the weight field", badField - } - - /** - * Test that the weight field cannot be zero. - */ - void testWeightZero() { - def scorecardSection = new ScorecardSection( - sectionName:'name', - weight:0.0, - sort:1, - scorecardGroup:scorecardGroup, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardSection.validate() - assertEquals "There should be only 1 error", 1, scorecardSection.errors.getAllErrors().size() - def badField = scorecardSection.errors.getFieldError('weight') - assertNotNull "Expecting to find an error on the weight field", badField - } - - /** - * Test that the weight field cannot be negative. - */ - void testWeightNegative() { - def scorecardSection = new ScorecardSection( - sectionName:'name', - weight:-10.0, - sort:1, - scorecardGroup:scorecardGroup, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardSection.validate() - assertEquals "There should be only 1 error", 1, scorecardSection.errors.getAllErrors().size() - def badField = scorecardSection.errors.getFieldError('weight') - assertNotNull "Expecting to find an error on the weight field", badField - } - - /** - * Test the max value of the weight field. - */ - void testWeightMax() { - def scorecardSection = new ScorecardSection( - sectionName:'name', - weight:101.0, - sort:1, - scorecardGroup:scorecardGroup, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardSection.validate() - assertEquals "There should be only 1 error", 1, scorecardSection.errors.getAllErrors().size() - def badField = scorecardSection.errors.getFieldError('weight') - assertNotNull "Expecting to find an error on the weight field", badField - } - - /** - * Test that the sort field cannot be null. - */ - void testSortNull() { - def scorecardSection = new ScorecardSection( - sectionName:'name', - weight:70.0, - scorecardGroup:scorecardGroup, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardSection.validate() - assertEquals "There should be only 1 error", 1, scorecardSection.errors.getAllErrors().size() - def badField = scorecardSection.errors.getFieldError('sort') - assertNotNull "Expecting to find an error on the sort field", badField - } - - /** - * Test that the sort field must be a number. - */ - void testSortNotNumber() { - def scorecardSection = new ScorecardSection( - sectionName:'name', - weight:70.0, - sort:'asdf', - scorecardGroup:scorecardGroup, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardSection.validate() - assertEquals "There should be only 1 error", 1, scorecardSection.errors.getAllErrors().size() - def badField = scorecardSection.errors.getFieldError('sort') - assertNotNull "Expecting to find an error on the sort field", badField - } - - /** - * Test that the sort field cannot be negative. - */ - void testSortNegative() { - def scorecardSection = new ScorecardSection( - sectionName:'name', - weight:70.0, - sort:-1, - scorecardGroup:scorecardGroup, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardSection.validate() - assertEquals "There should be only 1 error", 1, scorecardSection.errors.getAllErrors().size() - def badField = scorecardSection.errors.getFieldError('sort') - assertNotNull "Expecting to find an error on the sort field", badField - } - - /** - * Test that the scorecard group field cannot be null. - */ - void testScorecardGroupNull() { - def scorecardSection = new ScorecardSection( - sectionName:'name', - weight:70.0, - sort:1, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardSection.validate() - assertEquals "There should be only 1 error", 1, scorecardSection.errors.getAllErrors().size() - def badField = scorecardSection.errors.getFieldError('scorecardGroup') - assertNotNull "Expecting to find an error on the scorecardGroup field", badField - } - - /** - * Test that the create user field cannot be blank. - */ - void testCreateUserBlank() { - def scorecardSection = new ScorecardSection( - sectionName:'name', - weight:70.0, - sort:1, - scorecardGroup:scorecardGroup, - createUser:' ', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardSection.validate() - assertEquals "There should be only 1 error", 1, scorecardSection.errors.getAllErrors().size() - def badField = scorecardSection.errors.getFieldError('createUser') - assertNotNull "Expecting to find an error on the createUser field", badField - } - - /** - * Test the max size of create user field. - */ - void testCreateUserMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def scorecardSection = new ScorecardSection( - sectionName:'name', - weight:70.0, - sort:1, - scorecardGroup:scorecardGroup, - createUser:sb, - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardSection.validate() - assertEquals "There should be only 1 error", 1, scorecardSection.errors.getAllErrors().size() - def badField = scorecardSection.errors.getFieldError('createUser') - assertNotNull "Expecting to find an error on the createUser field", badField - } - - /** - * Test that the modify user field cannot be blank. - */ - void testModifyUserBlank() { - def scorecardSection = new ScorecardSection( - sectionName:'name', - weight:70.0, - sort:1, - scorecardGroup:scorecardGroup, - createUser:'root', - modifyUser:' ' - ) - - assertFalse "Validation should not succeed", scorecardSection.validate() - assertEquals "There should be only 1 error", 1, scorecardSection.errors.getAllErrors().size() - def badField = scorecardSection.errors.getFieldError('modifyUser') - assertNotNull "Expecting to find an error on the modifyUser field", badField - } - - /** - * Test the max size of the modify user field. - */ - void testModifyUserMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def scorecardSection = new ScorecardSection( - sectionName:'name', - weight:70.0, - sort:1, - scorecardGroup:scorecardGroup, - createUser:'root', - modifyUser:sb - ) - - assertFalse "Validation should not succeed", scorecardSection.validate() - assertEquals "There should be only 1 error", 1, scorecardSection.errors.getAllErrors().size() - def badField = scorecardSection.errors.getFieldError('modifyUser') - assertNotNull "Expecting to find an error on the modifyUser field", badField - } - - /** - * Test that the scorecard must not be in used when updating/inserting the scorecard section. - */ - void testScorecardInUsed1() { - // create a review for this scorecard so that the scorecard is in used - def review = new Review(scorecard:scorecard) - review.save(flush:true) - - def scorecardSection = new ScorecardSection( - sectionName:'name', - weight:100.0, - sort:1, - scorecardGroup:scorecardGroup, - createUser:'root', - modifyUser:'root' - ) - assertFalse "Validation should not succeed", scorecardSection.validate() - assertEquals "There should be only 1 error", 1, scorecardSection.errors.getAllErrors().size() - def badField = scorecardSection.errors.getFieldError('scorecardGroup') - assertNotNull "Expecting to find an error on the scorecardGroup field", badField - - review.delete(flush:true) - } - - /** - * Test that the scorecard must not be in used when deleting the scorecard section. - */ - void testScorecardInUsed2() { - // create a new scorecard section - def scorecardSection = new ScorecardSection( - sectionName:'name', - weight:100.0, - sort:1, - scorecardGroup:scorecardGroup, - createUser:'root', - modifyUser:'root' - ) - scorecardSection.save(flush:true) - assertFalse "The object should have persisted to database", scorecardSection.hasErrors() - - // create a review for this scorecard so that the scorecard is in used - def review = new Review(scorecard:scorecard) - review.save(flush:true) - - sessionFactory.getCurrentSession().clear() - - // try to delete the scorecard section - scorecardSection.delete(flush:true) - assertTrue "There should be errors when delete the scorecard section", scorecardSection.hasErrors() - - sessionFactory.getCurrentSession().clear() - assertNotNull "The scorecard section should not be deleted", ScorecardSection.get(scorecardSection.id) - Review.get(review.id).delete(flush:true) - ScorecardSection.get(scorecardSection.id).delete(flush:true) - } - - /** - * Test that the ORM mapping can work. - */ - void testMapping() { - def scorecardSection = new ScorecardSection( - sectionName:'name', - weight:70.0, - sort:1, - scorecardGroup:scorecardGroup, - createUser:'root', - modifyUser:'root' - ) - scorecardSection.save(flush:true) - def retrieveScorecardSection = ScorecardSection.findBySectionNameAndScorecardGroup('name', scorecardGroup) - assertNotNull "The object should be persisted to the database", retrieveScorecardSection - assertEquals retrieveScorecardSection.sectionName, scorecardSection.sectionName - assertEquals retrieveScorecardSection.weight, scorecardSection.weight - assertEquals retrieveScorecardSection.sort, scorecardSection.sort - assertEquals retrieveScorecardSection.scorecardGroup.id, scorecardSection.scorecardGroup.id - assertEquals retrieveScorecardSection.createUser, scorecardSection.createUser - assertEquals retrieveScorecardSection.modifyUser, scorecardSection.modifyUser - assertNotNull retrieveScorecardSection.dateCreated - assertNotNull retrieveScorecardSection.lastUpdated - scorecardSection.delete(flush:true) - } -} diff --git a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardSectionRESTfulTests.groovy b/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardSectionRESTfulTests.groovy deleted file mode 100644 index 006858ef0..000000000 --- a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardSectionRESTfulTests.groovy +++ /dev/null @@ -1,183 +0,0 @@ -/* -* Copyright (C) 2011 TopCoder Inc., All Rights Reserved. -*/ -package com.topcoder.admin.scorecards - -import grails.test.* -import groovyx.net.http.ContentType -import groovyx.net.http.HttpResponseException -import groovyx.net.http.RESTClient - - -/** -* This class is unit test class for the RESTful service of ScorecardSection -* domain. -* -* @author TCSASSEMBER -* @version 1.0 -*/ -class ScorecardSectionRESTfulTests extends GroovyTestCase { - /** - * Set up the environment. - */ - protected void setUp() { - super.setUp() - } - - /** - * Tear down the environment. - */ - protected void tearDown() { - super.tearDown() - } - - /** - * Test the RESTful functionality. - */ - void testRESTfulCURD() { - def client = new RESTClient("http://localhost:8080/scorecard_tool/json/") - def response - - // first, we create a project type for test - response = client.post( - path: "project-type", - body: [ data: [ name: "test project type", description: "test project type", isGeneric: false, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def projectTypeId = response.data.data.id - - // create a project category for test - response = client.post( - path: "project-category", - body: [ data: [ name: "test project category", description: "test project category", display: true, displayOrder: 1, projectType: projectTypeId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def projectCategoryId = response.data.data.id - - // create a scorecard type first - response = client.post( - path: "scorecard-type", - body: [ data: [ name: "test scorecard type", description: "test scorecard type", dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def scorecardTypeId = response.data.data.id - - // create a socrecard status first - response = client.post( - path: "scorecard-status", - body: [ data: [ name: "test scorecard status", description: "test scorecard status", dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def scorecardStatusId = response.data.data.id - - // create a scorecard first - response = client.post( - path: "scorecard", - body: [ data: [scorecardName: "test scorecard", scorecardVersion: '1.0.0', minimumScore:75.0, maximumScore: 100.0, scorecardType: scorecardTypeId, scorecardStatus: scorecardStatusId, projectCategory: projectCategoryId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - def scorecardId = response.data.data.id - - // create a scorecard group first - response = client.post( - path: "scorecard-group", - body: [ data: [groupName: "test scorecard group", weight: 100.0, sort: 1, scorecard: scorecardId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - def scorecardGroupId = response.data.data.id - - // POST, create a new instance - response = client.post( - path: "scorecard-section", - body: [ data: [sectionName: "test scorecard section", weight: 100.0, sort: 1, scorecardGroup: scorecardGroupId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - assertEquals "test scorecard section", response.data.data.sectionName - assertEquals 100.0, response.data.data.weight - assertEquals 1, response.data.data.sort - - def id = response.data.data.id - - // GET (list) - response = client.get(path: "scorecard-section") - assertTrue response.data.success - - // GET (single item) - response = client.get(path: "scorecard-section/${id}") - assertTrue response.data.success - assertEquals "test scorecard section", response.data.data.sectionName - assertEquals 100.0, response.data.data.weight - assertEquals 1, response.data.data.sort - - // PUT - response = client.put( - path: "scorecard-section/${id}", - body: [ data: [sectionName: "test scorecard section2", weight: 100.0, sort: 2, scorecardGroup: scorecardGroupId, dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - assertEquals "test scorecard section2", response.data.data.sectionName - assertEquals 100.0, response.data.data.weight - assertEquals 2, response.data.data.sort - - // DELETE - response = client.delete(path: "scorecard-section/${id}") - assertTrue response.data.success - assertEquals "test scorecard section2", response.data.data.sectionName - assertEquals 100.0, response.data.data.weight - assertEquals 2, response.data.data.sort - - // verify the item is deleted - try { - response = client.get(path: "scorecard-section/${id}") - fail "the item should be deleted" - } catch (HttpResponseException e) { - assert e.response.status == 404 - assert e.response.data.success == false - assert e.response.data.message.contains("not found") - } - - response = client.delete(path: "scorecard-group/${scorecardGroupId}") - assertTrue response.data.success - - response = client.delete(path: "scorecard/${scorecardId}") - assertTrue response.data.success - - response = client.delete(path: "project-category/${projectCategoryId}") - assertTrue response.data.success - - response = client.delete(path: "project-type/${projectTypeId}") - assertTrue response.data.success - - response = client.delete(path: "scorecard-type/${scorecardTypeId}") - assertTrue response.data.success - - response = client.delete(path: "scorecard-status/${scorecardStatusId}") - assertTrue response.data.success - } - - /** - * Error will occurs when saving the instance. - */ - void testRESTfulSavingFail() { - def client = new RESTClient("http://localhost:8080/scorecard_tool/json/") - try { - client.post( - path: "scorecard-section", - body: [ data: [ : ] ], - requestContentType : ContentType.JSON.toString() - ) - fail "Should throw HttpResponseException" - } catch (HttpResponseException e) { - assert e.response.status == 500 - assert e.response.data.success == false - assert e.response.data.message.contains("null") - } - } -} diff --git a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardStatusIntegrationTests.groovy b/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardStatusIntegrationTests.groovy deleted file mode 100644 index 8ead67424..000000000 --- a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardStatusIntegrationTests.groovy +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import grails.test.* - -/** - * This class is integration test cases for ScorecardStatus domain. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class ScorecardStatusIntegrationTests extends GroovyTestCase { - /** - * Set up the test environment. - */ - protected void setUp() { - super.setUp() - } - - /** - * Tear down the test environment - */ - protected void tearDown() { - super.tearDown() - } - - /** - * Test that the name cannot be null. - */ - void testNameNull() { - def scorecardStatus = new ScorecardStatus( - description:'description', - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardStatus.validate() - assertEquals "There should be only 1 error", 1, scorecardStatus.errors.getAllErrors().size() - def badField = scorecardStatus.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - } - - /** - * Test that the name cannot be blank. - */ - void testNameBlank() { - def scorecardStatus = new ScorecardStatus( - name:' ', - description:'description', - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardStatus.validate() - assertEquals "There should be only 1 error", 1, scorecardStatus.errors.getAllErrors().size() - def badField = scorecardStatus.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - } - - /** - * Test that the name must be unique. - */ - void testNameUnique() { - def p = new ScorecardStatus( - name:'type', - description:'description', - createUser:'root', - modifyUser:'root' - ) - p.save(flush:true) - - def scorecardStatus = new ScorecardStatus( - name:'type', - description:'description', - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardStatus.validate() - assertEquals "There should be only 1 error", 1, scorecardStatus.errors.getAllErrors().size() - def badField = scorecardStatus.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - - p.delete() - } - - /** - * Test the max size of the name. - */ - void testNameMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def scorecardStatus = new ScorecardStatus( - name:sb, - description:'description', - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardStatus.validate() - assertEquals "There should be only 1 error", 1, scorecardStatus.errors.getAllErrors().size() - def badField = scorecardStatus.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - } - - /** - * Test that the description cannot be null. - */ - void testDescriptionNull() { - def scorecardStatus = new ScorecardStatus( - name:'type', - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardStatus.validate() - assertEquals "There should be only 1 error", 1, scorecardStatus.errors.getAllErrors().size() - def badField = scorecardStatus.errors.getFieldError('description') - assertNotNull "Expecting to find an error on the description field", badField - } - - /** - * Test that the description cannot be blank. - */ - void testDescriptionBlank() { - def scorecardStatus = new ScorecardStatus( - name:'type', - description:' ', - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardStatus.validate() - assertEquals "There should be only 1 error", 1, scorecardStatus.errors.getAllErrors().size() - def badField = scorecardStatus.errors.getFieldError('description') - assertNotNull "Expecting to find an error on the description field", badField - } - - /** - * Test the max size the description. - */ - void testDescriptionMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 255; i++) { - sb.append 'a' - } - def scorecardStatus = new ScorecardStatus( - name:'type', - description:sb, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardStatus.validate() - assertEquals "There should be only 1 error", 1, scorecardStatus.errors.getAllErrors().size() - def badField = scorecardStatus.errors.getFieldError('description') - assertNotNull "Expecting to find an error on the description field", badField - } - - /** - * Test that the create user field cannot be blank. - */ - void testCreateUserBlank() { - def scorecardStatus = new ScorecardStatus( - name:'type', - description:'desc', - createUser:' ', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardStatus.validate() - assertEquals "There should be only 1 error", 1, scorecardStatus.errors.getAllErrors().size() - def badField = scorecardStatus.errors.getFieldError('createUser') - assertNotNull "Expecting to find an error on the createUser field", badField - } - - /** - * Test the max size of create user field. - */ - void testCreateUserMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def scorecardStatus = new ScorecardStatus( - name:'type', - description:'desc', - createUser:sb, - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardStatus.validate() - assertEquals "There should be only 1 error", 1, scorecardStatus.errors.getAllErrors().size() - def badField = scorecardStatus.errors.getFieldError('createUser') - assertNotNull "Expecting to find an error on the createUser field", badField - } - - /** - * Test that the modify user field cannot be blank. - */ - void testModifyUserBlank() { - def scorecardStatus = new ScorecardStatus( - name:'type', - description:'desc', - createUser:'root', - modifyUser:' ' - ) - - assertFalse "Validation should not succeed", scorecardStatus.validate() - assertEquals "There should be only 1 error", 1, scorecardStatus.errors.getAllErrors().size() - def badField = scorecardStatus.errors.getFieldError('modifyUser') - assertNotNull "Expecting to find an error on the modifyUser field", badField - } - - /** - * Test the max size of the modify user field. - */ - void testModifyUserMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def scorecardStatus = new ScorecardStatus( - name:'type', - description:'desc', - createUser:'root', - modifyUser:sb - ) - - assertFalse "Validation should not succeed", scorecardStatus.validate() - assertEquals "There should be only 1 error", 1, scorecardStatus.errors.getAllErrors().size() - def badField = scorecardStatus.errors.getFieldError('modifyUser') - assertNotNull "Expecting to find an error on the modifyUser field", badField - } - - /** - * Test that the ORM mapping can work. - */ - void testMapping() { - def scorecardStatus = new ScorecardStatus( - name:'type', - description:'desc', - createUser:'root', - modifyUser:'root' - ) - - scorecardStatus.save(flush:true) - def retrieveScorecardStatus = ScorecardStatus.findByName('type') - assertNotNull 'The object should be persistence to the database', retrieveScorecardStatus - assertEquals retrieveScorecardStatus.name, scorecardStatus.name - assertEquals retrieveScorecardStatus.description, scorecardStatus.description - assertEquals retrieveScorecardStatus.createUser, scorecardStatus.createUser - assertEquals retrieveScorecardStatus.modifyUser, scorecardStatus.modifyUser - assertNotNull retrieveScorecardStatus.dateCreated - assertNotNull retrieveScorecardStatus.lastUpdated - scorecardStatus.delete(flush:true) - } -} diff --git a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardStatusRESTfulTests.groovy b/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardStatusRESTfulTests.groovy deleted file mode 100644 index 28c507c07..000000000 --- a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardStatusRESTfulTests.groovy +++ /dev/null @@ -1,108 +0,0 @@ -/* -* Copyright (C) 2011 TopCoder Inc., All Rights Reserved. -*/ -package com.topcoder.admin.scorecards - -import grails.test.* -import groovyx.net.http.ContentType -import groovyx.net.http.HttpResponseException -import groovyx.net.http.RESTClient - - -/** -* This class is unit test class for the RESTful service of ScorecardStatus -* domain. -* -* @author TCSASSEMBER -* @version 1.0 -*/ -class ScorecardStatusRESTfulTests extends GroovyTestCase { - /** - * Set up the environment. - */ - protected void setUp() { - super.setUp() - } - - /** - * Tear down the environment. - */ - protected void tearDown() { - super.tearDown() - } - - /** - * Test the RESTful functionality. - */ - void testRESTfulCURD() { - def client = new RESTClient("http://localhost:8080/scorecard_tool/json/") - def response - - // POST, create a new instance - response = client.post( - path: "scorecard-status", - body: [ data: [ name: "test scorecard status", description: "test scorecard status", dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - assertEquals "test scorecard status", response.data.data.name - assertEquals "test scorecard status", response.data.data.description - - def id = response.data.data.id - - // GET (list) - response = client.get(path: "scorecard-status") - assertTrue response.data.success - - // GET (single item) - response = client.get(path: "scorecard-status/${id}") - assertTrue response.data.success - assertEquals "test scorecard status", response.data.data.name - assertEquals "test scorecard status", response.data.data.description - - // PUT - response = client.put( - path: "scorecard-status/${id}", - body: [ data: [ name: "test scorecard status2", description: "test scorecard status2", dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - assertEquals "test scorecard status2", response.data.data.name - assertEquals "test scorecard status2", response.data.data.description - - // DELETE - response = client.delete(path: "scorecard-status/${id}") - assertTrue response.data.success - assertEquals "test scorecard status2", response.data.data.name - assertEquals "test scorecard status2", response.data.data.description - - // verify the item is deleted - try { - response = client.get(path: "scorecard-status/${id}") - fail "the item should be deleted" - } catch (HttpResponseException e) { - assert e.response.status == 404 - assert e.response.data.success == false - assert e.response.data.message.contains("not found") - } - } - - /** - * Error will occurs when saving the instance. - */ - void testRESTfulSavingFail() { - def client = new RESTClient("http://localhost:8080/scorecard_tool/json/") - try { - client.post( - path: "scorecard-status", - body: [ data: [ : ] ], - requestContentType : ContentType.JSON.toString() - ) - fail "Should throw HttpResponseException" - } catch (HttpResponseException e) { - assert e.response.status == 500 - assert e.response.data.success == false - assert e.response.data.message.contains("null") - } - } -} diff --git a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardTypeIntegrationTests.groovy b/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardTypeIntegrationTests.groovy deleted file mode 100644 index bbacd0935..000000000 --- a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardTypeIntegrationTests.groovy +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. - */ -package com.topcoder.admin.scorecards - -import grails.test.* - -/** - * This class is integration test cases for ScorecardType domain. - * - * @author TCSASSEMBER - * @version 1.0 - */ -class ScorecardTypeIntegrationTests extends GroovyTestCase { - /** - * Set up the test environment. - */ - protected void setUp() { - super.setUp() - } - - /** - * Tear down the test environment - */ - protected void tearDown() { - super.tearDown() - } - - /** - * Test that the name cannot be null. - */ - void testNameNull() { - def scorecardType = new ScorecardType( - description:'description', - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardType.validate() - assertEquals "There should be only 1 error", 1, scorecardType.errors.getAllErrors().size() - def badField = scorecardType.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - } - - /** - * Test that the name cannot be blank. - */ - void testNameBlank() { - def scorecardType = new ScorecardType( - name:' ', - description:'description', - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardType.validate() - assertEquals "There should be only 1 error", 1, scorecardType.errors.getAllErrors().size() - def badField = scorecardType.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - } - - /** - * Test that the name must be unique. - */ - void testNameUnique() { - def p = new ScorecardType( - name:'type', - description:'description', - createUser:'root', - modifyUser:'root' - ) - p.save(flush:true) - - def scorecardType = new ScorecardType( - name:'type', - description:'description', - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardType.validate() - assertEquals "There should be only 1 error", 1, scorecardType.errors.getAllErrors().size() - def badField = scorecardType.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - - p.delete() - } - - /** - * Test the max size of the name. - */ - void testNameMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def scorecardType = new ScorecardType( - name:sb, - description:'description', - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardType.validate() - assertEquals "There should be only 1 error", 1, scorecardType.errors.getAllErrors().size() - def badField = scorecardType.errors.getFieldError('name') - assertNotNull "Expecting to find an error on the name field", badField - } - - /** - * Test that the description cannot be null. - */ - void testDescriptionNull() { - def scorecardType = new ScorecardType( - name:'type', - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardType.validate() - assertEquals "There should be only 1 error", 1, scorecardType.errors.getAllErrors().size() - def badField = scorecardType.errors.getFieldError('description') - assertNotNull "Expecting to find an error on the description field", badField - } - - /** - * Test that the description cannot be blank. - */ - void testDescriptionBlank() { - def scorecardType = new ScorecardType( - name:'type', - description:' ', - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardType.validate() - assertEquals "There should be only 1 error", 1, scorecardType.errors.getAllErrors().size() - def badField = scorecardType.errors.getFieldError('description') - assertNotNull "Expecting to find an error on the description field", badField - } - - /** - * Test the max size the description. - */ - void testDescriptionMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 255; i++) { - sb.append 'a' - } - def scorecardType = new ScorecardType( - name:'type', - description:sb, - createUser:'root', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardType.validate() - assertEquals "There should be only 1 error", 1, scorecardType.errors.getAllErrors().size() - def badField = scorecardType.errors.getFieldError('description') - assertNotNull "Expecting to find an error on the description field", badField - } - - /** - * Test that the create user field cannot be blank. - */ - void testCreateUserBlank() { - def scorecardType = new ScorecardType( - name:'type', - description:'desc', - createUser:' ', - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardType.validate() - assertEquals "There should be only 1 error", 1, scorecardType.errors.getAllErrors().size() - def badField = scorecardType.errors.getFieldError('createUser') - assertNotNull "Expecting to find an error on the createUser field", badField - } - - /** - * Test the max size of create user field. - */ - void testCreateUserMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def scorecardType = new ScorecardType( - name:'type', - description:'desc', - createUser:sb, - modifyUser:'root' - ) - - assertFalse "Validation should not succeed", scorecardType.validate() - assertEquals "There should be only 1 error", 1, scorecardType.errors.getAllErrors().size() - def badField = scorecardType.errors.getFieldError('createUser') - assertNotNull "Expecting to find an error on the createUser field", badField - } - - /** - * Test that the modify user field cannot be blank. - */ - void testModifyUserBlank() { - def scorecardType = new ScorecardType( - name:'type', - description:'desc', - createUser:'root', - modifyUser:' ' - ) - - assertFalse "Validation should not succeed", scorecardType.validate() - assertEquals "There should be only 1 error", 1, scorecardType.errors.getAllErrors().size() - def badField = scorecardType.errors.getFieldError('modifyUser') - assertNotNull "Expecting to find an error on the modifyUser field", badField - } - - /** - * Test the max size of the modify user field. - */ - void testModifyUserMaxSize() { - def sb = new StringBuffer() - for (int i = 0; i < 65; i++) { - sb.append 'a' - } - def scorecardType = new ScorecardType( - name:'type', - description:'desc', - createUser:'root', - modifyUser:sb - ) - - assertFalse "Validation should not succeed", scorecardType.validate() - assertEquals "There should be only 1 error", 1, scorecardType.errors.getAllErrors().size() - def badField = scorecardType.errors.getFieldError('modifyUser') - assertNotNull "Expecting to find an error on the modifyUser field", badField - } - - /** - * Test that the ORM mapping can work. - */ - void testMapping() { - def scorecardType = new ScorecardType( - name:'type', - description:'desc', - createUser:'root', - modifyUser:'root' - ) - - scorecardType.save(flush:true) - def retrieveScorecardType = ScorecardType.findByName('type') - assertNotNull 'The object should be persistence to the database', retrieveScorecardType - assertEquals retrieveScorecardType.name, scorecardType.name - assertEquals retrieveScorecardType.description, scorecardType.description - assertEquals retrieveScorecardType.createUser, scorecardType.createUser - assertEquals retrieveScorecardType.modifyUser, scorecardType.modifyUser - assertNotNull retrieveScorecardType.dateCreated - assertNotNull retrieveScorecardType.lastUpdated - scorecardType.delete(flush:true) - } -} diff --git a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardTypeRESTfulTests.groovy b/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardTypeRESTfulTests.groovy deleted file mode 100644 index e5e952e80..000000000 --- a/scorecard_tool/test/integration/com/topcoder/admin/scorecards/ScorecardTypeRESTfulTests.groovy +++ /dev/null @@ -1,108 +0,0 @@ -/* -* Copyright (C) 2011 TopCoder Inc., All Rights Reserved. -*/ -package com.topcoder.admin.scorecards - -import grails.test.* -import groovyx.net.http.ContentType -import groovyx.net.http.HttpResponseException -import groovyx.net.http.RESTClient - - -/** -* This class is unit test class for the RESTful service of ScorecardType -* domain. -* -* @author TCSASSEMBER -* @version 1.0 -*/ -class ScorecardTypeRESTfulTests extends GroovyTestCase { - /** - * Set up the environment. - */ - protected void setUp() { - super.setUp() - } - - /** - * Tear down the environment. - */ - protected void tearDown() { - super.tearDown() - } - - /** - * Test the RESTful functionality. - */ - void testRESTfulCURD() { - def client = new RESTClient("http://localhost:8080/scorecard_tool/json/") - def response - - // POST, create a new instance - response = client.post( - path: "scorecard-type", - body: [ data: [ name: "test scorecard type", description: "test scorecard type", dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - assertEquals "test scorecard type", response.data.data.name - assertEquals "test scorecard type", response.data.data.description - - def id = response.data.data.id - - // GET (list) - response = client.get(path: "scorecard-type") - assertTrue response.data.success - - // GET (single item) - response = client.get(path: "scorecard-type/${id}") - assertTrue response.data.success - assertEquals "test scorecard type", response.data.data.name - assertEquals "test scorecard type", response.data.data.description - - // PUT - response = client.put( - path: "scorecard-type/${id}", - body: [ data: [ name: "test scorecard type2", description: "test scorecard type2", dateCreated: new Date(), lastUpdated: new Date() ] ], - requestContentType : ContentType.JSON.toString() - ) - assertTrue response.data.success - assertEquals "test scorecard type2", response.data.data.name - assertEquals "test scorecard type2", response.data.data.description - - // DELETE - response = client.delete(path: "scorecard-type/${id}") - assertTrue response.data.success - assertEquals "test scorecard type2", response.data.data.name - assertEquals "test scorecard type2", response.data.data.description - - // verify the item is deleted - try { - response = client.get(path: "scorecard-type/${id}") - fail "the item should be deleted" - } catch (HttpResponseException e) { - assert e.response.status == 404 - assert e.response.data.success == false - assert e.response.data.message.contains("not found") - } - } - - /** - * Error will occurs when saving the instance. - */ - void testRESTfulSavingFail() { - def client = new RESTClient("http://localhost:8080/scorecard_tool/json/") - try { - client.post( - path: "scorecard-type", - body: [ data: [ : ] ], - requestContentType : ContentType.JSON.toString() - ) - fail "Should throw HttpResponseException" - } catch (HttpResponseException e) { - assert e.response.status == 500 - assert e.response.data.success == false - assert e.response.data.message.contains("null") - } - } -} diff --git a/scorecard_tool/test/unit/com/topcoder/admin/scorecards/ScorecardServiceTests.groovy b/scorecard_tool/test/unit/com/topcoder/admin/scorecards/ScorecardServiceTests.groovy deleted file mode 100644 index e9d01d19d..000000000 --- a/scorecard_tool/test/unit/com/topcoder/admin/scorecards/ScorecardServiceTests.groovy +++ /dev/null @@ -1,17 +0,0 @@ -package com.topcoder.admin.scorecards - -import grails.test.* - -class ScorecardServiceTests extends GrailsUnitTestCase { - protected void setUp() { - super.setUp() - } - - protected void tearDown() { - super.tearDown() - } - - void testSomething() { - - } -} diff --git a/scorecard_tool/update_roles.sql b/scorecard_tool/update_roles.sql deleted file mode 100644 index 4bb8758e8..000000000 --- a/scorecard_tool/update_roles.sql +++ /dev/null @@ -1,8 +0,0 @@ -delete user_role_xref where role_id = 99099; -delete security_roles where role_id = 99099; - -insert into 'informix'.security_roles(role_id, description, create_user_id) -values('99099', 'Scorecard Administrator', null); - -insert into 'informix'.user_role_xref(user_role_id, login_id, role_id, create_user_id, security_status_id) -values('99099', '132456', '99099', '132456', '1'); \ No newline at end of file diff --git a/scorecard_tool/web-app/WEB-INF/applicationContext.xml b/scorecard_tool/web-app/WEB-INF/applicationContext.xml deleted file mode 100644 index 6f427963b..000000000 --- a/scorecard_tool/web-app/WEB-INF/applicationContext.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - Grails application factory bean - - - - - - A bean that manages Grails plugins - - - - - - - - - - - - - - - - - - classpath*:**/grails-app/**/*.groovy - - - - - - utf-8 - - - \ No newline at end of file diff --git a/scorecard_tool/web-app/WEB-INF/sitemesh.xml b/scorecard_tool/web-app/WEB-INF/sitemesh.xml deleted file mode 100644 index a547b41ae..000000000 --- a/scorecard_tool/web-app/WEB-INF/sitemesh.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/scorecard_tool/web-app/WEB-INF/tld/c.tld b/scorecard_tool/web-app/WEB-INF/tld/c.tld deleted file mode 100644 index 22698c97d..000000000 --- a/scorecard_tool/web-app/WEB-INF/tld/c.tld +++ /dev/null @@ -1,563 +0,0 @@ - - - - - JSTL 1.1 core library - JSTL core - 1.1 - c - http://java.sun.com/jsp/jstl/core - - - - Provides core validation features for JSTL tags. - - - org.apache.taglibs.standard.tlv.JstlCoreTLV - - - - - - Catches any Throwable that occurs in its body and optionally - exposes it. - - catch - org.apache.taglibs.standard.tag.common.core.CatchTag - JSP - - -Name of the exported scoped variable for the -exception thrown from a nested action. The type of the -scoped variable is the type of the exception thrown. - - var - false - false - - - - - - Simple conditional tag that establishes a context for - mutually exclusive conditional operations, marked by - <when> and <otherwise> - - choose - org.apache.taglibs.standard.tag.common.core.ChooseTag - JSP - - - - - Simple conditional tag, which evalutes its body if the - supplied condition is true and optionally exposes a Boolean - scripting variable representing the evaluation of this condition - - if - org.apache.taglibs.standard.tag.rt.core.IfTag - JSP - - -The test condition that determines whether or -not the body content should be processed. - - test - true - true - boolean - - - -Name of the exported scoped variable for the -resulting value of the test condition. The type -of the scoped variable is Boolean. - - var - false - false - - - -Scope for var. - - scope - false - false - - - - - - Retrieves an absolute or relative URL and exposes its contents - to either the page, a String in 'var', or a Reader in 'varReader'. - - import - org.apache.taglibs.standard.tag.rt.core.ImportTag - org.apache.taglibs.standard.tei.ImportTEI - JSP - - -The URL of the resource to import. - - url - true - true - - - -Name of the exported scoped variable for the -resource's content. The type of the scoped -variable is String. - - var - false - false - - - -Scope for var. - - scope - false - false - - - -Name of the exported scoped variable for the -resource's content. The type of the scoped -variable is Reader. - - varReader - false - false - - - -Name of the context when accessing a relative -URL resource that belongs to a foreign -context. - - context - false - true - - - -Character encoding of the content at the input -resource. - - charEncoding - false - true - - - - - - The basic iteration tag, accepting many different - collection types and supporting subsetting and other - functionality - - forEach - org.apache.taglibs.standard.tag.rt.core.ForEachTag - org.apache.taglibs.standard.tei.ForEachTEI - JSP - - -Collection of items to iterate over. - - items - false - true - java.lang.Object - - - -If items specified: -Iteration begins at the item located at the -specified index. First item of the collection has -index 0. -If items not specified: -Iteration begins with index set at the value -specified. - - begin - false - true - int - - - -If items specified: -Iteration ends at the item located at the -specified index (inclusive). -If items not specified: -Iteration ends when index reaches the value -specified. - - end - false - true - int - - - -Iteration will only process every step items of -the collection, starting with the first one. - - step - false - true - int - - - -Name of the exported scoped variable for the -current item of the iteration. This scoped -variable has nested visibility. Its type depends -on the object of the underlying collection. - - var - false - false - - - -Name of the exported scoped variable for the -status of the iteration. Object exported is of type -javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested -visibility. - - varStatus - false - false - - - - - - Iterates over tokens, separated by the supplied delimeters - - forTokens - org.apache.taglibs.standard.tag.rt.core.ForTokensTag - JSP - - -String of tokens to iterate over. - - items - true - true - java.lang.String - - - -The set of delimiters (the characters that -separate the tokens in the string). - - delims - true - true - java.lang.String - - - -Iteration begins at the token located at the -specified index. First token has index 0. - - begin - false - true - int - - - -Iteration ends at the token located at the -specified index (inclusive). - - end - false - true - int - - - -Iteration will only process every step tokens -of the string, starting with the first one. - - step - false - true - int - - - -Name of the exported scoped variable for the -current item of the iteration. This scoped -variable has nested visibility. - - var - false - false - - - -Name of the exported scoped variable for the -status of the iteration. Object exported is of -type -javax.servlet.jsp.jstl.core.LoopTag -Status. This scoped variable has nested -visibility. - - varStatus - false - false - - - - - - Like <%= ... >, but for expressions. - - out - org.apache.taglibs.standard.tag.rt.core.OutTag - JSP - - -Expression to be evaluated. - - value - true - true - - - -Default value if the resulting value is null. - - default - false - true - - - -Determines whether characters <,>,&,'," in the -resulting string should be converted to their -corresponding character entity codes. Default value is -true. - - escapeXml - false - true - - - - - - - Subtag of <choose> that follows <when> tags - and runs only if all of the prior conditions evaluated to - 'false' - - otherwise - org.apache.taglibs.standard.tag.common.core.OtherwiseTag - JSP - - - - - Adds a parameter to a containing 'import' tag's URL. - - param - org.apache.taglibs.standard.tag.rt.core.ParamTag - JSP - - -Name of the query string parameter. - - name - true - true - - - -Value of the parameter. - - value - false - true - - - - - - Redirects to a new URL. - - redirect - org.apache.taglibs.standard.tag.rt.core.RedirectTag - JSP - - -The URL of the resource to redirect to. - - url - false - true - - - -Name of the context when redirecting to a relative URL -resource that belongs to a foreign context. - - context - false - true - - - - - - Removes a scoped variable (from a particular scope, if specified). - - remove - org.apache.taglibs.standard.tag.common.core.RemoveTag - empty - - -Name of the scoped variable to be removed. - - var - true - false - - - -Scope for var. - - scope - false - false - - - - - - Sets the result of an expression evaluation in a 'scope' - - set - org.apache.taglibs.standard.tag.rt.core.SetTag - JSP - - -Name of the exported scoped variable to hold the value -specified in the action. The type of the scoped variable is -whatever type the value expression evaluates to. - - var - false - false - - - -Expression to be evaluated. - - value - false - true - - - -Target object whose property will be set. Must evaluate to -a JavaBeans object with setter property property, or to a -java.util.Map object. - - target - false - true - - - -Name of the property to be set in the target object. - - property - false - true - - - -Scope for var. - - scope - false - false - - - - - - Creates a URL with optional query parameters. - - url - org.apache.taglibs.standard.tag.rt.core.UrlTag - JSP - - -Name of the exported scoped variable for the -processed url. The type of the scoped variable is -String. - - var - false - false - - - -Scope for var. - - scope - false - false - - - -URL to be processed. - - value - false - true - - - -Name of the context when specifying a relative URL -resource that belongs to a foreign context. - - context - false - true - - - - - - Subtag of <choose> that includes its body if its - condition evalutes to 'true' - - when - org.apache.taglibs.standard.tag.rt.core.WhenTag - JSP - - -The test condition that determines whether or not the -body content should be processed. - - test - true - true - boolean - - - - diff --git a/scorecard_tool/web-app/WEB-INF/tld/fmt.tld b/scorecard_tool/web-app/WEB-INF/tld/fmt.tld deleted file mode 100644 index 3b9a54a87..000000000 --- a/scorecard_tool/web-app/WEB-INF/tld/fmt.tld +++ /dev/null @@ -1,671 +0,0 @@ - - - - - JSTL 1.1 i18n-capable formatting library - JSTL fmt - 1.1 - fmt - http://java.sun.com/jsp/jstl/fmt - - - - Provides core validation features for JSTL tags. - - - org.apache.taglibs.standard.tlv.JstlFmtTLV - - - - - - Sets the request character encoding - - requestEncoding - org.apache.taglibs.standard.tag.rt.fmt.RequestEncodingTag - empty - - -Name of character encoding to be applied when -decoding request parameters. - - value - false - true - - - - - - Stores the given locale in the locale configuration variable - - setLocale - org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag - empty - - -A String value is interpreted as the -printable representation of a locale, which -must contain a two-letter (lower-case) -language code (as defined by ISO-639), -and may contain a two-letter (upper-case) -country code (as defined by ISO-3166). -Language and country codes must be -separated by hyphen (-) or underscore -(_). - - value - true - true - - - -Vendor- or browser-specific variant. -See the java.util.Locale javadocs for -more information on variants. - - variant - false - true - - - -Scope of the locale configuration variable. - - scope - false - false - - - - - - Specifies the time zone for any time formatting or parsing actions - nested in its body - - timeZone - org.apache.taglibs.standard.tag.rt.fmt.TimeZoneTag - JSP - - -The time zone. A String value is interpreted as -a time zone ID. This may be one of the time zone -IDs supported by the Java platform (such as -"America/Los_Angeles") or a custom time zone -ID (such as "GMT-8"). See -java.util.TimeZone for more information on -supported time zone formats. - - value - true - true - - - - - - Stores the given time zone in the time zone configuration variable - - setTimeZone - org.apache.taglibs.standard.tag.rt.fmt.SetTimeZoneTag - empty - - -The time zone. A String value is interpreted as -a time zone ID. This may be one of the time zone -IDs supported by the Java platform (such as -"America/Los_Angeles") or a custom time zone -ID (such as "GMT-8"). See java.util.TimeZone for -more information on supported time zone -formats. - - value - true - true - - - -Name of the exported scoped variable which -stores the time zone of type -java.util.TimeZone. - - var - false - false - - - -Scope of var or the time zone configuration -variable. - - scope - false - false - - - - - - Loads a resource bundle to be used by its tag body - - bundle - org.apache.taglibs.standard.tag.rt.fmt.BundleTag - JSP - - -Resource bundle base name. This is the bundle's -fully-qualified resource name, which has the same -form as a fully-qualified class name, that is, it uses -"." as the package component separator and does not -have any file type (such as ".class" or ".properties") -suffix. - - basename - true - true - - - -Prefix to be prepended to the value of the message -key of any nested <fmt:message> action. - - prefix - false - true - - - - - - Loads a resource bundle and stores it in the named scoped variable or - the bundle configuration variable - - setBundle - org.apache.taglibs.standard.tag.rt.fmt.SetBundleTag - empty - - -Resource bundle base name. This is the bundle's -fully-qualified resource name, which has the same -form as a fully-qualified class name, that is, it uses -"." as the package component separator and does not -have any file type (such as ".class" or ".properties") -suffix. - - basename - true - true - - - -Name of the exported scoped variable which stores -the i18n localization context of type -javax.servlet.jsp.jstl.fmt.LocalizationC -ontext. - - var - false - false - - - -Scope of var or the localization context -configuration variable. - - scope - false - false - - - - - - Maps key to localized message and performs parametric replacement - - message - org.apache.taglibs.standard.tag.rt.fmt.MessageTag - JSP - - -Message key to be looked up. - - key - false - true - - - -Localization context in whose resource -bundle the message key is looked up. - - bundle - false - true - - - -Name of the exported scoped variable -which stores the localized message. - - var - false - false - - - -Scope of var. - - scope - false - false - - - - - - Supplies an argument for parametric replacement to a containing - <message> tag - - param - org.apache.taglibs.standard.tag.rt.fmt.ParamTag - JSP - - -Argument used for parametric replacement. - - value - false - true - - - - - - Formats a numeric value as a number, currency, or percentage - - formatNumber - org.apache.taglibs.standard.tag.rt.fmt.FormatNumberTag - JSP - - -Numeric value to be formatted. - - value - false - true - - - -Specifies whether the value is to be -formatted as number, currency, or -percentage. - - type - false - true - - - -Custom formatting pattern. - - pattern - false - true - - - -ISO 4217 currency code. Applied only -when formatting currencies (i.e. if type is -equal to "currency"); ignored otherwise. - - currencyCode - false - true - - - -Currency symbol. Applied only when -formatting currencies (i.e. if type is equal -to "currency"); ignored otherwise. - - currencySymbol - false - true - - - -Specifies whether the formatted output -will contain any grouping separators. - - groupingUsed - false - true - - - -Maximum number of digits in the integer -portion of the formatted output. - - maxIntegerDigits - false - true - - - -Minimum number of digits in the integer -portion of the formatted output. - - minIntegerDigits - false - true - - - -Maximum number of digits in the -fractional portion of the formatted output. - - maxFractionDigits - false - true - - - -Minimum number of digits in the -fractional portion of the formatted output. - - minFractionDigits - false - true - - - -Name of the exported scoped variable -which stores the formatted result as a -String. - - var - false - false - - - -Scope of var. - - scope - false - false - - - - - - Parses the string representation of a number, currency, or percentage - - parseNumber - org.apache.taglibs.standard.tag.rt.fmt.ParseNumberTag - JSP - - -String to be parsed. - - value - false - true - - - -Specifies whether the string in the value -attribute should be parsed as a number, -currency, or percentage. - - type - false - true - - - -Custom formatting pattern that determines -how the string in the value attribute is to be -parsed. - - pattern - false - true - - - -Locale whose default formatting pattern (for -numbers, currencies, or percentages, -respectively) is to be used during the parse -operation, or to which the pattern specified -via the pattern attribute (if present) is -applied. - - parseLocale - false - true - - - -Specifies whether just the integer portion of -the given value should be parsed. - - integerOnly - false - true - - - -Name of the exported scoped variable which -stores the parsed result (of type -java.lang.Number). - - var - false - false - - - -Scope of var. - - scope - false - false - - - - - - Formats a date and/or time using the supplied styles and pattern - - formatDate - org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag - empty - - -Date and/or time to be formatted. - - value - true - true - - - -Specifies whether the time, the date, or both -the time and date components of the given -date are to be formatted. - - type - false - true - - - -Predefined formatting style for dates. Follows -the semantics defined in class -java.text.DateFormat. Applied only -when formatting a date or both a date and -time (i.e. if type is missing or is equal to -"date" or "both"); ignored otherwise. - - dateStyle - false - true - - - -Predefined formatting style for times. Follows -the semantics defined in class -java.text.DateFormat. Applied only -when formatting a time or both a date and -time (i.e. if type is equal to "time" or "both"); -ignored otherwise. - - timeStyle - false - true - - - -Custom formatting style for dates and times. - - pattern - false - true - - - -Time zone in which to represent the formatted -time. - - timeZone - false - true - - - -Name of the exported scoped variable which -stores the formatted result as a String. - - var - false - false - - - -Scope of var. - - scope - false - false - - - - - - Parses the string representation of a date and/or time - - parseDate - org.apache.taglibs.standard.tag.rt.fmt.ParseDateTag - JSP - - -Date string to be parsed. - - value - false - true - - - -Specifies whether the date string in the -value attribute is supposed to contain a -time, a date, or both. - - type - false - true - - - -Predefined formatting style for days -which determines how the date -component of the date string is to be -parsed. Applied only when formatting a -date or both a date and time (i.e. if type -is missing or is equal to "date" or "both"); -ignored otherwise. - - dateStyle - false - true - - - -Predefined formatting styles for times -which determines how the time -component in the date string is to be -parsed. Applied only when formatting a -time or both a date and time (i.e. if type -is equal to "time" or "both"); ignored -otherwise. - - timeStyle - false - true - - - -Custom formatting pattern which -determines how the date string is to be -parsed. - - pattern - false - true - - - -Time zone in which to interpret any time -information in the date string. - - timeZone - false - true - - - -Locale whose predefined formatting styles -for dates and times are to be used during -the parse operation, or to which the -pattern specified via the pattern -attribute (if present) is applied. - - parseLocale - false - true - - - -Name of the exported scoped variable in -which the parsing result (of type -java.util.Date) is stored. - - var - false - false - - - -Scope of var. - - scope - false - false - - - - diff --git a/scorecard_tool/web-app/WEB-INF/tld/grails.tld b/scorecard_tool/web-app/WEB-INF/tld/grails.tld deleted file mode 100644 index 9bd036b8c..000000000 --- a/scorecard_tool/web-app/WEB-INF/tld/grails.tld +++ /dev/null @@ -1,550 +0,0 @@ - - - The Grails custom tag library - 0.2 - grails - http://grails.codehaus.org/tags - - - link - org.codehaus.groovy.grails.web.taglib.jsp.JspLinkTag - JSP - - action - false - true - - - controller - false - true - - - id - false - true - - - url - false - true - - - params - false - true - - true - - - form - org.codehaus.groovy.grails.web.taglib.jsp.JspFormTag - JSP - - action - false - true - - - controller - false - true - - - id - false - true - - - url - false - true - - - method - true - true - - true - - - select - org.codehaus.groovy.grails.web.taglib.jsp.JspSelectTag - JSP - - name - true - true - - - value - false - true - - - optionKey - false - true - - - optionValue - false - true - - true - - - datePicker - org.codehaus.groovy.grails.web.taglib.jsp.JspDatePickerTag - empty - - name - true - true - - - value - false - true - - - precision - false - true - - false - - - currencySelect - org.codehaus.groovy.grails.web.taglib.jsp.JspCurrencySelectTag - empty - - name - true - true - - - value - false - true - - true - - - localeSelect - org.codehaus.groovy.grails.web.taglib.jsp.JspLocaleSelectTag - empty - - name - true - true - - - value - false - true - - true - - - timeZoneSelect - org.codehaus.groovy.grails.web.taglib.jsp.JspTimeZoneSelectTag - empty - - name - true - true - - - value - false - true - - true - - - checkBox - org.codehaus.groovy.grails.web.taglib.jsp.JspCheckboxTag - empty - - name - true - true - - - value - true - true - - true - - - hasErrors - org.codehaus.groovy.grails.web.taglib.jsp.JspHasErrorsTag - JSP - - model - false - true - - - bean - false - true - - - field - false - true - - false - - - eachError - org.codehaus.groovy.grails.web.taglib.jsp.JspEachErrorTag - JSP - - model - false - true - - - bean - false - true - - - field - false - true - - false - - - renderErrors - org.codehaus.groovy.grails.web.taglib.jsp.JspEachErrorTag - JSP - - model - false - true - - - bean - false - true - - - field - false - true - - - as - true - true - - false - - - message - org.codehaus.groovy.grails.web.taglib.jsp.JspMessageTag - JSP - - code - false - true - - - error - false - true - - - default - false - true - - false - - - remoteFunction - org.codehaus.groovy.grails.web.taglib.jsp.JspRemoteFunctionTag - empty - - before - false - true - - - after - false - true - - - action - false - true - - - controller - false - true - - - id - false - true - - - url - false - true - - - params - false - true - - - asynchronous - false - true - - - method - false - true - - - update - false - true - - - onSuccess - false - true - - - onFailure - false - true - - - onComplete - false - true - - - onLoading - false - true - - - onLoaded - false - true - - - onInteractive - false - true - - true - - - remoteLink - org.codehaus.groovy.grails.web.taglib.jsp.JspRemoteLinkTag - JSP - - before - false - true - - - after - false - true - - - action - false - true - - - controller - false - true - - - id - false - true - - - url - false - true - - - params - false - true - - - asynchronous - false - true - - - method - false - true - - - update - false - true - - - onSuccess - false - true - - - onFailure - false - true - - - onComplete - false - true - - - onLoading - false - true - - - onLoaded - false - true - - - onInteractive - false - true - - true - - - formRemote - org.codehaus.groovy.grails.web.taglib.jsp.JspFormRemoteTag - JSP - - before - false - true - - - after - false - true - - - action - false - true - - - controller - false - true - - - id - false - true - - - url - false - true - - - params - false - true - - - asynchronous - false - true - - - method - false - true - - - update - false - true - - - onSuccess - false - true - - - onFailure - false - true - - - onComplete - false - true - - - onLoading - false - true - - - onLoaded - false - true - - - onInteractive - false - true - - true - - - invokeTag - org.codehaus.groovy.grails.web.taglib.jsp.JspInvokeGrailsTagLibTag - JSP - - it - java.lang.Object - true - NESTED - - - tagName - true - true - - true - - - diff --git a/scorecard_tool/web-app/WEB-INF/tld/spring.tld b/scorecard_tool/web-app/WEB-INF/tld/spring.tld deleted file mode 100644 index 1bc7091f0..000000000 --- a/scorecard_tool/web-app/WEB-INF/tld/spring.tld +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - 1.1.1 - - 1.2 - - Spring - - http://www.springframework.org/tags - - Spring Framework JSP Tag Library. Authors: Rod Johnson, Juergen Hoeller - - - - - htmlEscape - org.springframework.web.servlet.tags.HtmlEscapeTag - JSP - - - Sets default HTML escape value for the current page. - Overrides a "defaultHtmlEscape" context-param in web.xml, if any. - - - - defaultHtmlEscape - true - true - - - - - - - - escapeBody - org.springframework.web.servlet.tags.EscapeBodyTag - JSP - - - Escapes its enclosed body content, applying HTML escaping and/or JavaScript escaping. - The HTML escaping flag participates in a page-wide or application-wide setting - (i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml). - - - - htmlEscape - false - true - - - - javaScriptEscape - false - true - - - - - - - - message - org.springframework.web.servlet.tags.MessageTag - JSP - - - Retrieves the message with the given code, or text if code isn't resolvable. - The HTML escaping flag participates in a page-wide or application-wide setting - (i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml). - - - - code - false - true - - - - arguments - false - true - - - - text - false - true - - - - var - false - true - - - - scope - false - true - - - - htmlEscape - false - true - - - - javaScriptEscape - false - true - - - - - - - - theme - org.springframework.web.servlet.tags.ThemeTag - JSP - - - Retrieves the theme message with the given code, or text if code isn't resolvable. - The HTML escaping flag participates in a page-wide or application-wide setting - (i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml). - - - - code - false - true - - - - arguments - false - true - - - - text - false - true - - - - var - false - true - - - - scope - false - true - - - - htmlEscape - false - true - - - - javaScriptEscape - false - true - - - - - - - - hasBindErrors - org.springframework.web.servlet.tags.BindErrorsTag - JSP - - - Provides Errors instance in case of bind errors. - The HTML escaping flag participates in a page-wide or application-wide setting - (i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml). - - - - errors - org.springframework.validation.Errors - - - - name - true - true - - - - htmlEscape - false - true - - - - - - - - nestedPath - org.springframework.web.servlet.tags.NestedPathTag - JSP - - - Sets a nested path to be used by the bind tag's path. - - - - nestedPath - java.lang.String - - - - path - true - true - - - - - - - - bind - org.springframework.web.servlet.tags.BindTag - JSP - - - Provides BindStatus object for the given bind path. - The HTML escaping flag participates in a page-wide or application-wide setting - (i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml). - - - - status - org.springframework.web.servlet.support.BindStatus - - - - path - true - true - - - - ignoreNestedPath - false - true - - - - htmlEscape - false - true - - - - - - - - transform - org.springframework.web.servlet.tags.TransformTag - JSP - - - Provides transformation of variables to Strings, using an appropriate - custom PropertyEditor from BindTag (can only be used inside BindTag). - The HTML escaping flag participates in a page-wide or application-wide setting - (i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml). - - - - value - true - true - - - - var - false - true - - - - scope - false - true - - - - htmlEscape - false - true - - - - - diff --git a/scorecard_tool/web-app/css/scorecard/dashboard-ie6.css b/scorecard_tool/web-app/css/scorecard/dashboard-ie6.css deleted file mode 100644 index 77fa99dea..000000000 --- a/scorecard_tool/web-app/css/scorecard/dashboard-ie6.css +++ /dev/null @@ -1,57 +0,0 @@ -/* CSS Document */ - -#wrapper{ - width: 100%; - min-width: 1000px; -} - -#wrapperInner{ - margin-left: 1000px;; - height: 1px; -} - -#container{ - margin-left: -1000px; - height: 1px; - position: relative; -} - -#content{ - height: 1px; -} - -#area1 .area1Content{ - height: 100%; - overflow: hidden; -} - -#TB_window{ - position:absolute; - } - -#launchContestOut .tabContest .br{ - bottom:-15px; - } - -.tabHead .tr{ - right:-3px; - } -#winnerPanel{ -height: 1%; -} -.winnerCol{ float:left; width: 49%; } - -.containerNoPadding{ height: 1%;} - -#bankSelectionFolder { width: 180px; } -#bankSelectionContent{ overflow:visible; height: 1%; } - -.submissionAction ul{ float:left; margin: 10px 0 0 15px; } -.submissionListAction .dialog-mini-wrapper{ margin: -22px 0 0 -17px; } -#area2{ overflow:hidden; } -.project-box-mid{ margin: 0 0 -12px 0; } - -.additionalCol{ width: 140px; } -.posAbsolute{ top: 55px; left: 0px; } -#dropdownWrapper .dd .ddTitle{ margin-bottom:-3px; } -.warning-box-mid, .warning-box-bottom{ margin: -13px 0 0 0; } diff --git a/scorecard_tool/web-app/css/scorecard/dashboard-ie7.css b/scorecard_tool/web-app/css/scorecard/dashboard-ie7.css deleted file mode 100644 index fd11e8d7c..000000000 --- a/scorecard_tool/web-app/css/scorecard/dashboard-ie7.css +++ /dev/null @@ -1,133 +0,0 @@ - -#winnerPanel{ -height: 1%; -} -.winnerCol{ float:left; width: 49%; } - -.containerNoPadding{ height: 1%;} - -#bankSelectionFolder { width: 180px; } -#bankSelectionContent{ overflow:visible; height: 1%; } - -.submissionAction ul{ float:left; margin: 10px 0 0 15px; } -.submissionListAction .dialog-mini-wrapper{ margin: 0 0 0 -27px; } -#area2{ overflow:hidden; } -.project-box-mid{ margin: 0 0 -12px 0; } - -.additionalCol{ width: 140px; } -.posAbsolute{ top: 55px; left: 0px; } -#dropdownWrapper .dd .ddTitle{ - margin-bottom:-3px; -} - - #addScorecard input.status, - #addScorecard input.check, - input.status, - input.check{ - margin-top: 1px; - margin-right: 5px; - vertical-align: baseline; - } - -/* Expand All & Collapse All*/ -.expandCollapse{ - width: 210px; - vertical-align: middle; -} - .editSaveScorecard { - width: 300px !important; - } - .expandCollapse span.borderPipe, - .expandCollapse a.expandAll, - .expandCollapse a.collapseAll{ - position: relative; - top: 20px; - } - a.cancelChanges{ - margin-top: 20px; - } - a.saveChanges{ - margin-top: 20px; - } -/* head table*/ -table.project.scorecard thead tr, -table.project.scorecard thead th{ - position: relative; -} - - table.scorecard.view2 thead tr th a{ margin-top: -25px;} - table.scorecard.view2 tr.section a{ margin-top: -25px;} - input{vertical-align: middle; height: 16px;} - table.scorecard.view2 tr input{ height: 16px;} - -.pagination{ - height: 10px; -} -.pagination.top{ - margin-bottom: 15px; -} -.addWindow.ui-dialog-content.ui-widget-content{ - position: relative; -} -/*move group icon*/ -table.scorecard.view2 .relative .move.group{ - top: 0px; - padding: 0px; - width: 18px; - height: 19px; - left: -28px; -} -table.scorecard.view2.hover .relative .move.group{ - top: -1px; - left: -28px; -} -/* modal windows */ -#addScorecard2.addWindow .foot .buttons, -#addManually.addWindow .foot .buttons{ - margin-top:-10px; -} - -.checkMatch input{ - margin: 2px 0; - cursor: pointer; -} -.ui-dialog .areaHeader .expandCollapse{ - margin-top: -20px; - width: 240px; -} -.ui-dialog .areaHeader .leftAlign { - float: none; - -} -.ui-dialog .areaHeader .leftAlign a.button5.back{ - margin: 0; -} -/* hover question */ -table.scorecard.view2.edit tr.question.hover td{ - border-bottom:#e86200 2px solid; - border-top:#e86200 2px solid; -} -table.scorecard.view2.edit tr.question.hover td.first{ - border-left:#e86200 2px solid; -} -table.scorecard.view2.edit tr.question.hover td.btn{ - border-right:#e86200 2px solid; -} - -table.scorecard.view2.checks{ - table-layout: fixed; - width: 100%; -} -table.scorecard.view2.checks tr.question.hover td{ - border-bottom:#007500 2px solid; - border-top:#007500 2px solid; -} -table.scorecard.view2.checks tr.question.hover td.first{ - border-left:#007500 2px solid; -} -table.scorecard.view2.checks tr.question.hover td.btn{ - width: 24px; -} -table.scorecard.view2.checks tr.question.hover td.btn{ - border-right:#007500 2px solid; -} diff --git a/scorecard_tool/web-app/css/scorecard/dashboard.css b/scorecard_tool/web-app/css/scorecard/dashboard.css deleted file mode 100644 index 003021965..000000000 --- a/scorecard_tool/web-app/css/scorecard/dashboard.css +++ /dev/null @@ -1,4871 +0,0 @@ -/* - * CSS for pages under scorecards. - * - * Changes: - * - * Version 2.0 - TCCC-4119 - scorecard - update right side bar - * - Created document header. - * - Modified scorecard right side bar to match direct application right side bar. - * - */ - -/*------------ - MEMBER ----------------*/ - -.coderTextRed, .coderTextYellow, .coderTextBlue, .coderTextGreen, .coderTextGray, .coderTextOrange { -font-weight: bold; -background-color: transparent; -} -.coderTextRed:link, .coderTextYellow:link, .coderTextBlue:link, .coderTextGreen:link, .coderTextGray:link, .coderTextOrange:link, .coderTextWhite:link, .coderTextBlack:link { -text-decoration: none; -} -.coderTextRed:visited, .coderTextYellow:visited, .coderTextBlue:visited, .coderTextGreen:visited, .coderTextGray:visited, .coderTextOrange:visited, .coderTextWhite:visited, .coderTextBlack:visited { -text-decoration: none; -} -.coderTextRed:hover, .coderTextYellow:hover, .coderTextBlue:hover, .coderTextGreen:hover, .coderTextGray:hover, .coderTextOrange:hover, .coderTextWhite:hover, .coderTextBlack:hover { -text-decoration: underline; -} -.coderTextRed:active, .coderTextYellow:active, .coderTextBlue:active, .coderTextGreen:active, .coderTextGray:active, .coderTextOrange:active, .coderTextWhite:active, .coderTextBlack:active { -text-decoration: underline; -} - -/* Orange */ -.coderTextOrange, .coderTextOrange:link, .coderTextOrange:visited, .coderTextOrange:hover, .coderTextOrange:active { color: #FF9900; } -/* Red */ -.coderTextRed, .coderTextRed:link, .coderTextRed:visited, .coderTextRed:hover, .coderTextRed:active { color: #EE0000; } -/* Yellow */ -.coderTextYellow, .coderTextYellow:link, .coderTextYellow:visited, .coderTextYellow:hover, .coderTextYellow:active { color: #DDCC00; } -/* Blue */ -.coderTextBlue, .coderTextBlue:link, .coderTextBlue:visited, .coderTextBlue:hover, .coderTextBlue:active { color: #6666FF; } -/* Green */ -.coderTextGreen, .coderTextGreen:link, .coderTextGreen:visited, .coderTextGreen:hover, .coderTextGreen:active { color: #00A900; } -/* Gray */ -.coderTextGray, .coderTextGray:link, .coderTextGray:visited, .coderTextGray:hover, .coderTextGray:active { color: #999999; } -/* White */ -.coderTextWhite, .coderTextWhite:link, .coderTextWhite:visited, .coderTextWhite:hover, .coderTextWhite:active { color: #FFFFFF; } -/* Black */ -.coderTextBlack, .coderTextBlack:link, .coderTextBlack:visited, .coderTextBlack:hover, .coderTextBlack:active { color: #000000; } - - -BODY#page{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - background-color: #f6f6f6; - color: #333; -} - -/*------------ - WRAPPER ----------------*/ - -#content{ - min-width: 1000px; -} - -/*------------- - HEADER ----------------*/ - -#header{ - height: 120px; - background: url(../../images/header_dash_bg.png) repeat-x; - position: relative; -} - -#header .logo{ - position: absolute; - top: 44px; - left: 21px; - font-family: Geneva, Arial, Helvetica, sans-serif; - color: #333; - font-size: 16px; - text-decoration: none; -} - -#header .projectLogo{ - padding-left: 40px; - padding-top: 7px; - padding-bottom: 3px; - background: url(../../images/project_logo.png) no-repeat left; -} - -#header .helloUser{ /* this area will contain the logout, help links*/ - position: absolute; - right: 30px; - top: 8px; - font-size: 12px; -} - - #header .helloUser UL{ - list-style: none; - margin: 0; - padding: 0; - } - - #header .helloUser LI{ - float: left; - color: #444; - } - - #header .helloUser LI strong{ - color: #fffffe; - } - - #header .helloUser li.helloUserLink A{ - color: #fffffe; - padding: 0 5px; - text-decoration: none; - } - - #header .helloUser A:hover{ - color: #908986; - } - - #header .helloUser A.user{ - color: #ec1c23 !important; - font-weight: bold; - padding-left: 0; - } - - #header .helloUser li.helloUserLink A.help{ - padding-top: 2px; - } - -/*----------------- - TABS -------------------*/ - -/* tabs0 ( the header tabs )*/ -#tabs0{ - background: #362f2b; - position: absolute; - top: 0px; - left: 0px; - height: 33px; - width: 100%; -} - -#tabs0 UL{ - list-style: none; - padding: 0; - margin: 6px 0 6px 25px; - height: 21px; -} - -#tabs0 UL LI{ - float: left; - margin-right: 15px; -} - - #tabs0 UL LI A{ - color: #FFFFFE; - font-size: 12px; - font-weight: bold; - text-decoration: none; - height: 21px; - line-height: 21px; - float: left; - } - - #tabs0 UL LI A SPAN{ - height: 21px; - float: left; - display: inline-block; - padding: 0 17px 0 13px; - margin-left: 4px; - text-align: center; - cursor: pointer; - } - - - #tabs0 UL LI.on A{ - color: #262626; - background: url(../../images/top_nav_button_left.png) left top no-repeat; - } - - #tabs0 UL LI.on A:hover { - } - - #tabs0 UL LI.on A SPAN{ - background: url(../../images/top_nav_button.png) right top no-repeat; - } - - #tabs0 UL LI A:hover{ - color: #262626; - background: url(../../images/top_nav_button_left.png) 0 -21px no-repeat; - } - - #tabs0 UL LI A:hover SPAN{ - background: url(../../images/top_nav_button.png) right -21px no-repeat; - } - .scorecardLogo{ - position: absolute; - top: 54px; - right: 11px; - } - - .roundedBox{ - margin: 8px 0; - padding: 10px 0; - position: relative; - border: 1px solid #bdbdbd; - } - .tl,.tr,.bl,.br{ /* border corners */ - width: 4px; - height: 4px; - position: absolute; - background: url(../../images/borders3.png); - } - .tl{background-position: 0 0; top: -1px; left: -1px;} - .tr{background-position: -4px 0; top: -1px; right: -1px;} - .bl{background-position: 0 -4px; bottom: -1px; left: -1px;} - .br{background-position: -4px -4px; bottom: -1px; right: -1px;} - .roundedBox.results{ - margin: 0; - top: -1px; - } - #addScorecard2 .scorecardFind .row, - #addScorecard .scorecardFind .row{ - width: 680px; - overflow: hidden; - } - #addScorecard2 .scorecardFind .row label.caption, - #addScorecard .scorecardFind .row label.caption { - width: 220px; - float: left; - display: inline; - margin-right: 20px; - line-height: 28px; - height: 28px; - text-align: right; - font-weight: bold; - font-size: 14px; - color: #333; - font-family: arial; - } - #addScorecard2 .scorecardFind .wide.row label.caption, - #addScorecard .scorecardFind .wide.row label.caption{ - height: 56px; - } - #addScorecard2 .scorecardFind .row label.radioCaption, - #addScorecard2 .scorecardFind .row label.checkCaption, - #addScorecard .scorecardFind .row label.radioCaption, - #addScorecard .scorecardFind .row label.checkCaption{ - color: #333; - font-size: 12px; - min-width: 125px; - float: left; - margin: 5px; - line-height: 19px; - } - #addScorecard2 input.text, - #addScorecard input.text, - input.text{ - margin: 5px; - width: 370px; - height: 19px; - line-height: 19px; - font-size: 11px; - color: #000; - background-color: inherit; - } - #addScorecard2 input.status, - #addScorecard2 input.check, - #addScorecard input.status, - #addScorecard input.check, - input.status, - input.check{ - margin-top: 1px; - margin-right: 5px; - vertical-align: text-top; - } - #addScorecard2 select.combo, - #addScorecard select.combo, - select.combo{ - width: 215px; - height: 19px; - line-height: 19px; - margin: 5px; - font-size: 11px; - } - #addScorecard2 span.note, - #addScorecard span.note, - span.note{ - color: #ec1c23; - font-size: 11px; - } - .buttons{ - overflow: hidden; - margin-top:15px; - } - .buttons a.button7 span.right, - .buttons a.button6 span.right{ - padding-right: 20px; - padding-left: 20px; - } - .buttons a.button7 span.right{ - color: #666; - background-color: inherit; - } - - -/* tabs1 ( the main tabs )*/ -#tabs1{ - position: absolute; - top: 92px; - left: 21px; -} - -#tabs1 UL{ - list-style: none; - margin: 0; - padding: 0; -} - -#tabs1 UL LI{ - float: left; - margin: 0 3px; -} - - #tabs1 UL LI A{ - color: #FFF; - font-size: 12px; - font-weight: bold; - text-decoration: none; - background: #000 url(../../images/tabs_left.png) no-repeat left top; /* left corner */ - float: left; - } - - #tabs1 UL LI A SPAN{ - background: url(../../images/tabs_right.png) no-repeat right top; /* right corner */ - float: left; - height: 20px; - width: 100px; - padding-top: 8px; - /*padding-left: 33px;*/ - text-align: center; - cursor: pointer; - } - #tabs1.scorecardTabs ul li a span{ - width:160px; - } - - - #tabs1 UL LI A:hover{ - background-position: left bottom; - } - - #tabs1 UL LI A:hover SPAN{ - background-position: right bottom; - } - - #tabs1 UL LI.on A{ - color: #ec1c23; - background: url(../../images/tabs_left_on.png) no-repeat left; /* left corner */ - } - - #tabs1 UL LI.on A SPAN{ - background: url(../../images/tabs_right_on.png) no-repeat right; /* left corner */ - } - -/* tabs2 ( the right side tabs ) */ - -#tabs2{ - position: absolute; - top: 92px; - right: 21px; -} - -#tabs2 UL{ - list-style: none; - margin: 0; - padding: 0; -} - -#tabs2 UL LI{ - float: left; - margin: 0 3px; -} - -#tabs2 UL LI.last{ - margin-right:100px; - } - - #tabs2 UL LI A{ - color: #FFF; - font-size: 12px; - font-weight: bold; - text-decoration: none; - background: #000 url(../../images/tabs2_left.png) no-repeat left top; /* left corner */ - float: left; - } - - #tabs2 UL LI A SPAN{ - background: url(../../images/tabs2_right.png) no-repeat right top; /* right corner */ - float: left; - height: 20px; - width: 100px; - padding-top: 8px; - /*padding-left: 33px;*/ - text-align: center; - cursor: pointer; - } - - #tabs2 UL LI A:hover{ - background-position: left bottom; - } - - #tabs2 UL LI A:hover SPAN{ - background-position: right bottom; - } - - #tabs2 UL LI.on A{ - background-position: left bottom; - } - - #tabs2 UL LI.on SPAN{ - background-position: right bottom; - } - - -/* tabs3 (tabs on the contest details page) */ - -.tabs3Container{ - background: none !important; - width: 100%; - margin: 0; - padding: 0; -} - - -#tabs3{ - width: 100%; - overflow: hidden; - height: 40px; -} - -#tabs3 UL{ - height: 40px; - background: url(../../images/tabs3_bg.png) repeat-x top; - list-style: none; - margin: 0; - padding: 0; - overflow: hidden; - width: 100%; -} - - #tabs3 UL LI{ - float: left; - margin: 0; - padding: 0; - height: 40px; - width: 20%; - overflow: hidden; - } - - #tabs3 UL LI.lastItem{ - float: none; - width: auto; - } - - #tabs3 UL LI A{ - display: block; - width: 100%; - height: 100%; - text-decoration: none; - font-size: 12px; - font-weight: bold; - } - - #tabs3 UL LI A:hover{ - background: url(../../images/tabs3_bg_hover.png) repeat-x; - } - - #tabs3 UL LI A SPAN{ - float: left; - height: 40px; - width: 100%; - cursor: pointer; - } - - #tabs3 UL LI A.first SPAN.left{ /* tabs left corner */ - background: url(../../images/tabs3_left.png) no-repeat left top; - } - - #tabs3 UL LI A.last SPAN.left{ /* tabs right corner */ - background: url(../../images/tabs3_right.png) no-repeat right top; - } - - #tabs3 UL LI A.last SPAN.right{ - background: none; /* no right border for the last tab */ - } - - #tabs3 UL LI A SPAN.right{ - height: 30px; - padding-top: 10px; - text-align: center; - background: url(../../images/tabs3_border.png) no-repeat top right; - } - - #tabs3 UL LI A.first:hover SPAN.left{ - background-position: left bottom; - } - - #tabs3 UL LI A.last:hover SPAN.left{ - background-position: right bottom; - } - - #tabs3 UL LI.on A{ /* tabs on the active state */ - background: transparent url(../../images/tabs3_on.png) repeat-x top !important; - color: #FFF; - /*font-size: 14px;*/ - font-family: Verdana, Geneva, sans-serif; - } - #tabs3 UL LI.off A SPAN.right { - color: #a9a9a9; - } - - #tabs3 UL LI.on A SPAN.right{ - height: 32px; - padding-top: 8px; - background: url(../../images/tabs3_arrow.png) no-repeat center bottom; - } - - #tabs3 UL LI.on A.first SPAN.left{ - background: url(../../images/tabs3_left_on.png) no-repeat left; - } - - #tabs3 UL LI.on A.last SPAN.left{ - background: url(../../images/tabs3_right_on.png) no-repeat right; - } - -/* tabs4 */ - -.tabs4{ - padding-top: 10px; -} - - .tabs4 UL{ - list-style: none; - margin: 0; - padding: 0; - height: 21px; - background: url(../../images/content_border.png) repeat-x bottom; - } - - .tabs4 UL LI{ - float: left; - margin: 0 3px 0 0; - padding: 0; - } - - .tabs4 UL LI A{ - float: left; - background: url(../../images/tabs4_left.png) no-repeat left; - font-size: 12px; - text-decoration: none; - cursor: pointer; - } - - .tabs4 UL LI A SPAN{ - float: left; - background: url(../../images/tabs4_right.png) no-repeat right; - padding: 3px 10px 3px 10px; - cursor: pointer; - } - - .tabs4 UL LI.on A{ - background: url(../../images/tabs4_left_on.png) no-repeat left; - font-weight: bold; - } - - .tabs4 UL LI.on A SPAN{ - background: url(../../images/tabs4_right_on.png) no-repeat right; - } - -.tabs4Content{ - border: 1px solid #bdbdbd; - border-top: none; - background-color: #e8e8e8; - padding: 10px; -} - - .tabs4Content H2{ /* title */ - margin: 0; - padding: 0; - font-size: 14px; - } - - .tabs4Content P{ - margin: 0; - padding: 2px 0; - font-size: 12px; - } - - .tabs4Content .message P{ - font-size: 11px; - } - -.details TABLE.projectStats{ - margin-top: 5px; - margin-bottom: 5px; -} - -.details TABLE.projectStats TD{ - font-size: 12px !important; - font-weight: normal !important; - background-color: #FFF; - text-align: left; - padding-left: 10px; -} - -.details TABLE.projectStats TD.column1{ /* the first column */ - width: 3%; -} - -.details TABLE.projectStats TD.column2{ - text-align: center; -} - -.details .questions{ - padding: 5px 0; -} - -.filesContainer{ - height: 100%; - overflow: hidden; -} - -.file{ - height: 80px; - width: 45%; - float: left; - font-size: 12px; - padding: 10px 0; -} - -.file IMG{ - float: left; -} - -.file .fileName{ - float: left; - padding-top: 32px; - padding-left: 5px; -} - -/*---------------- - MAIN CONTENT ------------------*/ - -#mainContent{ - background: #FFF url(../../images/area2_bg2.png) repeat-y right; - width: 100%; - overflow: hidden; - color: #333; -} - -#area1{ - padding-left: 25px; - padding-bottom: 100px; - padding-right: 290px; -} - -/*----- area1 ------*/ - -#area1 .currentPage{ /* page links on the top of the page */ - color: #333; - font-size: 11px; - padding-top: 10px; -} - - #area1 .currentPage A{ - text-decoration: none; - } - - #area1 .currentPage A.home{ - background: url(../../images/home_ico.png) no-repeat left 2px; - padding-left: 15px; - } - - #area1 .currentPage A:hover{ - text-decoration: underline; - } - -#area1 .areaHeader{ - padding: 30px 0 10px 0; - position: relative; -} - #area1 .areaHeader p.leftAlign{ - float: left; - } - -#area1 H2.title{ /* main content title */ - font-family: Geneva, Arial, Helvetica, sans-serif; - font-size: 16px; - font-weight: normal; - background: url(../../images/area_title.png) no-repeat left center; - padding-left: 43px; - padding-bottom: 10px; - padding-top: 5px; - font-weight: bold; -} - #area1.scorecard H2.title{ background-image: url(../../images/area_title2.png);} - - #area1 H2.title.details{background-image: url(../../images/area_title3.png);} - #area1 H2.title.edit{background-image: url(../../images/area_title4.png);} - -#area1 H2.contestTitle{ - background: url(../../images/contest_ico.png) no-repeat left center; -} - -#area1 H2.notificationTitle{ - background: url(../../images/notification_ico.png) no-repeat left center; -} - - - -.areaHeader A.button1{ - position: absolute; - right: 0; - top: 36px ; -} - - -/* the coPilot DIV */ -.copilotArea { - - background: url(../../images/box_top2.png) no-repeat top; - padding: 15px 0 15px 9px; - position:relative; - overflow: hidden; - margin-top:450px; -} - -.coPilotTitle { - background: url(../../images/title2_left.png) no-repeat left; - width: 210px; - margin: 0 auto; -} - - .coPilotTitle .titleInner { - background: url(../../images/title2_right.png) no-repeat right; - height: 35px; - } - - - .coPilotTitle .titleInner A.title{ - float: left; - width: 70px; - font-size: 14px; - line-height: 35px; - font-family: Verdana, Geneva, sans-serif; - font-weight: normal; - padding-left: 11px; - background: url(../../images/help_ico2.png) no-repeat right; - text-decoration: none; - } - - .copilotArea .number{ - color: #ec1c23; - padding-left: 5px; - padding-right: 5px; - } - - .coPilotTitle .titleInner .button6 { - font-family: "Myriad Pro", Verdana, Geneva, sans-serif; - margin-top: 5px; - margin-right: 10px; - width: 45px; - height: 24px; - text-align: center; - } - - .coPilotTitle .titleInner .button6 SPAN.right { - padding-right: 25px; - padding-left: 8px; - } - - .coPilotContent { - margin: 9px 0 0 28px; - font-family: Arial, Verdana, Geneva, sans-serif; - font-size: 11px; - color: #f8efe5; - overflow: hidden; - } - - .coPilotContent DL { - margin: 0 0 3px 0; - overflow: hidden; - } - - .coPilotContent DT { - float: left; - width: 190px; - } - - .coPilotContent DD { - float: left; - width: 20px; - } - -/*--- Area2 (the right column area )--*/ - -#area2{ - float: right; - width: 272px; - overflow: hidden; -} - -.box{ - background: url(../../images/box_top2.png) no-repeat top; - padding: 15px 0 15px 9px; - position: static; -} - -.box H2{ /*My Projects title*/ - font-size: 20px; - font-family: "Myriad pro", Arial, Helvetica, sans-serif; - background: transparent url(../../images/my_project_ico.png) no-repeat left; - margin: 0 0 10px 0; - padding-left: 41px; - color: #FFF; - font-weight: normal; -} - -.box P.label{ - margin: 17px 0 5px 0; - font-size: 12px; - color: #f8efe5; - font-weight: bold; -} - -.contestsContainer{ - position: relative; -} - -.box .inputSelect{ /* the input/select container*/ - background: url(../../images/select_input_bg.png) no-repeat; - width: 252px; - height: 26px; - padding-left: 10px; - padding-top: 2px; - margin-bottom: 11px; - position: relative; -} - -.box .inputSelect INPUT{ - border: 0; - width: 213px; - font-size: 12px; -} - -.box .inputSelect A.selectIco{ /* the drop down ico */ - display: block; - position: absolute; - background: url(../../images/select_input_ico.png) no-repeat; - width: 24px; - height: 23px; - top: 3px; - right: 13px; -} - -/* The drop down list */ -.box .contestsDropDown{ - border: 1px solid #d0d2d3; - background-color: #FFF; - width: 250px; - position: absolute; - top: 48px; - display: none; - color: #333; - z-index: 999; -} - -.contestsDropDown UL{ - margin: 0 !important; - padding: 0 !important; - list-style: none; -} - -.contestsDropDown UL LI{ - margin: 0 !important; - padding: 3px 6px!important; - cursor: pointer; -} - -.contestsDropDown UL LI.hover{ - background-color: #ffffcc !important; -} - -.contestsDropDown UL LI.even{ - background-color: #f3f3f3; -} - -.contestsDropDown UL LI A{ - text-decoration: none; - font-size: 12px; -} - -/*-----------------*/ - -.box .contestsList{ /* the container of the contests list */ - background: url(../../images/contest_bottom.png) no-repeat bottom left; - padding-bottom: 4px; - width: 253px; -} - - .box .contestsList .caption{ - background: url(../../images/contests_caption.png) no-repeat; - width: 253px; - height: 28px; - font-size: 12px; - color: #333; - padding-top: 7px; - padding-left: 10px; - } - - .contestsList .caption SELECT{ - width: 110px; - } - - -.contestsContent{ - background: url(../../images/contest_list_bg.png) repeat-y; - padding-left: 1px; - padding-right: 1px; - width: 250px; - height: 237px; - overflow: auto; -} - -.contestsContent TABLE{ - font-size: 11px; - border-collapse: collapse; -} - -.contestsContent TABLE TD{ - background-color: #fcfcfc; - padding: 5px 0; -} - -.contestsContent TABLE TR{ - border-top: 1px solid #d0d2d3; - border-bottom: 1px solid #d0d2d3; -} - -.contestsContent TABLE TR.last{ - border-bottom: none; -} - -.contestsContent TABLE TR TD{ - background-color: #fcfcfc; - cursor: pointer; -} - -.contestsContent TABLE TR.even TD{ - background-color: #ececec; -} - -/* contest status */ - -.contestsContent TD.status{ - width: 30px; -} - -.contestsContent .status SPAN{ - display: block; - width: 11px; - height: 11px; - margin-left: 10px; -} - -.contestsContent .status SPAN SPAN{ - display: none; -} - -.contestsContent .draft{ - background: url(../../images/draft_ico.png) no-repeat; -} - -.contestsContent .running{ - background: url(../../images/running_ico.png) no-repeat; -} - -.contestsContent .milstone{ - background: url(../../images/milestone_ico.png) no-repeat; -} - -.contestsContent .awarding{ - background: url(../../images/awarding_ico.png) no-repeat; -} - -.contestsContent .failedReview{ - background: url(../../images/milestone_ico.png) no-repeat; -} - -.contestsContent .highlight TD{ - background-color: #ffffcc !important; - font-weight: bold; - color:#F00; -} - -/* contest type */ - -.contestsContent TD.type{ - width: 30px; - padding-left: 5px; -} - -.contestsContent .type SPAN{ - display: block; - width: 16px; - height: 16px; -} - -.contestsContent .type SPAN SPAN{ - display: none; -} - -.contestsContent .wType{ - background: url(../../images/w_type.png) no-repeat; -} - -.contestsContent .pType{ - background: url(../../images/p_type.png) no-repeat; -} - -.contestsContent .lType{ - background: url(../../images/l_type.png) no-repeat; -} - -.contestsContent .sType{ - background: url(../../images/s_type.png) no-repeat; -} - -.contestsContent .WType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .PType{ - background: url(../images/p_type.png) no-repeat; -} - -.contestsContent .LType{ - background: url(../images/l_type.png) no-repeat; -} - -.contestsContent .SType{ - background: url(../images/s_type.png) no-repeat; -} - -.contestsContent .WdType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .IType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .PrType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .AdType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .FType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .BType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .MdType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .OType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .WdType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .SpType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .ArType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .CdType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .CvType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .AsType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .TType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .TsType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .RbType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .RcType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .AgType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .MType{ - background: url(../images/w_type.png) no-repeat; -} - -.contestsContent .CpType{ - background: url(../images/w_type.png) no-repeat; -} - -P.projectArchive{ - margin: 4px 0; - text-align: right; - padding-right: 10px; - display: block; - font-size: 11px; - background: transparent; -} - - P.projectArchive A{ - color: #FFF; - text-decoration: underline; - } - - P.projectArchive A:hover{ - text-decoration: none; - } - - -.box .title2{ /* links title */ - background: url(../../images/title2_left.png) no-repeat left; - width: 210px; - margin: 0 auto; -} -.space{ - margin-top:20px; -} -.project-box .title2{ /* links title */ - - background: url(../../images/title2_left.png) no-repeat left; - width: 210px; - margin: 0 auto; -} - - .box .title2 .titleInner{ /* links title */ - background: url(../../images/title2_right.png) no-repeat right; - height: 35px; - } - - .project-box .title2 .titleInner{ /* links title */ - background: url(../../images/title2_right.png) no-repeat right; - height: 35px; - } - -.box .title2 H3{ /* links title */ - font-size: 14px; - font-family: Verdana, Geneva, sans-serif; - margin: 0; - font-weight: normal; - padding-top: 9px; - padding-left: 11px; -} - -.project-box .title2 H3{ /* links title */ - font-size: 14px; - font-family: Verdana, Geneva, sans-serif; - margin: 0; - font-weight: normal; - padding-top: 9px; - padding-left: 11px; -} - -.box UL{ /* links list */ - list-style: none; - margin: 0 auto; - padding: 10px 0 0 8px; - width: 210px; -} - - .box UL LI{ - margin: 3px 0; - } - - .box UL.links A{ - color: #efe2d2; - font-family: Verdana, Geneva, sans-serif; - font-size: 13px; - text-decoration: none; - background: transparent url(../../images/li_arrow.png) no-repeat left; - padding-left: 15px; - } - - .box UL.links A:hover{ - color: #FFF; - background-color: transparent; - } - - - -.project-box UL{ /* links list */ - list-style: none; - margin: 0 auto; - padding: 10px 0 0 8px; - width: 210px; -} - - .project-box UL LI{ - margin: 3px 0; - } - - .project-box UL.links A{ - color: #efe2d2; - font-family: Verdana, Geneva, sans-serif; - font-size: 13px; - text-decoration: none; - background: transparent url(../../images/li_arrow.png) no-repeat left; - padding-left: 15px; - } - - .project-box UL.links A:hover{ - color: #FFF; - background-color: transparent; - } - - -/*-- Calendar --*/ - -#calendar{ - margin-bottom: 20px; -} - -table.fc-header { /* calendar header */ - width: 100%; - background: #37302e url(../../images/calendar_header.png) repeat-x left top; - height: 33px !important; - color: #FFF; - font-size: 14px !important; - font-family: Verdena, Geneva, sans-serif !important; -} - - -.fc-event a{ /* event */ - font-size: 11px; - padding-left: 14px; - background-position: left 3px; - background-repeat: no-repeat; - margin-left: 4px; - text-decoration: none; - float: left; -} - .fc-event a:hover{ - text-decoration: underline; - } - - .fc-event a.launch{ /* style for contest launch,spec post, review complete and review pending */ - background-image: url(../../images/event_launch_ico.png); - background-color: transparent; - color: #ff0000; - } - - .fc-event a.task{ /* style for Task */ - background-image: url(../../images/event_task_ico.png); - background-color: transparent; - color: #0497ee; - } - - .fc-event a.forum{ /* style for forum post */ - background-image: url(../../images/event_forum_ico.png); - background-color: transparent; - color: #17c000; - } - - .fc-event a.milestone{ /* style for milstone feed back */ - background-image: url(../../images/event_milestone_ico.png); - background-color: transparent; - color: #bdbdbd; - } - - .fc-event a.winner{ /* style for winner announcement */ - background-image: url(../../images/event_winner_ico.png); - background-color: transparent; - color: #ff6600; - } - -/*---- Notification Setting ---*/ - -SPAN.notif-text{ - font-size: 11px; -} - -DIV.notif-div{ - margin-top: 13px; - margin-bottom: 4px; -} - - -/*---- Tooltip ---*/ - -.tooltipContainer{ - position: absolute; - width: 182px; - padding-left: 4px; - z-index: 999; - display: none; - color: #000; - background-color: transparent; -} - - .tooltipContainer SPAN.arrow{ - position: absolute; - left: 0; - top: 40px; - display: block; - width: 5px; - height: 7px; - background: url(../../images/popup_arrow.png) no-repeat; - } - - .tooltipContainer .tooltipLeft{ - color: #000; - background: #FFF url(../../images/tooltip_border.png) repeat-y left; - } - - .tooltipContainer .tooltipRight{ - background: url(../../images/tooltip_border.png) repeat-y right; - } - - .tooltipContainer .tooltipBottom{ - background: url(../../images/tooltip_border.png) repeat-x bottom; - } - - .tooltipContainer .tooltipBottomLeft{ - background: url(../../images/tooltip_bottom_left.png) no-repeat bottom left; - } - - .tooltipContainer .tooltipBottomRight{ - background: url(../../images/tooltip_bottom_right.png) no-repeat bottom right; - } - -/* red caption*/ -.tooltipCaption{ - background: url(../../images/tooltip_bg.png) repeat-x; -} - -.tooltipCaptionLeft{ - background: url(../../images/tooltip_caption_left.png) no-repeat left; -} - -.tooltipCaptionRight{ - background: url(../../images/tooltip_caption_right.png) no-repeat right; -} - -/* Blue Caption*/ - -.tooltipTask .tooltipCaption{ - background: url(../../images/tooltip_bg_task.png) repeat-x; -} - -.tooltipTask .tooltipCaptionLeft{ - background: url(../../images/tooltip_caption_left_task.png) no-repeat left; -} - -.tooltipTask .tooltipCaptionRight{ - background: url(../../images/tooltip_caption_right_task.png) no-repeat right; -} - -/* Green Caption */ - -.tooltipForum .tooltipCaption{ - background: url(../../images/tooltip_bg_forum.png) repeat-x; -} - -.tooltipForum .tooltipCaptionLeft{ - background: url(../../images/tooltip_caption_left_forum.png) no-repeat left; -} - -.tooltipForum .tooltipCaptionRight{ - background: url(../../images/tooltip_caption_right_forum.png) no-repeat right; -} - -/* Orange Caption */ - -.tooltipWinner .tooltipCaption{ - background: url(../../images/tooltip_bg_winner.png) repeat-x; -} - -.tooltipWinner .tooltipCaptionLeft{ - background: url(../../images/tooltip_caption_left_winner.png) no-repeat left; -} - -.tooltipWinner .tooltipCaptionRight{ - background: url(../../images/tooltip_caption_right_winner.png) no-repeat right; -} - -/* Gray Caption */ - -.tooltipMilestone .tooltipCaption{ - background: url(../../images/tooltip_bg_milestone.png) repeat-x; -} - -.tooltipMilestone .tooltipCaptionLeft{ - background: url(../../images/tooltip_caption_left_milestone.png) no-repeat left; -} - -.tooltipMilestone .tooltipCaptionRight{ - background: url(../../images/tooltip_caption_right_milestone.png) no-repeat right; -} - - -.tooltipCaptionInner{ - height: 26px; - position: relative; -} - -.tooltipCaptionInner H2{ - font-size: 12px; - color: #FFF; - background-color: transparent; - padding-top: 6px; - padding-left: 10px; - margin: 0; -} - -.tooltipCaptionInner A.closeIco{ - position: absolute; - width: 6px; - height: 8px; - background: url(../../images/popup_close_ico.png) no-repeat; - right: 5px; - top: 5px; - display: block; -} - -.tooltipContent{ - padding: 10px; - font-size: 12px; - color: #333; -} - - .tooltipContent H3{ - color: #ff0000; - background-color: transparent; - margin: 0 0 5px 0; - padding: 0; - font-size: 12px; - } - - .tooltipTask H3{ - color: #0497ee; - background-color: transparent; - } - - .tooltipForum H3{ - color: #17c000; - background-color: transparent; - } - - .tooltipMilestone H3{ - color: #bdbdbd; - } - - .tooltipWinner H3{ - color: #ff6600; - } - - .tooltipContent H4{ - font-size: 12px; - font-weight: normal; - margin: 0 0 4px 0; - padding: 0; - text-decoration: underline; - } - - .tooltipContent P{ - margin: 0; - padding: 0; - font-size: 11px; - } - - .tooltipContent P A{ - color: #0000cc; - } - -/*--- Container2 --*/ - -/* it's the container that containt the tabs on the contests page */ - -.container2{ - background: url(../../images/content_border.png) repeat-x top; -} - - .container2Left{ - background: url(../../images/content_border.png) repeat-y left; - } - - .container2Right{ - background: url(../../images/content_border.png) repeat-y right; - } - - .container2Bottom{ - background: url(../../images/container2_bottom.png) repeat-x bottom; - } - - .container2BottomClear{ - border-bottom: 1px solid #bdbdbd; - } - - .container2BottomLeft{ - background: url(../../images/container2_bottom_left.png) no-repeat bottom left; - } - - .container2BottomRight{ - background: url(../../images/container2_bottom_left.png) no-repeat bottom right; - } - - .container2Content{ - padding: 10px 10px 0 10px; - overflow:hidden; - } - .container2Content_det{ - padding: 10px 1px 0 1px; - } - - -/*-- Panel --*/ -.panel{ - text-align: right; - font-size: 11px; - padding: 14px 0 8px 0; - height: 100%; - overflow: hidden; -} - - .panel SPAN{ - float: right; - padding: 0 3px; - } - - .panel A{ - float: right; - padding-left: 25px; - padding-right: 4px; - text-decoration: none; - height: 15px; - padding-top: 2px; - } - - .panel A.print{ - background: url(../../images/print_ico.png) no-repeat 5px 0; - font-weight: bold; - } - - .panel A.exportExcel{ - background: url(../../images/export_excel.png) no-repeat 5px 0; - } - - .panel A.exportPdf{ - background: url(../../images/export_pdf.png) no-repeat 5px 0; - } - - .panel A:hover{ - text-decoration: underline; - } - - .panel A.addUser{ /* add user/group icon */ - background: url(../../images/add_user_ico.png) no-repeat 5px 0; - } - - .panel A.editUser{ /* edit user/group icon */ - background: url(../../images/edit_user_ico.png) no-repeat 5px 0; - } - - .panel A.deleteUser{ /* delete user/group icon */ - background: url(../../images/delete_user_ico.png) no-repeat 5px 0; - } - -.panel2{ - text-align: right; - font-size: 12px; - padding: 14px 0 6px 0; - height: 100%; - overflow: hidden; -} - -.panel2 A{ - float: left; - text-decoration: none; - height: 19px; - padding-top: 2px; - } - - .panel2 A:hover{ - - } - -/*----- Details ----*/ - -.details{ - /*margin-bottom: 20px;*/ -} -.no_details{ - /*margin-bottom: 20px;*/ -} - -.detailsContent{ - padding: 10px 5px; - border: 1px solid #bdbdbd; - border-top: none; -} - -.detailsContent_det_type{ - padding-left:40px; - padding-top:10px; - padding-right:10px; - padding-bottom:20px; - background-color:#F5F5F5; -} - -.detailsContent_det_type_edit{ - padding-left:40px; - padding-top:10px; - padding-right:10px; - padding-bottom:20px; - -} - - -.detailsContent_det_prize{ - padding-left:40px; - padding-top:10px; - padding-right:10px; - padding-bottom:20px; - background-color:#F5F5F5; -} -.detailsContent_det_files{ - padding-left:40px; - padding-top:10px; - padding-right:10px; - padding-bottom:20px; - background-color:#F5F5F5; -} - -.detailsContent_det_round{ - padding-left:40px; - padding-top:10px; - padding-right:10px; - padding-bottom:20px; - -} - -.detailsContent_det_spec{ - padding-left:40px; - padding-top:10px; - padding-right:10px; - padding-bottom:20px; - -} - -.detailsContent_det_round_edit{ - padding-left:40px; - padding-top:10px; - padding-right:10px; - padding-bottom:20px; - -} - -.detailsContent_det_spec_edit{ - padding-left:40px; - padding-top:10px; - padding-right:10px; - padding-bottom:20px; - -} -.detailsContent_det_files_edit{ - padding-left:40px; - padding-top:10px; - padding-right:10px; - padding-bottom:20px; - -} - -.detailsContent_det_prize_edit{ - padding-left:40px; - padding-top:10px; - padding-right:10px; - padding-bottom:20px; - -} -/*-- Messages --*/ - -.message{ /* the message container */ - background-color: #ffffcc; - margin: 3px 0; -} - - .message .messageTop{ /* top border */ - background: url(../../images/message_border.png) repeat-x top; - } - - .message .messageBottom{ /* bottom border */ - background: url(../../images/message_border.png) repeat-x bottom; - } - - .message .messageLeft{ /* left border */ - background: url(../../images/message_border.png) repeat-y left; - } - - .message .messageRight{ /* right border */ - background: url(../../images/message_border.png) repeat-y right; - } - - .message .messageTopLeft{ /* top left corner */ - background: url(../../images/white_pixel.png) no-repeat top left; - } - - .message .messageTopRight{ /* top right corner */ - background: url(../../images/white_pixel.png) no-repeat top right; - } - - .message .messageBottomLeft{ /* bottom left corner */ - background: url(../../images/white_pixel.png) no-repeat bottom left; - } - - .message .messageBottomRight{ /* bottom right corner */ - background: url(../../images/white_pixel.png) no-repeat bottom right; - } - - .message .messageInner{ - padding: 5px; - font-size: 11px !important; - overflow: hidden; - height: 100%; - } - - .message .messageInner P{ - margin: 0; - padding: 0; - } - - .message .messageInner P.note{ - font-size: 14px; - margin: 12px; - } - -/* search area */ -.search{ - height: 30px; - font-size: 12px; -} - - .search LABEL{ - font-weight: bold; - padding-right: 6px; - padding-top: 6px; - float: right; - } - - .search INPUT{ - float: right; - margin-right: 3px; - margin-top: 3px; - } - - .search A.button1{ - float: right; - } - -#searchIn{ - float: left; - margin-top: 3px; - margin-right: 3px; - width: 130px; -} - -/* popups */ - -.deleteUserInner{ - overflow: hidden; - height: 85px; -} - -.deleteUserInner P{ - text-align: center; - padding-bottom: 5px; -} - -.deleteUserInner .button1{ - float: right; - margin: 4px 4px 0 4px; -} - -.popupButtons{ - overflow: hidden; - padding: 5px 0; -} - -#TB_closeWindowButton, #TB_closeWindowButtonSingle{ - width: 15px; - height: 15px; - background: url(../../images/close_ico.png) no-repeat; - display: block; -} - -/*--- TABLES ----*/ - -TABLE.notif{ - border: none; - margin-bottom: 8px; -} - - TABLE.notif TH{ - font-size: 13px; - font-family: Arial, Helvetica, sans-serif; - color: #333; - text-align: left; - line-height: 20px; - } - - TABLE.notif TH A { - text-decoration: none; - } - TABLE.notif TH A:hover { - text-decoration: underline; - } - - TABLE.notif TH STRONG{ - font-size: 12px; - float: right; - padding-right: 10px; - } - - TABLE.notif THEAD TR{ - background: url(../../images/project_th_bg.png) repeat-x top; - height: 25px; - } - - TABLE.notif THEAD SPAN.left{ - display: block; - background: url(../../images/th_left_bg.png) no-repeat left top; - } - - TABLE.notif THEAD SPAN.right{ - display: block; - background: url(../../images/th_right_bg.png) no-repeat right top; - height: 22px; - padding-top: 3px; - padding-left: 16px; - } - - TABLE.notif TBODY TD{ - border: 1px solid #bdbdbd; - font-size: 10px; - padding: 7px 10px; - } - -TABLE.project{ - border-collapse: collapse; - border: none; - margin-bottom: 8px; -} - TABLE.project TH{ - font-size: 13px; - font-family: Arial, Helvetica, sans-serif; - color: #333; - text-align: left; - line-height: 20px; - } - TABLE.project TH A { - text-decoration: none; - } - TABLE.project TH A:hover { - text-decoration: underline; - } - - TABLE.project TH STRONG{ - font-size: 12px; - float: right; - padding-right: 10px; - } - - TABLE.project THEAD TR{ - background: url(../../images/project_th_bg.png) repeat-x top; - height: 25px; - } - - TABLE.project TR.hover{ - background-color:#FF9; /*#ffd9d9;*/ - } - - TABLE.project THEAD SPAN.left{ - display: block; - background: url(../../images/th_left_bg.png) no-repeat left top; - } - - TABLE.project THEAD SPAN.right{ - display: block; - background: url(../../images/th_right_bg.png) no-repeat right top; - height: 22px; - padding-top: 3px; - padding-left: 16px; - } - - TABLE.project TBODY TD{ - border: 1px solid #bdbdbd; - font-size: 10px; - padding: 7px 10px; - } - - TABLE.project TBODY TD.first{ - padding: 0; - width: 3px; - } - - table.project.scorecard{ - margin:0; - } - table.project.scorecard th{ - border-left: #bdbdbd 1px solid; - border-right: #bdbdbd 1px solid; - text-align: center; - font-weight: normal; - font-size: 11px; - color: #333; - } - /*table.project.scorecard th.first{ - display: block; - height: 22px; - padding-top: 3px; - margin-left: -1px; - background: url(../../images/th_left_bg.png) no-repeat left top; - } - table.project.scorecard th.last{ - border-right: none; - display: block; - background: url(../../images/th_right_bg.png) no-repeat right top; - height: 22px; - padding-top: 3px; - }*/ - table.project.scorecard tbody td{ - font-size: 11px; - color: #333; - padding: 0 5px; - line-height: 25px; - } - table.project.scorecard tbody td.first{ - padding:0 9px; - width: 44%; - } - table.project.scorecard tbody td.action{ - width: 55px; - } - table.project.scorecard tbody td a.view, - table.project.scorecard tbody td a.edit{ - color: #ec1c23; - text-decoration: none; - } - table.project.scorecard tbody td a.view:hover, - table.project.scorecard tbody td a.edit:hover{ - text-decoration: underline; - } - table.project.scorecard tbody td.second{ - width: 18%; - } - table.project.scorecard.view td.first{ - width: 55px; - } - - TABLE.project TBODY TD.second{ - width: 20%; - } - - TABLE.project TBODY TD.reviewPending{ /* the first column */ - background-color: #ff0000; - } - - TABLE.project TBODY TD.forumPost{ - background-color: #17c000; - } - - TABLE.project TBODY TD.task{ - background-color: #0497ee; - } - - TABLE.project A.postedBy{ - color: #0000ff; - } - - TABLE.project TD.posted{ /* posted by or completed by column */ - width: 20%; - text-align: right; - } - - TABLE.project TD.date{ /* date coloumn */ - width: 11%; - text-align: center; - } - - TABLE.project SPAN.ico{ - padding: 3px 0 3px 25px; - } - - TABLE.project SPAN.reviewPending{ - color: #ff0009; - background: url(../../images/review_pending_ico.png) no-repeat left; - } - - TABLE.project SPAN.forumPost{ - color: #17c000; - background: transparent url(../../images/forum_post_ico.png) no-repeat left; - } - - TABLE.project SPAN.task{ - color: #0497ee; - background: transparent url(../../images/task_ico.png) no-repeat left; - } - - TABLE.project SPAN.contestLaunch{ - color: #ff0009; - background: url(../../images/contest_launch_ico.png) no-repeat left; - } - - TABLE.project SPAN.reviewComplete{ - color: #ff0009; - background: url(../../images/review_complete_ico.png) no-repeat left; - } - - TABLE.project SPAN.specPosted{ - color: #ff0009; - background: url(../../images/spec_posted_ico.png) no-repeat left; - } - -.activity{ - padding: 10px 0; -} - -.activity TABLE{ - margin-bottom: 0; - border-bottom: 1px solid #bdbdbd; -} - - .activity TABLE TD.posted{ /* contest title column */ - width: 32%; - text-align: left; - } - -.tableFooter{ - background: url(../../images/table_footer.png) repeat-x; -} - -.tableFooterLeft{ - background: url(../../images/table_footer_left.png) no-repeat left; -} - -.tableFooterRight{ - background: url(../../images/table_footer_right.png) no-repeat right; -} - -.tableFooterInner{ - height: 23px; - text-align: right; -} - -A.viewMore{ - float: right; - background: url(../../images/view_more_ico.png) no-repeat right top; - font-size: 10px; - text-decoration: none; - margin-right: 10px; - padding-right: 20px; - height: 13px; - margin-top: 3px; -} - -A.less{ - background-position: right bottom; -} - - -TABLE.projectStats{ - width: 100%; - border-collapse: collapse; - margin-bottom: 15px; - border: 1px solid #bdbdbd; -} - - TABLE.projectStats TH{ - color: #FFF; - font-size: 11px; - height: 33px; - background: #37302e url(../../images/calendar_header.png) repeat-x left top; - } - - TABLE.projectStats TH.first{ - border-left: 1px solid #37302d; - } - - TABLE.projectStats TD{ - font-size: 30px; - font-weight: bold; - text-align: center; - padding: 13px 0; - border: 1px solid #a8abad; - width: 10%; - } - TABLE.projectStats TD.action a{ - color: #ec1c23; - } - - TABLE.projectStats TD.action a.edit span.disabled { - color: gray; - } - TABLE.projectStats TD.date{ - font-size: 12px; - font-weight: normal; - width: 14%; - } - - TABLE.projectStats TD.fees{ - width: 20%; - font-size: 12px; - } - - TABLE.projectStats TD.fees P{ - margin: 0 0 4px 0; - } - - - TABLE.projectStats TR.even TD{ - background-color: #F3F3F3; - } - - TABLE.projectStats TR.noStrips TD{ - background-color: #FFFFFF !important; - } - - TABLE.projectStats TD.checkbox{ - width: 4%; - } - - TABLE.projectStats TH INPUT{ - width: 13px; - height: 13px; - } - -TABLE.contests{ - border: 1px solid #a8abad; -} - -TABLE.contests TD{ - font-size: 11px; - font-weight: normal; - color: #333; -} - - TABLE.contests TD SPAN{ /* contest status */ - font-weight: bold; - padding-left: 14px; - } - - TABLE.contests TD SPAN.draft{ - color: #00c600; - background: url(../../images/draft_ico.png) no-repeat left; - } - - TABLE.contests TD SPAN.running{ - color: #177de3; - background: url(../../images/running_ico.png) no-repeat left; - } - - TABLE.contests TD SPAN.awarding{ - color: #ffb000; - background: url(../../images/awarding_ico.png) no-repeat left; - } - - TABLE.contests TD SPAN.milestone{ - color: #dc0000; - background: url(../../images/milestone_ico.png) no-repeat left; - } - -TABLE.contests A.button{ - margin: 0 3px; -} - - TABLE.contests A.button SPAN{ - width: 60px; - text-align: center; - } - -TABLE.contests A.group{ /* group name link */ - padding-left: 18px; - text-decoration: none; - font-weight: bold; -} - -TABLE.contests A.expand{ - background: url(../../images/expand_ico.png) no-repeat left; /* the expand icon */ -} - -TABLE.contests A.collapse{ - background: url(../../images/collapse_ico.png) no-repeat left; /* the collapse icon */ -} - -TABLE.contests TBODY.checkPermissions LABEL{ - margin-left: 2px ; - margin-right: 8px; -} - -TABLE.contests TH.permCol{ - width: 19%; -} - -TABLE.notifications{ - border: 1px solid #a8abad; -} - -TABLE.notifications TR.applyForAll{ - background-color: #ffffcc; -} - -TABLE.notifications TR.applyForAll TD.markRed{ - font-size:12px; - color: #c60000; - font-weight:bold; -} - -TABLE.notifications TR.alternate{ - background-color: #f3f3f3; -} - -TABLE.notifications TD{ - font-size: 11px; - font-weight: normal; - text-align: left; - padding-left: 10px; - color: #333; - line-height: 18px; -} - - TABLE.notifications TD SPAN{ /* contest status */ - font-weight: bold; - padding-left: 14px; - } - - TABLE.notifications TD.checkbox{ - font-size: 11px; - font-weight: normal; - text-align: center; - color: #333; -} - -TABLE.notifications A.button{ - margin: 0 3px; -} - - TABLE.notifications A.button SPAN{ - width: 60px; - text-align: center; - } - -TABLE.notifications A.group{ /* group name link */ - padding-left: 22px; - text-decoration: none; - font-weight: bold; -} - -TABLE.notifications A.subgroup{ /* group name link */ - padding-left: 32px; - text-decoration: underline; - font-weight: bold; -} - -TABLE.notifications A.expand{ - background: url(../../images/notification_expand_ico.png) no-repeat left; /* the expand icon */ -} - -TABLE.notifications A.collapse{ - background: url(../../images/notification_collapse_ico.png) no-repeat left; /* the collapse icon */ -} - -TABLE.notifications .group{ - padding-left: 22px; - text-decoration: none; - font-weight: bold; -} - -TABLE.notifications .expand{ - text-decoration: none; - background: url(../../images/notification_expand_ico.png) no-repeat left; /* the expand icon */ -} - -TABLE.notifications .collapse{ - text-decoration: none; - background: url(../../images/notification_collapse_ico.png) no-repeat left; /* the collapse icon */ -} - -TABLE.notifications TH.permCol{ - width: 19%; -} - -TABLE.notifications TH.permCol2{ - width: 5%; -} - -/* Tables pagination */ - -.pagination{ - color: #000; - text-align: right; - height: 25px; - font-size: 12px; - background-color: transparent; - padding-top:7px; -} - - .pagination A{ - text-decoration: none; - padding: 0 3px; - color: #000; - background-color: transparent; - } - - .pagination A.current{ /* the current page */ - font-weight: bold; - } - - .pagination A.prev{ - background: url(../../images/page_prev.png) no-repeat left; - padding-left: 10px; - } - - .pagination A.next{ - background: url(../../images/page_next.png) no-repeat right; - padding-right: 10px; - } - - .pagination SPAN.prev{ - background: url(../../images/page_prev_nactive.png) no-repeat left; - padding-left: 10px; - } - .pagination SPAN.next{ - background: url(../../images/page_next_nactive.png) no-repeat right; - padding-right: 10px; - } - - .pagination .pages{ - float: right; - padding-top: 2px; - } - - .pagination .showPages{ - float: left; - top: 0; - left: 0; - } - - .pagination .showPages .normalOption{ - font-size: 12px; - font-weight: normal; - } - -/*------------- - FORMS ----------------*/ - -.form{ - padding: 10px; -} - - .form P{ - margin: 0; - padding: 5px 0; - width: 100%; - overflow: hidden; - } - - .form LABEL{ - float: left; - width: 170px; - font-size: 12px; - } - - .form .buttons{ - padding: 10px 0; - } - - .form .buttons .button7 SPAN, - .form .buttons .button6 SPAN{ - padding-right: 0; - padding-left: 0; - text-align: center; - width: 100%; - } - - .form .buttons .leftButton{ - width: 93px; - } - - .form .buttons .middleButton{ - width: 220px; - } - - .form .buttons .rightButton{ - width: 82px; - } - -.permissionForm{ - padding: 4px 0; - width: 100%; - overflow: hidden; -} - -.permissionForm .permissionLabel{ - float: left; - height: 100px; -} - -.permissionForm .checkboxesArea{ - float: left; - width: 78%; -} - -.permissionForm .checkboxesArea INPUT{ - float: left; - margin-right: 3px; - margin-top: 3px; - width: 13px; - height: 13px; -} - -.permissionForm .checkboxesArea LABEL{ - width: 90%; -} - -.permissionForm .permissionLabel, -.permissionPopupInner LABEL{ - width: 20%; -} - -permissionPopupInner .buttons{ - width: 100%; - overflow: hidden; -} - -.permissionPopupInner .buttons A{ - float: right; - margin: 0 3px; -} - -.backToTop{ - margin-top: 5px; -} - -/*----------------- - FOOTER -------------------*/ - -#footer{ - padding: 20px 21px; - margin: 0 auto; - font-size: 11px; - color: #333; - position: relative; - border-top: 1px solid #bdbdbd; -} - -#footer A{ - text-decoration: none; -} - -#footer H2{ - font-family: Geneva, Arial, Helvetica, sans-serif; - margin: 0 0 7px 0; - font-size: 14px; - font-weight: normal; -} - -#footer P{ - margin: 2px; -} - -#footer .poweredBy{ - position: absolute; - right: 21px; - top: 20px; -} - -/*-------------- - MISC -----------------*/ - -IMG{ - border: none; -} - -A{ - color: #333; -} - -.hide{ - display: none; -} - -.warning-box{display:block; width:100%; margin: 0 0 5px 0; } - .warning-box-top{ background: url(../../images/warningbox-tl.png) left top no-repeat; } - .warning-box-top-outside { background: url(../../images/warningbox-tr.png) right top no-repeat; } - .warning-box-top-inside { - background: url(../../images/warningbox-tc.png) left top repeat-x; - height:2px; - margin: 0 2px; - } - - .warning-box-mid{ background: url(../../images/warningbox-ml.png) left top repeat-y; } - .warning-box-mid-outside { background: url(../../images/warningbox-mr.png) right top repeat-y; } - .warning-box-mid-inside { - background: url(../../images/warningbox-mc.png) left top repeat; - margin: 0 2px; - color: #000001; - overflow:hidden; - padding: 5px; - font-size: 12px; - } - - .warning-box-bottom{ background: url(../../images/warningbox-bl.png) left bottom no-repeat; } - .warning-box-bottom-outside { background: url(../../images/warningbox-br.png) right bottom no-repeat; } - .warning-box-bottom-inside { - background: url(../../images/warningbox-bc.png) left bottom repeat-x; - height:2px; - margin: 0 2px; - } - - .warning-box-content{ padding: 2px 0 0 0; line-height: 17px; } - .warning-box-content span{ color: #a20000; font-weight: bold; } - .error{ padding: 2px 0 0 20px!important; background: url(../../images/ico-error.png) left top no-repeat; } - .success{ padding: 2px 0 0 20px!important; background: url(../../images/ico-success.png) left top no-repeat; } - - .submission-gallery-row{ width: 100%; margin: 10px 0; border-bottom: 1px solid #ebebeb; height:200px; } - .submission-gallery-row.no-border{ border: none; } - .submission-item{ float:left; width: 15%; font-size: 12px; padding: 0 0 0 5%; } - .submission-item .thumbnail{ display:block; height: 100%; width: 100%; } - .submission-item .thumbnail img{ padding:0; margin:0; } - .submission-item .number{ font-weight: bold; margin: 0 0 5px 0; display: block; } - - .submission-button { width: 100%; margin: 10px 0px 20px 10px; overflow:hidden;} - .submission-button ul li{ float:left; list-style-type: none; } - .submission-button a{ display: block; height: 17px; width: 17px; margin: 0 5px; position:relative; z-index: 4; } - .submission-button a:hover{ background-position: left bottom;} - .submission-button .zoom{ background: url(../../images/ico-zoom.png) left top no-repeat; } - .submission-button .flag{ background: url(../../images/ico-flag.png) left top no-repeat; } - .submission-button .cancel{ background: url(../../images/ico-cancel.png) left top no-repeat; } - .pagination-wrapper{ display:block; width: 100%; margin: 20px 0; overflow:hidden; padding: 0 0 10px 0; border-bottom: 1px solid #ebebeb; } - .pagination { float: right; margin: 5px 0 0 0; } - .pagination ul li { display: inline; margin: 0; list-style-type: none; float:left;} - .pagination ul li a { - float: left; - color:#000001; - text-decoration: none; - padding: 0 4px; - font-size: 12px; - height: 9px; - line-height: 10px; - } - .pagination ul li a:hover { text-decoration: none;} - .pagination ul li.current a { font-weight: bold!important; } - .pagination ul li.next a{ padding: 0 10px 0 4px; background: url(../../images/arrow-pagination-next.png) right top no-repeat; } - .pagination ul li.next a:hover{ background-position: right bottom; } - .pagination ul li.prev a{ padding: 0 4px 0 10px; background: url(../../images/arrow-pagination-prev.png) left top no-repeat; } - .pagination ul li.prev a:hover{ background-position: left bottom; } - - .dialog-mini-wrapper{ display:none; position:absolute; margin: -22px -4px; z-index: 0; } - .dialog-mini{ position:absolute; z-index: 1; width: 150px; margin: 25px 0 0 0; } - .dialog-mini-outside { background: url(../../images/dialog-mini-big-left.png) left top no-repeat; } - .dialog-mini-inside { background: url(../../images/dialog-mini-big-right.png) right top no-repeat; - margin: 0 0 0 2px; - line-height:21px; - text-align: center; - } - .dialog-mini .question { display:block; margin:0!important; color: #a8abad; font-weight: bold; } - .dialog-mini .question a{ margin:0; padding:0; display: inline; text-align: center; font-size: 11px; text-decoration: none; color: #a8abad; font-weight: bold; } - .dialog-mini .question a:hover{ text-decoration: underline; } - .redtext{ color: #ec1c23!important; } - .greentext{ color: #108300!important; } - .greenDarktext{ color: #367c59!important; } - - - .dialog-mini-arrow{ margin: 2px 0 0 5px; position:absolute; z-index: 2; height: 25px; width: 25px; background: url(../../images/dialog-mini-arrow.png) no-repeat left top; } - .dialog-mini-sm{ position:absolute; z-index: 1; width: 120px; margin: 25px 0 0 0; } - .dialog-mini-sm-outside { background: url(../../images/dialog-mini-left.png) left top no-repeat; } - .dialog-mini-sm-inside { background: url(../../images/dialog-mini-right.png) right top no-repeat; - height:23px; - line-height:23px; - margin: 0 0 0 2px; - text-align: center; - } - - .display-perpage { - float: left; - font-size: 12px; - } - .display-perpage label{ font-weight: bold; } - -#select-project-wrapper{ margin: 10px 0; } - #select-project-wrapper label{ display: block; margin: 0 0 10px 0;font-size: 12px; - font-weight: bold; - color: #f8efe5; } - - .project-box-top{ height:3px; background: url(../../images/bg-projectbox-tl.png) left top no-repeat; } - .project-box-top-outside { height:3px; background: url(../../images/bg-projectbox-tr.png) right top no-repeat; } - .project-box-top-inside { - background: url(../../images/bg-projectbox-tc.png) left top repeat-x; - height:3px; - overflow:hidden; - margin: 0 4px 0 4px; - } - - .project-box-mid{ background: url(../../images/bg-projectbox-ml.png) left top repeat-y; } - .project-box-mid-outside { background: url(../../images/bg-projectbox-mr.png) right top repeat-y; } - .project-box-mid-inside { - background: #fff; - margin: 0 1px 0 1px; - min-height: 130px; - color: #000000; - overflow:hidden; - } - .white{ background: white!important; } - - .project-box-bottom{ height:3px; background: url(../../images/bg-projectbox-bl.png) left bottom no-repeat; } - .project-box-bottom-outside { background: url(../../images/bg-projectbox-br.png) right bottom no-repeat; } - .project-box-bottom-inside { - background: url(../../images/bg-projectbox-bc.png) left bottom repeat-x; - height:3px; - margin: 0 3px 0 3px; - } - .projects-box-title { - float:left; - padding: 0 0 0 40px; - margin: 0 0 10px 0; - background: url(../../images/ico-project.png) no-repeat left top ;} - .projects-box-title h2{ - font-size:20px; - font-family: "Myriad Pro", Arial; - color:#FFFFFe; - } - - #projects-box .button-med{ - display:block; clear:both; - } - - #projects-box label{ - font-size: 12px; - font-weight: bold; - color: #f8efe5; - } - - - #projects-box a{ font-weight: normal; } - - #contest-sort{ - border-bottom: 1px solid #d0d2d3; - font-family:Arial, Helvetica, sans-serif; - font-size: 11px; - padding: 2px 10px; - background: #ffffff; - color: #ff0000!important; - line-height: 33px; - overflow:hidden; - } - - #contest-sort label{ - font-size: 12px; - font-weight: normal!important; - color: #333333!important; - } - - /* table sidebar */ - .table-sidebar { - overflow:hidden; - z-index: 1; - float:left; - border-collapse: collapse; - text-align: left; - width: 100%!important; - margin: 0!important; - background: #f8f8f8; - } - - .table-sidebar td { - border-bottom: 1px solid #d0d2d3; - font-family:Arial, Helvetica, sans-serif; - font-size: 11px; - padding: 2px 5px; - background: #f8f8f8; - color: #333333; - } - .table-sidebar tr.alt td{ - background: #ececec; - } - - .table-sidebar a{ font-weight: bold; color: #333333; text-decoration: none; } - .table-sidebar a:hover{ color: #ec1c23; } - .table-sidebar tr:hover td, .table-sidebar tr:hover td a{ background: #ffffcc!important; font-weight: bold!important; } - span.dot{ display:block; width: 12px; height:12px; margin: 0 auto; } - span.dot.green{background: url(../../images/dot-green.png) left top no-repeat!important; } - span.dot.blue{background: url(../../images/dot-blue.png) left top no-repeat!important; } - span.dot.yellow{background: url(../../images/dot-yellow.png) left top no-repeat!important; } - span.dot.red{background: url(../../images/dot-red.png) left top no-repeat!important; } - .rounded{ display:block; height:16px; width:16px; margin:0 auto;} - .rounded.p {background: url(../../images/rounded-p.png) left top no-repeat; } - .rounded.s {background: url(../../images/rounded-s.png) left top no-repeat; } - .rounded.w {background: url(../../images/rounded-w.png) left top no-repeat; } - .rounded.l {background: url(../../images/rounded-l.png) left top no-repeat; } - .project-box{ - float:left; - padding: 0px 12px; - } - - .button-project { - float: right; - margin: 0 5px 0 0; - height:20px; - padding-left:22px; - background: url(../../images/button-project-left.png) no-repeat left top!important; - text-decoration:none !important; - } - - .button-project span { - float: left; - line-height:20px; - padding:0 16px 0 0; - color:#000; - font-size:11px; - font-family:Arial, Helvetica, sans-serif; - color:#FFFFFe; - cursor: pointer; - background: url(../../images/button-video-right.png) no-repeat right top!important; - } - - /* button hover style */ - .button:hover, - .button-big:hover, - .button-video:hover, - .button-med:hover, - .button-project:hover, - .button-sm:hover, - .button-sm-red:hover, - .button-med.white:hover { background-position: left bottom!important;} - .button:hover span, - .button-big:hover span, - .button-video:hover span, - .button-med:hover span, - .button-project:hover span, - .button-sm:hover span, - .button-sm-red:hover span, - .button-med.white:hover span{ background-position: right bottom!important;} - - - .jScrollPaneContainer { - position: relative; - overflow: hidden; - z-index: 1; - } - - .jScrollPaneTrack { - position: absolute; - cursor: pointer; - right: 0; - top: 0; - height: 100%; - background: #aaa; - } - .jScrollPaneDrag { - position: absolute; - background: #666; - cursor: pointer; - overflow: hidden; - } - .jScrollPaneDragTop { - position: absolute; - top: 0; - left: 0; - overflow: hidden; - } - .jScrollPaneDragBottom { - position: absolute; - bottom: 0; - left: 0; - overflow: hidden; - } - a.jScrollArrowUp { - display: block; - position: absolute; - z-index: 1; - top: 0; - right: 0; - text-indent: -2000px; - overflow: hidden; - /*background-color: #666;*/ - } - a.jScrollArrowUp:hover { - /*background-color: #f60;*/ - } - - a.jScrollArrowDown { - display: block; - position: absolute; - z-index: 1; - bottom: 0; - right: 0; - text-indent: -2000px; - overflow: hidden; - /*background-color: #666;*/ - } - - .scroll-pane table{ overflow:hidden!important; width: 100%!important; } - - #scrollbar-wrapper { - height: 350px; - padding:0!important; margin:0!important; - } - .scrollbar-custom{background: #f8f8f8; position:relative; z-index: 2; } - .scrollbar-custom .jScrollPaneTrack { - background: url(../../images/scrollbar-track.png) repeat-y; - } - .scrollbar-custom .jScrollPaneDrag { - background: url(../../images/scrollbar-drag-middle.png) no-repeat 0 50%; - } - .scrollbar-custom .jScrollPaneDragTop { - background: url(../../images/scrollbar-drag-top.png) no-repeat; - height: 1px; - } - .scrollbar-custom .jScrollPaneDragBottom { - background: url(../../images/scrollbar-drag-bottom.png) no-repeat; - height: 1px; - } - .scrollbar-custom a.jScrollArrowUp { - height: 17px; - background: url(../../images/scrollbar-arrow-up.png) no-repeat 0 0; - } - .scrollbar-custom a.jScrollArrowUp:hover, .scrollbar-custom a.jScrollArrowDown:hover{ - background-position: 0 -17px; - } - .scrollbar-custom a.jScrollArrowDown { - height: 17px; - background: url(../../images/scrollbar-arrow-down.png) no-repeat 0 0; - } - .scrollbar-custom a.jScrollActiveArrowButton, .scrollbar-custom a.jScrollActiveArrowButton:hover { - background-position: 0 -34px; - } - - .dropdown dd, .dropdown dt, .dropdown ul { margin:0px; padding:0px; z-index:100; } - .dropdown dd { position:relative; } - .dropdown a, .dropdown a:visited { text-decoration:none; outline:none;} - .dropdown dt a {background: url(../../images/select_left.png) no-repeat left top; display:block; height: 28px; width:244px; color: #333333;} - .dropdown dt a span {background: url(../../images/select_right.png) no-repeat right top; height: 28px; cursor:pointer; display:block; line-height: 28px; padding: 0 10px; font-size:12px; font-family:Arial, Helvetica, sans-serif; } - .dropdown dd ul { - background:#fff none repeat scroll 0 0; - border:1px solid #d4ca9a; - color:#C5C0B0; - display:none; - left:0px; - position:absolute; - top:0px; - width:auto; - min-width:242px; list-style:none; border: 1px solid #000; } - .dropdown span.value { display:none;} - .dropdown dd ul li a { padding:5px; display:block; color: #333333; border-bottom:1px solid #d0d2d3; font-size:12px; font-family:Arial, Helvetica, sans-serif; } - .dropdown dd ul li a:hover { background-color:#f3f3f3;} - - .dropdown2{ position:absolute; z-index: 80; margin: 10px 0 0 110px; } - .dropdown2 dd, .dropdown2 dt, .dropdown2 ul { margin:0px; padding:0px; z-index:10; } - .dropdown2 dd { position:relative; } - .dropdown2 a, .dropdown2 a:visited { text-decoration:none; outline:none;} - .dropdown2 dt a {background: url(../../images/select-sm-left.png) no-repeat left top; display:block; height: 19px; width:110px; color: #333333; font-size:10px; font-family:Arial, Helvetica, sans-serif;} - .dropdown2 dt a span {background: url(../../images/select-sm-right.png) no-repeat right top; height: 19px; cursor:pointer; display:block; line-height: 19px; padding: 0 10px;} - .dropdown2 dd ul { - background:#fff none repeat scroll 0 0; - - border:1px solid #d4ca9a; - color:#C5C0B0; display:none; - left:0px; - position:absolute; - top:0px; - width:auto; - min-width:110px; - list-style:none; - border: 1px solid #bdbdbd; } - .dropdown2 span.value2 { display:none;} - .dropdown2 dd ul li a { padding:5px; display:block; color: #333333; border-bottom:1px solid #d0d2d3; font-size:10px; font-family:Arial, Helvetica, sans-serif; } - .dropdown2 dd ul li a:hover { background-color:#f3f3f3;} - - #wrapper-select-search{ float:left; margin: 5px 0 0 0; } - .dropdown3 dd, .dropdown3 dt, .dropdown3 ul { margin:0px; padding:0px; z-index:100; } - .dropdown3 dd{ position:relative; } - .dropdown3 a, .dropdown3 a:visited{ text-decoration:none; outline:none;} - .dropdown3 dt a { - background: url(../../images/select_alt_left.png) no-repeat left top; - display:block; - height: 25px; - width:200px; - color: #333333; - font-size: 12px!important; - } - .dropdown3 dt a span { - background: url(../../images/select_alt_right.png) no-repeat right top; - height: 25px; - cursor:pointer; - display:block; - line-height: 25px; - padding: 0 10px; - } - .dropdown3 dd ul { - background:#fff none repeat scroll 0 0; - border:1px solid #d4ca9a; - color:#C5C0B0; - display:none; - left:0px; - position:absolute; - top:0px; - width:auto; - min-width:200px; - list-style:none; - border: 1px solid #bdbdbd; - } - .dropdown3 span.value3 { display:none;} - .dropdown3 dd ul li{ padding:0; } - .dropdown3 dd ul li a { font-size: 12px!important; padding:5px!important; height: 16px; line-height: 16px; margin:0!important; display:block; color: #333333; border-bottom:1px solid #d0d2d3; } - .dropdown3 dd ul li a:hover { background-color:#f3f3f3;} - - .dropdown4{ position:absolute; z-index: 80; margin: 10px 0 0 110px; } - .dropdown4 dd, .dropdown2 dt, .dropdown2 ul { margin:0px; padding:0px; z-index:10; } - .dropdown4 dd { position:relative; } - - SELECT.dropdown4{background: url(../../images/select-sm-left.png) no-repeat left top; display:block; height: 19px; width:110px; color: #333333; font-size:10px; font-family:Arial, Helvetica, sans-serif; border-right:1px solid #CCC; border-bottom:0px; border-top:0px; border-left:0px; } - .dropdown4 span {background: url(../../images/select-sm-left.png) no-repeat right top; height: 19px; cursor:pointer; display:block; line-height: 19px; padding: 0 10px; } - - .dropdown4 span.value2 { display:none;} - .dropdown4 option { padding:5px; display:block; color: #333333; border-bottom:1px solid #d0d2d3; font-size:10px; font-family:Arial, Helvetica, sans-serif; } - .dropdown4 option:hover { background-color:#f3f3f3;} - - -.contestsContent1{ - background: url(../../images/contest_list_bg.png) repeat-y; - - padding-right: 1px; - width: 245px; - height: auto; - overflow: auto; -} - -.contestsContent1 TABLE{ - font-size: 11px; - border-collapse: collapse; -} - -.contestsContent1 TABLE TD{ - background-color: #fcfcfc; - padding: 5px 0; - width:110px; -} - -.contestsContent1 TABLE TR{ - border-top: 1px solid #d0d2d3; - border-bottom: 1px solid #d0d2d3; -} - -.contestsContent1 TABLE TR.last{ - border-bottom: none; -} - -.contestsContent1 TABLE TR TD{ - background-color: #fcfcfc; - cursor: pointer; -} - -.contestsContent1 TABLE TR.even TD{ - background-color: #ececec; -} - -/* contest status */ - -.contestsContent1 TD.status{ - width: 20px; -} - -.contestsContent1 .status SPAN{ - display: block; - width: 11px; - height: 11px; - margin-left: 10px; -} - -.contestsContent1 .status SPAN SPAN{ - display: none; -} - -.contestsContent1 .draft{ - background: url(../../images/draft_ico.png) no-repeat; -} - -.contestsContent1 .running{ - background: url(../../images/running_ico.png) no-repeat; -} - -.contestsContent1 .milstone{ - background: url(../../images/milestone_ico.png) no-repeat; -} - -.contestsContent1 .awarding{ - background: url(../../images/awarding_ico.png) no-repeat; -} - -.contestsContent1 .highlight TD{ - background-color: #ffffcc !important; - font-weight: bold; - color:#F00; -} - -/* contest type */ - -.contestsContent1 TD.type{ - width: 25px; - padding-left: 7px; -} - -.contestsContent1 .type SPAN{ - display: block; - width: 16px; - height: 16px; -} - -.contestsContent1 .type SPAN SPAN{ - display: none; -} - -.contestsContent1 .wType{ - background: url(../../images/w_type.png) no-repeat; -} - -.contestsContent1 .pType{ - background: url(../../images/p_type.png) no-repeat; -} - -.contestsContent1 .lType{ - background: url(../../images/l_type.png) no-repeat; -} - -.contestsContent1 .sType{ - background: url(../../images/s_type.png) no-repeat; -} - -.project-box{ - position:relative; } - - -.bottom-review { - margin: auto; - width: 445px; - text-align: center; -} -.bottom-review a { - display: block; - font-size: 17px; - font-weight: bold; - color: #ff0001; - text-decoration: none; - margin-top: 5px; -} -.bottom-review a.button { - width: 28px; - height: 28px; - margin: auto; - background: url(../../images/specrev_go.gif) no-repeat top left; -} -.bottom-review p { - font-size: 12px; - color: #747474; - margin-top: 10px; -} - -/*-------------------- - SOFTWARE VIEW ----------------------*/ - -.containerNoPadding{ - padding: 0; - overflow:hidden; -} - -.containerNoPadding #warningWrapper{ - padding: 0 10px 0 10px; -} -#wb-like, #wb-dislike{ margin: 10px 0 0 0; } - -.containerNoPadding h2{ - font-size: 18px; - font-family: Arial, Helvetica, sans-serif; - font-weight: normal; - margin: 20px 15px; -} - -#dropdownWrapper{ float:right; position:relative; } - -/*------------------------ - SOFTWARE STATS TABLE ---------------------------*/ - -TABLE.softwareStats{ - width: 100%; - border-collapse: collapse; - margin-bottom: 15px; - border: 1px solid #bdbdbd; -} - - TABLE.softwareStats TH{ - color: #cacaca; - font-size: 11px; - height: 22px; - background: #37302e url(../../images/calendar_header.png) repeat-x left top; - } - - TABLE.softwareStats TD{ - font-size: 11px; - font-weight: normal; - color: #464646; - text-align: center; - padding: 8px 0; - } - - - TABLE.softwareStats TD.left, TABLE.softwareStats TH.left{ - text-align: left; - } - - TABLE.softwareStats TR.alt td{ - background: #f5f5f5; - } - -TABLE.softwareStats .reviewerScoreBg{ background: #7d7d7d!important; } -TABLE.softwareStats tr.reviewerScoreBg th{ background: #7d7d7d!important; font-weight: normal; } -TABLE.softwareStats .reviewerScoreBg.title span{ - margin: 2px; - font-weight: bold; - background: #929292; - display: block; - line-height: 22px; - color:#FFF; -} - -a.handle{ - font-weight: bold; - text-decoration: none; - color: #464646; -} - -a.handle:hover{ - text-decoration: underline; -} - -p.information{ - font-family: Arial, Helvetica, sans-serif; - font-size: 11px; - color: #464646; - line-height: 18px; -} - -.informationWrapper{ - display:block; - margin: 10px 0 20px 10px; -} - -span.icoTHDownload{ - display:block; - margin: 0 auto; - height: 11px; - width: 14px; - background:url(../../images/ico_th_download.png) no-repeat left top; -} - -.containerNoPadding .pagination{ - float:none; - clear:both; - margin: 15px 10px; -} - -/*------------------------ - ICO DOWNLOAD ZIP ---------------------------*/ - -.icoZip{ - display:block; - margin: 0 auto; - height: 16px; - width: 22px; -} - -.icoZip.normal{ background:url(../../images/ico_zip_normal.png) no-repeat left top; } -.icoZip.gold{ background:url(../../images/ico_zip_gold.png) no-repeat left top; } -.icoZip.silver{ background:url(../../images/ico_zip_silver.png) no-repeat left top; } - -.icoTrue{ - height: 30px; - line-height: 14px; - padding: 0 22px 0 0; - background:url(../../images/ico_true.png) no-repeat right 0; -} - -.icoFalse{ - height: 30px; - line-height: 14px; - padding: 0 22px 0 0; - background:url(../../images/ico_false.png) no-repeat right 0; -} - -.icoTrue, .icoFalse, a.scores{ - color: #0072bc; - text-decoration: none; -} - -.icoTrue:hover, .icoFalse:hover, a.scores:hover{ text-decoration: underline; } - -/*------------------------ - WINNER PANEL ---------------------------*/ - -#winnerPanel{ - clear:both; - overflow:hidden; - border-bottom: 1px solid #bdbdbd; - padding: 25px 0 20px 0; -} - -.winnerCol{ float:left; width: 50%; } - -a.downloadFile{ - float:left; - height: 78px; - width: 64px; - background:url(../../images/ico_big_download_zip.png) no-repeat left top; - margin: 0 15px 0 35px; -} - -a.downloadFile:hover{ background:url(../../images/ico_big_download_zip_hover.png) no-repeat left top; } - -.winnerData{ margin: 10px 0 0 0; } -.winnerData h3{ - font-size: 18px; - color: #000001; - font-weight: bold; - margin: 0 0 3px 0; -} - -.winnerData a.handle{ - font-size: 18px; - color: #ff0001; - font-weight: bold; - -} - -.winnerData label{ - font-size: 11px; - display:block; - color: #959595; - margin: 3px 0 3px 0; -} - -.winnerData label span{ - font-weight: bold; - color:#000001; -} - -/*------------------------ - BANK SELECTION ---------------------------*/ - -#bankSelection{ - margin: 20px 0 0 0; -} - -#bankSelectionHead{ - color: #cacaca; - font-size: 11px; - height: 35px; - background: #37302e url(../../images/calendar_header.png) repeat-x left top; - } - -#bankSelectionHead h3{ - float:left; - color:#FFFFFE; - font-size: 12px; - font-weight: bold; - height: 16px; - line-height: 17px; - margin: 10px 0 0 20px; - padding: 0 0 0 20px; - background: url(../../images/ico_bank_selection_head.png) no-repeat left top; -} - -#bankSelectionHead ul{ - float:right; - margin: 0 20px 0 0; -} - -#bankSelectionHead ul li{ - float: left; - list-style: none; -} - -#bankSelectionTab LI A, #bankSelectionTab LI div.tabOff{ - color: #000002; - line-height: 25px; - font-size: 11px; - text-decoration: none; - background: url(../../images/bank_selection_tab_left.png) no-repeat left top; /* left corner */ - float: left; - padding: 0 0 0 4px; - margin: 10px 3px 0 0; - } - - #bankSelectionTab LI A SPAN, #bankSelectionTab LI div.tabOff SPAN{ - background: url(../../images/bank_selection_tab_right.png) no-repeat right top; /* right corner */ - float: left; - height: 25px; - width: 100px; - /*padding-left: 33px;*/ - text-align: center; - cursor: pointer; - } - - #bankSelectionTab LI div.tabOff SPAN{ cursor: default!important; } - - #bankSelectionTab LI.off A, #bankSelectionTab LI.off div.tabOff{ - background-position: left bottom; - } - - #bankSelectionTab LI.off SPAN, #bankSelectionTab LI.off div.tabOff SPAN{ - background-position: right bottom; - } - -#bankSelectionContent{ - display:block; - overflow:hidden; - padding: 10px 20px; - margin:0 1px; - border-bottom: 1px solid #bdbdbd; - background:url(../../images/bank_selection_content.png) repeat-x left bottom; -} - -#bankSelectionSlotsContainer{ float:left; width: 100%; overflow:hidden; margin: 15px 0; } - -/*----------------------------- - BUTTON SELECTION FOLDER --------------------------------*/ - -#bankSelectionFolder { float:right;} -#bankSelectionFolder li{ display:block; list-style: none; margin: 4px 0; } -#bankSelectionFolder li a{ - padding: 0 0 0 30px; - display:block; - font-size:11px; - height: 20px; - line-height: 20px; - background:url(../../images/ico_folder.png) no-repeat left top; - text-decoration: none; -} - -#bankSelectionFolder li a:hover{ - text-decoration: underline; -} - -#likeFolder .drophover, #dislikeFolder .drophover{ - background:url(../../images/ico_folder_hover.png) no-repeat left top; -} - -/*------------------------ - BUTTON BANK SELECTION ---------------------------*/ -#bankSelectionButton{clear:both;} -.bankSelectionButtonBottom{clear:both; margin: 10px 20px 40px 20px; overflow: hidden;} -A.buttonBankSelection{ - float: right; - font-size: 11px; - font-family: Arial, Helvetica, sans-serif; - color: #dbd9d9; - text-decoration: none; - margin: 0 3px; - background: url(../../images/btn_selection_bg.png) repeat-x top; -} - A.buttonBankSelection SPAN{ - float:left; - cursor: pointer; - } - - A.buttonBankSelection SPAN.left{ - background: url(../../images/btn_selection_left.png) no-repeat left top; - padding: 0; - } - - A.buttonBankSelection SPAN.right{ - background: url(../../images/btn_selection_right.png) no-repeat right top; - padding: 4px 17px 0 17px; - height: 18px; - } - -A.buttonBankSelection:hover { - background-position: left bottom; - text-decoration: none !important; -} - - A.buttonBankSelection:hover SPAN { - background-position: right bottom; - } - - A.buttonBankSelection:hover SPAN.left{ - background-position: left bottom; - } - - A.buttonBankSelection:hover SPAN.right{ - background-position: right bottom; - } - - A.buttonBankSelection:hover SPAN.left{ - background-position: left bottom; - } - - A.buttonBankSelection:hover SPAN.right{ - background-position: right bottom; - } - - A.buttonBankSelection:hover SPAN.left{ - background-position: left bottom; - } - - A.buttonBankSelection:hover SPAN.right{ - background-position: right bottom; - } - -/*------------------------ - BANK SELECTION SLOTS ---------------------------*/ - -#bankSelectionSlots{ display:block; width: 100%; } -#bankSelectionItem{ float:left; height: 85px; background:url(../../images/bank_selection_bg.png) no-repeat left top; } -#bankSelectionItem li{ - float:left; - width: 66px; - position:relative; - margin: 0 3px 0 0; - list-style: none; - } -#bankSelectionItem li.drophover{ - background:url(../../images/prize_drop.png) no-repeat left top; -} -.excerpt{ - float: left; - border: 1px dotted #999; -} -.excerpt img{ float:left; overflow:hidden; } -#bankSelectionItem li a.btn_remove{ - display:block; - height: 15px; - width: 15px; - background:url(../../images/bank_selection_remove.png) no-repeat left top; - position:absolute; - z-index:10; - top: 5px; - right: 5px; -} -#bankSelectionItem li label{ - display:block; - font-family: Arial, Helvetica, sans-serif; - font-size: 11px; - color: #7a7a7a; - text-align: center; - margin: 2px 0 0 0; -} -#bankSelectionItem li a.thumb{ - display:block; - overflow:hidden; - height: 66px; - width: 66px; - text-decoration: none; -} -#bankSelectionItem li a.thumb span{ - display:block; - position:absolute; - z-index:5; - height: 66px; - width: 66px; - background:url(../../images/bank_selection_slot.png) no-repeat left top; -} -#extraPrize { -margin:0 0 0 17px!important; background:url(../../images/prize_extra.png) no-repeat left top; } - -#extraPrize strong{ - display:block; - width: 50px; - font-family: Arial, Helvetica, sans-serif; - font-size: 10px; - line-height: 12px; - color: #7a7a7a; - text-align: center; - margin: 15px auto 0 auto; - text-decoration: none; -} -#numExtra{ text-align: center; font-size: 10px; color:#7a7a7a; padding: 42px 0 0 0; } - -/*#firstPrize{ background:url(../../images/prize_1st.png) no-repeat left top; } -#secondPrize{ background:url(../../images/prize_2nd.png) no-repeat left top; } -#thirdPrize{ background:url(../../images/prize_3rd.png) no-repeat left top; } -#fourthPrize{ background:url(../../images/prize_4th.png) no-repeat left top; } -#fifthPrize{ background:url(../../images/prize_5th.png) no-repeat left top; }*/ - -/*------------------------ - SUBMISSION GRID ---------------------------*/ - -.SubmissionSlotTitle{ - float:left; - margin: 15px 0 0 20px; -} - -.SubmissionSlotTitle h3{ - font-size: 18px; - font-weight: normal; -} - -h3.red{ - color: #cf0b0f; -} - -a.toggleViewList{ - font-size: 11px; - font-weight: normal; - background:url(../../images/ico_list.png) no-repeat left 2px; - text-decoration: none; - padding: 0 0 0 13px; -} - -a.toggleViewGrid{ - font-size: 11px; - font-weight: normal; - background:url(../../images/ico_grid.png) no-repeat left 2px; - text-decoration: none; - padding: 0 0 0 13px; -} - -a.toggleViewPrev{ - font-size: 11px; - font-weight: normal; - background:url(../../images/ico_prev.png) no-repeat left 2px; - text-decoration: none; - padding: 0 0 0 9px; -} - -a.toggleViewMilestone{ - display:block; - margin: 3px 0 0 0; - font-size: 11px; - font-weight: normal; - background:url(../../images/ico_milestone.png) no-repeat left 2px; - text-decoration: none; - padding: 0 0 0 12px; -} - -a.toggleViewList:hover, a.toggleViewGrid:hover, a.toggleViewPrev:hover, a.toggleViewMilestone:hover{ - text-decoration: underline; -} - -.pagination.slotTitle{ - display:block; - margin: 20px 15px 15px 15px; -} - -.pagination.slotTitle .showPages{ - margin: 0 20px 0 0; -} - -#submissionGrid{ - float:left; - clear:both; - width: 100%; - margin: 30px 0; -} - - -#submissionGrid ul{ float:left; width: 100%; } -#submissionGrid li{ - float:left; - position:relative; - list-style: none; - width: 32%; - margin: 0 1% 40px 0; - } - -#submissionGrid li.last{ - width: 33%; - margin:0 0 40px 0!important; - } - -.statusSubmissionWrap{ - display: block; - margin: 0 auto; - width: 206px; - position:relative; -} - -#submissionGrid li label{ - display:block; - font-family: Arial, Helvetica, sans-serif; - font-size: 12px; - color: #333; - font-weight: bold; - text-align: center; - margin: 2px 0 0 0; -} -#submissionGrid li label span{ font-weight: normal; } - -#submissionGrid li a.thumbGrid{ - display:block; - overflow:hidden; - height: 206px; - width: 206px; - text-decoration: none; - padding: 3px; -} -#submissionGrid li a.thumbGrid span{ - display:block; - position:absolute; - z-index:5; - height: 206px; - width: 206px; - background: url(../../images/thumb_big_slot_bg.png) left top; -} -#submissionGrid li a.thumbGrid img{ margin: 3px; } -.statusSubmission{ - display:block; - height: 40px; - width: 38px; - position: absolute; - z-index: 5; - top: 20px; - left: 6px; -} - -.statusSubmission.firstSlot{ background:url(../../images/btn_legend_1st.png) no-repeat left top; } -.statusSubmission.secondSlot{ background:url(../../images/btn_legend_2nd.png) no-repeat left top; } -.statusSubmission.thirdSlot{ background:url(../../images/btn_legend_3rd.png) no-repeat left top; } -.statusSubmission.fourthSlot{ background:url(../../images/btn_legend_4th.png) no-repeat left top; } -.statusSubmission.fifthSlot{ background:url(../../images/btn_legend_5th.png) no-repeat left top; } -.statusSubmission.likeSlot{ background:url(../../images/btn_legend_like.png) no-repeat left top; } -.statusSubmission.dislikeSlot{ background:url(../../images/btn_legend_dislike.png) no-repeat left top; } -.statusSubmission.dollarSlot{ background:url(../../images/btn_legend_dollar.png) no-repeat left top; } - -.submissionAction{ - display:none; - position:absolute; - top: 188px; - left: 13px; - height: 35px; - width: 187px; - z-index: 20; - background:url(../../images/submission_grid_action_bg.png) no-repeat left top; -} -.submissionAction ul{ float:left; margin: 10px 0 0 30px; } -.submissionAction li{ float:left; width: 18px!important; list-style: none; margin: 0 10px 0 0!important; } -a.actButton{ display:block; height: 17px; width: 18px; position:relative; z-index: 11; } - -a.actButtonlike{ display:block; height: 17px; width: 18px; position:relative; z-index: 11; } -a.actButtonlike span{ cursor:pointer; display:block; height: 17px; width: 18px; background:url(../../images/btn_legend_sm_like.png) no-repeat left top; } -a.actButtonlike span.hover{ background:url(../../images/btn_legend_sm_like_hover.png) no-repeat left top; } - -a.actButtondislike{ display:block; height: 17px; width: 18px; position:relative; z-index: 11; } -a.actButtondislike span{ cursor:pointer; display:block; height: 17px; width: 18px; background:url(../../images/btn_legend_sm_dislike.png) no-repeat left top; } -a.actButtondislike span.hover{ background:url(../../images/btn_legend_sm_dislike_hover.png) no-repeat left top; } - -a.actButtonzoom{ display:block; height: 17px; width: 18px; position:relative; z-index: 11; } -a.actButtonzoom span{ cursor:pointer; display:block; height: 17px; width: 18px; background:url(../../images/btn_legend_sm_zoom.png) no-repeat left top; } -a.actButtonzoom span.hover{ background:url(../../images/btn_legend_sm_zoom_hover.png) no-repeat left top; } - -a.actButtondollar{ display:block; height: 17px; width: 18px; position:relative; z-index: 11; } -a.actButtondollar span{ cursor:pointer; display:block; height: 17px; width: 18px; background:url(../../images/btn_legend_sm_dollar.png) no-repeat left top; } -a.actButtondollar span.hover{ background:url(../../images/btn_legend_sm_dollar_hover.png) no-repeat left top; } - -a.actButtonstar{ display:block; height: 17px; width: 18px; position:relative; z-index: 11; } -a.actButtonstar span{ cursor:pointer; display:block; height: 17px; width: 18px; background:url(../../images/btn_legend_sm_star.png) no-repeat left top; } -a.actButtonstar span.hover{ background:url(../../images/btn_legend_sm_star_hover.png) no-repeat left top; } - - -.submissionAction .dialog-mini-wrapper{ display:none; position:absolute; margin: -22px -7px; z-index: 10; } - .submissionAction .dialog-mini.last{ left: -46px; } - .submissionAction .dialog-mini{ position:absolute; z-index: 1; width: 120px; margin: 25px 0 0 0; left: -40px; } - .submissionAction .dialog-mini-outside { background: url(../../images/dialog-mini-big-left.png) left top no-repeat; } - .submissionAction .dialog-mini-inside { background: url(../../images/dialog-mini-big-right.png) right top no-repeat; - margin: 0 0 0 2px; - line-height:21px; - text-align: center; - font-size:11px; - } - .submissionAction .dialog-mini strong, .submissionAction .dialog-mini-sm strong { font-size:11px; } - .submissionAction .dialog-mini .question { display:block; margin:0!important; color: #a8abad; font-size:11px; font-weight: bold; } - .submissionAction .dialog-mini .question a{ text-align: center; font-size: 11px; text-decoration: none; color: #a8abad; font-weight: bold; } - .submissionAction .dialog-mini .question a:hover{ text-decoration: underline; } - - .submissionAction .dialog-mini-arrow{ margin: 2px 0 0 5px; position:absolute; z-index: 2; height: 25px; width: 25px; background: url(../../images/dialog-mini-arrow-alt.png) no-repeat left top; } - - .submissionAction .dialog-mini-sm{ position:absolute; z-index: 1; width: 120px; margin: 25px 0 0 0; left: -40px; } - .submissionAction .dialog-mini-sm-outside { background: url(../../images/dialog-mini-left.png) left top no-repeat; } - .submissionAction .dialog-mini-sm-inside { background: url(../../images/dialog-mini-right.png) right top no-repeat; - height:23px; - line-height:23px; - margin: 0 0 0 2px; - text-align: center; - font-size:11px; - } - .blackLink{ color:#000002!important; background: none; margin:0 5px 0 0!important; } - .extraLink{ margin:0 0 0 4px!important; } - -/*------------------------ - SUBMISSION LIST ---------------------------*/ - -#submissionList{ - float:left; - clear:both; - width: 100%; - margin: 20px 0; -} - -#submissionList table{ border-collapse: collapse; width: 98%; margin: 0 1%; } -#submissionList table th{ - text-align: center; - height: 29px; - line-height: 29px; - font-size: 12px; - color: #FFFFFE; - font-weight: normal; - background:url(../../images/submission_list_th.png) repeat-x left -29px; -} -#submissionList table th.first{ - width: 4px; - background: url(../../images/submission_list_th.png) no-repeat left 0!important; -} -#submissionList table th.last{ - width: 6px; - background: url(../../images/submission_list_th.png) no-repeat right -58px!important; -} -#submissionList table .left{ text-align: left; } - -#submissionList table td{ - text-align: center; - font-size: 12px; - color: #333333; - font-weight: normal; - padding: 10px 0; - vertical-align: middle; -} -span.ascending{ - padding: 0 10px 0 0; - background:url(../../images/submission_list_asc.png) no-repeat right 5px; -} -span.icoBankLocation{ - display:block; - margin: 0 auto; - height: 31px; - width: 31px; - -} -#submissionList span.icoBankLocation.firstSlots{background:url(../../images/btn_legend_list_1st.png) no-repeat left top!important;} -#submissionList span.icoBankLocation.secondSlots{background:url(../../images/btn_legend_list_2nd.png) no-repeat left top!important;} -#submissionList span.icoBankLocation.thirdSlots{background:url(../../images/btn_legend_list_3rd.png) no-repeat left top!important;} -#submissionList span.icoBankLocation.fourthSlots{background:url(../../images/btn_legend_list_4th.png) no-repeat left top!important;} -#submissionList span.icoBankLocation.fifthSlots{background:url(../../images/btn_legend_list_5th.png) no-repeat left top!important;} -#submissionList span.icoBankLocation.nullSlots{background:url(../../images/btn_legend_list_null.png) no-repeat left top!important;} - -#submissionList span.icoBankLocation.likeSlots{background:url(../../images/btn_legend_list_like.png) no-repeat left top!important;} -#submissionList span.icoBankLocation.dislikeSlots{background:url(../../images/btn_legend_list_dislike.png) no-repeat left top!important;} -#submissionList span.icoBankLocation.dollarSlots{background:url(../../images/btn_legend_list_dollar.png) no-repeat left top!important;} - -a.thumbList{ - display:block; - overflow:hidden; - height: 136px; - width: 136px; - text-decoration: none; - margin: 0 auto; - position:relative; -} -a.thumbList span{ - display:block; - position:absolute; - z-index:5; - left:0; - height: 137px; - width: 136px; - background:url(../../images/thumb_list_bg.png) left top; -} -a.thumbList img{ margin: 3px; } - -#submissionList .submissionListAction{ - display:block; - height: 35px; - width: 187px; - margin: 0 auto; -} -.submissionListAction ul{ float:left; margin: 10px 0 0 30px; } -.submissionListAction li{ float:left; width: 18px!important; list-style: none; margin: 0 10px 0 0!important; } -.submissionListAction .dialog-mini-wrapper{ display:none; position:absolute; margin: -22px -8px; z-index: 10; } -.submissionListAction .dialog-mini{ position:absolute; z-index: 1; width: 120px; margin: 25px 0 0 0; left: -39px; } -.submissionListAction .dialog-mini-sm{ position:absolute; z-index: 1; width: 120px; margin: 25px 0 0 0; left: -40px; } - -.submissionListAction li a.actButtonlike span{ background:url(../../images/btn_legend_sm_like_hover.png) no-repeat left top!important; } -.submissionListAction li a.actButtondislike span{ background:url(../../images/btn_legend_sm_dislike_hover.png) no-repeat left top; } -.submissionListAction li a.actButtonzoom span{ background:url(../../images/btn_legend_sm_zoom_hover.png) no-repeat left top; } -.submissionListAction li a.actButtondollar span{ background:url(../../images/btn_legend_sm_dollar_hover.png) no-repeat left top; } -.submissionListAction li a.actButtonstar span{ background:url(../../images/btn_legend_sm_star_hover.png) no-repeat left top; } -.submissionListAction .dialog-mini-inside , #submissionList .submissionListAction .dialog-mini-sm-inside { font-size:11px; } - - -/*------------------------ - SUBMISSION LIST ---------------------------*/ - -#singleSubmissionContainer{ - float:left; - clear:both; - width: 100%; - margin: 30px 0; - overflow:hidden; -} - -#submissionData{ display:block; width: 700px; clear:both; margin: 40px auto 0 auto; font-size: 12px; } -#submissionData table{ float:left; clear:both; line-height: 20px; margin: 0 30px; } -#submissionData .label{ float:left; width: 110px; font-weight: bold; } - -#submissionFeedback{ display:block; width: 635px; clear:both; padding-top: 20px; margin: 40px auto 0 auto; line-height: 20px; } -#submissionFeedback h4{ - font-family:Arial, Helvetica, sans-serif; - font-size:14px; - font-weight: bold; - color: #484848; -} - -#submissionFeedback textarea{ - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - color: #686868; - width: 600px; - height: 80px; - display:block; - padding: 4px; - border: 1px solid #979797; - background: url(../../images/single_submission_textarea.png) repeat-x left top; -} - -.containerNoPadding .panel{ - clear:both; - margin: 10px 10px 0 0!important; -} - -#submissionFeedback .button6{ - float:left; - margin:10px 0; -} -#submissionFeedback .button6 span.left, #submissionFeedback .button6 span.right{ float:left!important; } - -#navSubmissionSlideshowTop{ float:right; margin: 20px 10px 0 10px; } -#navSubmissionSlideshowTop li{ - float:left; - list-style: none; - font-size: 11px; - color: #333333; -} -#navSubmissionSlideshowTop li.dot{ display:block; padding: 10px; background:url(../../images/dot.png) no-repeat center 4px; } -#navSubmissionSlideshowTop li a{ - text-decoration: none; -} - -#navSubmissionSlideshowTop li a:hover{ - text-decoration: underline; -} - -#navSubmissionSlideshowTopPrev{ - background:url(../../images/submission_arrow_prev.png) no-repeat left 2px; - padding: 0 0 0 10px; -} - -#navSubmissionSlideshowTopNext{ - background:url(../../images/submission_arrow_next.png) no-repeat right 2px; - padding: 0 10px 0 0; -} - -#singleSubmissionSlide{ - display:block; - position:relative; - clear:both; - width: 665px; - margin: 0 auto; -} - -#singleSubmissionSlide ul{ height: 560px; } -#singleSubmissionSlide ul li{ float:left; list-style: none; } - -a.thumbSingle{ - display:block; - overflow:hidden; - height: 484px; - width: 665px; - text-decoration: none; - margin: 0 auto; -} -a.thumbSingle span{ - display:block; - position:absolute; - z-index:5; - height: 484px; - width: 665px; - background:url(../../images/submission_single_bg.png) left top; -} -a.thumbSingle img{ margin: 3px; } - -#navSingleSubmissionSlidePrev{ - display:block; - position:absolute; - width: 33px; - height: 50px; - background:url(../../images/single_submission_prev.png) left top; - top: 220px; - z-index: 100; -} - -#navSingleSubmissionSlideNext{ - display:block; - position:absolute; - width: 33px; - height: 50px; - background:url(../../images/single_submission_next.png) left top; - top: 220px; - right:0; - z-index: 100; -} - -#singleSubmissionSlide .submissionAction{ - display: block; - position: static; - margin: 0 auto; - overflow:visible; - height: 47px; - width: 187px; - z-index: 20; - background:url(../../images/single_submission_action_bg.png) no-repeat left top; -} - -#singleSubmissionSlide .submissionAction ul{ float:left; margin: 15px 0 0 0; } -#singleSubmissionSlide .submissionAction ul li{ margin:0 8px 0 0 !important; } -#singleSubmissionSlide .submissionAction ul li.last{ margin: 0!important; } -span.icoSingleSubmissionBankLocation{ - float:left; - height: 31px; - width: 31px; - margin: 6px 10px 0 10px; -} -span.icoSingleSubmissionBankLocation.firstSlots{background:url(../../images/btn_legend_single_1st.png) no-repeat left top!important;} -span.icoSingleSubmissionBankLocation.secondSlots{background:url(../../images/btn_legend_single_2nd.png) no-repeat left top!important;} -span.icoSingleSubmissionBankLocation.thirdSlots{background:url(../../images/btn_legend_single_3rd.png) no-repeat left top!important;} -span.icoSingleSubmissionBankLocation.fourthSlots{background:url(../../images/btn_legend_single_4th.png) no-repeat left top!important;} -span.icoSingleSubmissionBankLocation.fifthSlots{background:url(../../images/btn_legend_single_5th.png) no-repeat left top!important;} -span.icoSingleSubmissionBankLocation.nullSlots{background:url(../../images/btn_legend_single_null.png) no-repeat left top!important;} - -span.icoSingleSubmissionBankLocation.likeSlots{background:url(../../images/btn_legend_single_like.png) no-repeat left top!important;} -span.icoSingleSubmissionBankLocation.dislikeSlots{background:url(../../images/btn_legend_single_dislike.png) no-repeat left top!important;} -span.icoSingleSubmissionBankLocation.dollarSlots{background:url(../../images/btn_legend_single_dollar.png) no-repeat left top!important;} - -/*------------------------ - MILESTONE CHECKOUT ---------------------------*/ - -textarea.txtFeedback{ - clear:both; - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - color: #686868; - width: 350px; - height: 80px; - display:block; - padding: 4px; - border: 1px solid #979797; - background: url(../../images/single_submission_textarea.png) repeat-x left top; -} - -.bankSelectionButtonMilestone{ - margin: 20px; - overflow:hidden; -} - -#submissionList td a.button6{ - float:left; - margin:5px 0; -} -#submissionList td .button6 span.left, #submissionList td .button6 span.right{ float:left!important; } - -.warningMilestone{ - display:block; - width: 330px; - padding: 0 0 0 50px; - text-align: left; - background: url(../../images/warning_milestone.png) no-repeat left 4px; -} - -.warningMilestone a{ - font-weight: bold; - color: #ff0002; -} - -.warningMilestone a:hover{ text-decoration: none; } - -.posAbsolute{ position:absolute; z-index: 15; top: 55px; } - -.thumbCheckout{ - display:block; - width: 166px; - margin: 0 auto; - position:relative; } - - -/*------------------------ - FINAL GRID ---------------------------*/ - -.finalGrid .submissionAction{ - display:none; - position:absolute; - top: 173px; - left: 13px; - height: 47px; - width: 187px; - z-index: 20; - background: url(../../images/final_grid_action_bg.png) no-repeat left top; -} - -.finalGrid .submissionAction ul{ float:left; width: 130px!important; margin:13px 0 0 0; } -.finalGrid .submissionAction ul li{ margin: 0 8px 0 0!important; } -.finalGrid .submissionAction ul li .dialog-mini.last{ left: -60px; } - -/*------------------------ - ADDITIONAL PURCHASE ---------------------------*/ - -#additionalPurchase{ clear:both; } -#additionalPurchase h3{ - font-size: 18px; - font-weight: normal; - margin: 15px 0 15px 20px; -} - -.additionalPurchaseTitle{ - text-align: left; - height: 35px; - line-height: 35px; - font-size: 12px; - color: #FFF; - font-weight: normal; - background: #37302e url(../../images/purchase_title.png) repeat-x left top; -} - -.additionalPurchaseTitle p{ - margin: 0 0 0 20px; - padding: 0 0 0 20px; - background:url(../../images/purchase_dollar.png) no-repeat left 9px; -} - -#additionalPurchase p.information{ - font-size:11px; - color: #333333; - display:block; - margin: 5px 0 0 20px; -} - -.additionalPurchaseContent{ - display:block; - overflow:hidden; - padding: 10px 0; - margin:0 1px 15px 1px; - border-bottom: 1px solid #bdbdbd; - background:url(../../images/bank_selection_content.png) repeat-x left bottom; -} -.additionalButton { clear:both; margin: 10px 0 0 18px; } -.additionalButton a{ float:left; } - -.additionalPreview{ float:left; clear:both; margin: 20px 0 10px 25px; } -.additionalCol{ float:left; overflow:hidden; margin: 0 20px 0 0; } -.additionalCol label{ - font-size:11px; - float:left; -} - -.additionalCol input{ float:right; } - -.additionalCol .thumbList{ float: left; clear:both; display:block; margin: 5px 0 0 0; } - -#purchaseSummary{ display:block; overflow:hidden; padding: 10px 10px 40px 10px; clear:both; } - -.selectPaymentTitle{ float:left; padding:7px 0; width: 100%; border-top: 1px solid #bdbdbd; border-bottom: 1px solid #bdbdbd; color: #333333; } -.selectPaymentTitle h3{ float:left; margin: 2px 0 0 10px; font-size: 18px; font-weight: normal; color: #000002; } - -.paymentMethod{ float:right; margin: 0 10px 0 0; } -.paymentMethod label{ float:left; font-size: 12px; font-weight: normal; margin: 7px 10px; } -#selectPaymentWrapper{ float:left; position:relative; } - -#purchaseSummary table{ float:left; width: 100%; border-collapse: collapse; } -#purchaseSummary table td{ font-size:12px; padding: 5px 10px; } -#purchaseSummary table th{ padding: 12px 10px; border-top: 1px solid #bdbdbd; border-bottom: 1px solid #bdbdbd; color: #333333; } -#purchaseSummary table td.label{ font-weight: bold; } -#purchaseSummary table td.sum{ text-align: right; font-weight: bold; } -#purchaseSummary table tr.total { border-top: 3px solid #bdbdbd; color: #333333; } -#purchaseSummary table tr.total td.label{ font-size:24px; font-weight: bold; } -#purchaseSummary table tr.total td.sum{ font-size:24px; font-weight: bold; } - - -.submissionDetails label{ font-size: 14px; font-weight: bold; color: #333333; } -.submissionDetails .submissionDetailsContent{ margin: 7px 0; color: #686868; } - -a.downloadSubmission{ - float:left; - font-family: "Myriad Pro", Arial, Helvetica, sans-serif; - font-size: 12px; - line-height: 24px; - font-weight: bold; - color:#FFFFFE; - text-decoration: none; - padding: 0 0 0 27px; - background:url(../../images/checkout_download.png) no-repeat left top; -} - -a.downloadSubmission span{ - float:left; - cursor: pointer; - height: 24px; - line-height: 24px; - padding: 0 10px; - background:url(../../images/checkout_download_right.png) no-repeat right top; -} - -a.downloadSubmission:hover{ - background:url(../../images/checkout_download.png) no-repeat left -24px; -} - -a.downloadSubmission:hover span{ - background:url(../../images/checkout_download_right.png) no-repeat right -24px; -} - -#sortable { list-style-type: none; margin: 0; padding: 0; width: 60%; } -#sortable li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; height: 1.5em; } -html>body #sortable li { height: 1.5em; line-height: 1.2em; } -.ui-state-highlight { height: 1.5em; line-height: 1.2em; } - -.labelPerPageClear{ margin: 0 0 0 65px; color: #999999; } - - -/* text found search */ -p.foundText{ - font-size: 12px; - color: #333; - margin-top: 15px; - padding-bottom: 8px; - border-bottom: #d2d2d2 1px solid; -} - - -p.view, -p.pagination{ - font-size: 11px; - color: #000; - background-color: inherit; - float: left; - margin: 5px 0; -} -p.view{ - line-height: 27px; - background-color: inherit; -} -p.pagination{ - float: right; -} - p.view select{ - width: 50px; - padding-top: 2px; - padding-left: 5px; - font-size: 11px; - height: 20px; - } - p.view select option{ - padding-left: 5px; - } - p.pagination span{ - font-weight: bold; - color: #000; - background-color: inherit; - } - p.pagination a{ - color: #ec1c23; - } - -/* table scorecard view */ - -table.scorecard.view2{ - font-size: 11px; - color: #333; - border-collapse: collapse; -} - - table.scorecard.view2 thead th{ - font-size: 12px; - font-weight: normal; - color: #fff; - background: transparent url(../../images/calendar_header.png) repeat-x left top; - height: 29px; - text-align: left; - padding-left: 10px; - } - table.scorecard.view2 tr.questionHead td{background-color:#f0f0f0;} - - table.scorecard.view2 th.first, - table.scorecard.view2 td.first{width:63%;} - table.scorecard.view2 tbody tr{border:#bdbdbd 1px solid;} - table.scorecard.view2 thead tr{border:#433a36 1px solid;} - - table.scorecard.view2 tfoot th{ - padding: 5px 0 5px 10px; - background:#fff; - border:#bdbdbd 1px solid; - } - table.scorecard.view2 td.right, - table.scorecard.view2 tfoot th.right{ - text-align: right; - padding-right: 10px; - } - table.scorecard.view2 tfoot th.left{ - text-align: left; - padding-left: 10px; - } - table.scorecard.view2 tfoot th.left span, - table.scorecard.view2 tbody td.left span { - font-weight: normal; - margin-left: 10px; - } - table.scorecard.view2 td{ - padding: 5px 0 5px 10px; - vertical-align: top; - background:#fff; - border:#bdbdbd 1px solid; - } - table.scorecard.view2 td.btn{ - width: 24px; - padding-left: 5px; - } - table.scorecard.view2.edit td{vertical-align:middle;} - /* expand and collapse */ - table.scorecard.view2 .group{ - height: 16px; - padding-left: 22px; - padding-right: 10px; - text-decoration: none; - font-weight: bold; - float: left; - } - - table.scorecard.view2 .expand{ - text-decoration: none; - background: url(../../images/notification_expand_ico.png) no-repeat left; /* the expand icon */ - } - table.scorecard.view2 .collapse{ background: transparent url("../../images/minimize.png") no-repeat scroll 0% 0%;} /* the collapse icon */ - div.ratings{margin-top:15px;} - div.rating{ - position: relative; - float: left; - } - div.ratingText{margin-left:60px;} - div.rating span{ - display: block; - color: #fff; - padding: 0 5px; - height: 18px; - line-height: 18px; - background: transparent url(../../images/rating-bg.png) repeat-x center; - } - table.scorecard.view2 div.tl, - table.scorecard.view2 div.tr, - table.scorecard.view2 div.bl, - table.scorecard.view2 div.br{ - position: absolute; - display: block; - width: 1px; - height: 1px; - background-image: url(none); - background-color: #fff; - } - table.scorecard.view2 div.tl{top: 0px; left: 0px;} - table.scorecard.view2 div.tr{top: 0px; right: 0px;} - table.scorecard.view2 div.bl{bottom: 0px; left: 0px;} - table.scorecard.view2 div.br{bottom: 0px; right: 0px;} -/* hover group */ -#sumOfGroups, -.biggroup{ - padding:2px; -} -#sumOfGroups{ - padding-top: 0px; - margin-top: 0px; -} -.biggroup.hover{ - border-top:#e86200 2px solid; - border-bottom:#e86200 2px solid; - border-left:#e86200 2px solid; - border-right:#e86200 2px solid; - padding:0px; -} -/* hover section */ -table.scorecard.view2.section.hover{ - border:#e86200 2px solid; -} - table.scorecard.view2.section.edit.hover tr td{ - background-color: #fdffcf; - padding-left: 9px; - } - -/*tr.question.ui-sortable-helper.hover td.first{ - width: 63%; -}*/ -/* hover question */ -table.scorecard.view2 tr.question.hover{border:#e86200 2px solid;} - table.scorecard.view2 tr.question.hover td{ - background-color: #fdffcf; - padding: 4px 0 4px 9px; - } - -/* Expand All & Collapse All*/ -.expandCollapse{ - margin-top: 5px; - float: right; -} - .expandCollapse a.expandAll, - .expandCollapse a.collapseAll{ - font-size: 11px; - color: #ec1c23; - text-decoration: none; - } - .expandCollapse a.expandAll:hover, - .expandCollapse a.collapseAll:hover{text-decoration:underline;} - .expandCollapse a.button6{margin-left:10px;} - - .expandCollapse a.button6 span.right{ - padding-right: 20px; - padding-left: 20px; - } - -/* Edit scorecard */ - -input.longText{ - width: 354px; - height: 20px; - color: #333; - font-size: 11px; - padding: 0 3px; - margin: 3px 0; -} -input.mediumText{ - width: 154px; - height: 20px; - color: #333; - font-size: 11px; - padding: 0 3px; - margin: 3px 0; -} -input.shortText{ - width: 29px; - height: 20px; - color: #333; - font-size: 11px; - padding: 0 3px; - margin: 3px 0; -} - input.red{background-color:#f00;} - input.green{background-color:#95c448;} -select.edit{ - /*width: 70px;*/ - width: 93%; - line-height: 20px; - height: 20px; - color: #333; - font-size: 11px; - margin: 3px 0; -} - select.shortedit{ - /*width: 60px;*/ - width: 93%; - line-height: 20px; - height: 20px; - color: #333; - font-size: 11px; - margin: 3px 0; - } -textarea.question{ - /*width: 400px;*/ - width: 96%; - height: 30px; - padding: 0 3px; - color: #333; - font-size: 11px; - font-family: Arial; -} - -textarea.guideline{ - /*width: 400px;*/ - width: 96%; - height: 130px; - padding: 0 3px; - color: #333; - font-size: 11px; - font-family: Arial; -} -.relative{ position: relative;} - .move{ - position: absolute; - display: block; - width: 18px; - height: 19px; - top: 0px; - left: -29px; - background: transparent url(../../images/move-icon.png) no-repeat; - cursor: pointer; - } - tr.section .move, - tr.section .move:hover{background: transparent url(../../images/move-icon-disabled.png) no-repeat;} - - tr.section .move.handle{background: transparent url(../../images/move-icon.png) no-repeat;} - tr.section .move.handle:hover{background: transparent url(../../images/move-icon-hover.png) no-repeat;} - .checkMatch{ - position: absolute; - display: block; - width: 19px; - height: 19px; - top: -6px; - left: -29px; - background: transparent url(../../images/check-match.png) no-repeat; - cursor: pointer; - z-index: 1000; - } - .checkMatch.hover{background: transparent url(../../images/check-match-hover.png) no-repeat;} - - table.group .checkMatch{ - top: -8px; - } - table.section tr.section .checkMatch{ - top: -7px; - } - .checkMatch input{ - margin: 2px 3px; - cursor: pointer; - } - .card{ - padding: 2px; - } - .card.hover, - table.scorecard.view2.checks.section.hover, - table.scorecard.view2.checks tr.question.hover{ - border: 2px solid #007500; - padding: 0px; - } - - - table.scorecard.view2.checks tbody.hover tr{ - border-left: 2px solid #007500; - border-right: 2px solid #007500; - } - table.scorecard.view2.checks.section.hover tr.section td, - table.scorecard.view2.checks tr.question.hover td{ - background-color: #eff8de; - } - .move:hover{ - background: transparent url(../../images/move-icon-hover.png) no-repeat; - } - table.scorecard.view2 .relative .move.group{ - top: -1px; - padding: 0px; - width: 18px; - height: 19px; - } - table.scorecard.view2.hover .relative .move.group{ - top: -2px; - } - .move.question{ - top: -6px; - } - .move.section{ - top: -6px; - } -#sortable, tbody { - width: 100%; -} - -/* add and remove buttons for grops, sections and questions*/ -a.remIcon, -a.addIcon{ - display: block; - width: 19px; - height: 19px; - background: transparent url(../../images/add-icon.png) no-repeat; - float: right; - margin: 4px 5px 4px 0; -} -a.remIcon{background: transparent url(../../images/remove-icon.png) no-repeat;} - tr.questionHead a.addIcon.hover, - a.addIcon:hover{ background: transparent url(../../images/add-icon-hover.png) no-repeat;} - a.remIcon:hover{background: transparent url(../../images/remove-icon-hover.png) no-repeat;} - a.remIcon.onlyOne, - a.remIcon.onlyOne:hover{background: transparent url(../../images/remove-icon-disabled.png) no-repeat;} -/* add menu */ -.addmenu{ - position: absolute; - width: 160px; - height: 70px; - z-index: 999; - display: none; - color: #fff; - background: transparent url(../../images/addmenu.png) no-repeat; -} - .addmenu a{ - color: #fff; - background-color: inherit; - font-size: 11px; - text-decoration: none; - line-height: 24px; - margin-left: 10px; - } - .addmenu a:hover{ - text-decoration: underline; - } - -#addScorecard2 .scorecardFind .row div.caption, - #addScorecard .scorecardFind .row div.caption { - width: 220px; - float: left; - display: inline; - margin-right: 20px; - line-height: 28px; - text-align: right; - font-weight: bold; - font-size: 14px; - color: #333; - font-family: arial; - } - - -a.multiSelect { - margin: 5px; -} -a.modalTitleBtn { - margin-top: 5px; -} - -.box .contestsList { - position: relative; - z-index: 10; -} -.box .selectMask { - position: relative; -} -.box .customerSelectMask { - z-index: 99; -} -.box .projectSelectMask { - z-index: 98; -} -.box .selectMask .contestsDropDown { - max-height: 200px; - overflow: auto; -} - -#area2 .contestsDropDown .longWordsBreak { - display: block !important; - padding-left: 1px; - padding-top: 2px; -} - -/* Add css code for https://apps.topcoder.com/bugs/browse/TCCC-4119 */ - - .newSidebar .topBtns{ - background:url(../../images/sidebar-top-bg.gif) no-repeat 0 0; - padding:16px 0 8px 10px; - overflow:hidden; - } - .newSidebar .topBtns a{ - float:left; - color:#fffffe; - padding-top:67px; - background-repeat:no-repeat; - background-position:0 0; - margin-right:9px; - text-decoration:none; - font-size:11px; - text-align:center; - } - .newSidebar .topBtns a:hover{ - text-decoration:none; - color:#ff0000; - } - .newSidebar .topBtns a.copilot{ - background-image:url(../../images/copilot-icon.png); - width:76px; - } - .newSidebar .topBtns a.copilot:hover{ - background-image:url(../../images/copilot-icon-hover.png); - } - .newSidebar .topBtns a.start{ - background-image:url(../../images/start-project-icon.png); - width:80px; - } - .newSidebar .topBtns a.start:hover{ - background-image:url(../../images/start-project-icon-hover.png); - } - .newSidebar .topBtns a.launch{ - background-image:url(../../images/launch-contest-icon.png); - width:78px; - } - .newSidebar .topBtns a.launch:hover{ - background-image:url(../../images/launch-contest-icon-hover.png); - color:#ff0000; - } - .newSidebar .contestList{ - background:url(../../images/sidebar-top-bg.gif) no-repeat 0 0; - padding:16px 0 4px; - position:relative; - } - .newSidebar .contestList .tr{ - position:absolute; - right:-1px; - top:-1px; - background:url(../../images/box-corner1.gif) no-repeat -4px 0; - height:4px; - width:4px; - overflow:hidden; - } - .newSidebar .contestList .tl{ - position:absolute; - left:-1px; - top:-1px; - background:url(../../images/box-corner1.gif) no-repeat 0 0; - height:4px; - width:4px; - overflow:hidden; - } - .newSidebar .contestList .bl{ - position:absolute; - left:-1px; - bottom:-1px; - background:url(../../images/box-corner1.gif) no-repeat 0 -4px; - height:4px; - width:4px; - overflow:hidden; - } - .newSidebar .contestList .br{ - position:absolute; - right:-1px; - bottom:-1px; - background:url(../../images/box-corner1.gif) no-repeat -4px -4px; - height:4px; - width:4px; - overflow:hidden; - } - .newSidebar .contestListMask{ - border:1px solid #000; - background:url(../../images/contest--box-bg.gif) repeat-x #e7e7e7 0 0; - width:252px; - margin:0 auto; - padding-bottom:3px; - position:relative; - } - .newSidebar .contestList .filter{ - padding:0 0 14px 14px; - } - .newSidebar .contestList .filter label{ - color:#333; - font-weight:bold; - font-size:11px; - display:block; - padding:12px 0 5px; - } - .newSidebar .contestList .filter .dropdownWidget{ - background:url(../../images/dropdown-box.gif) no-repeat 0 0; - height:22px; - width:220px; - position:relative; - padding:0 2px; - } - .newSidebar .contestList .filter .dropdownWidget input{ - border:0; - height:18px; - line-height:18px; - padding:0 3px; - width:188px; - color:#333; - font-size:11px; - font-family: Arial, Helvetica, sans-serif; - } - .newSidebar .contestList .filter .dropdownWidget a.arrow{ - background:url(../../images/dropdown-box-arrow.gif) no-repeat 0 0; - height:20px; - width:20px; - position:absolute; - right:3px; - top:1px; - } - .newSidebar .contestList .filter .dropdownWidget .dropList{ - position:absolute; - top:22px; - width:222px; - max-height:200px; - overflow:auto; - border: 1px solid #D0D2D3; - left:0; - display:none; - } - .newSidebar .contestList .filter .dropdownWidget .dropList li{ - background-color: #FFFFFF; - font-size:11px; - cursor:pointer; - } - .newSidebar .contestList .filter .dropdownWidget .dropList a{ - display:block; - padding:3px 5px; - text-decoration:none; - line-height:16px; - } - .newSidebar .contestList .dropdownWidget .dropList .even a{ - background:#F3F3F3; - } - .newSidebar .contestList .dropdownWidget .dropList a:hover, - .newSidebar .contestList .dropdownWidget .dropList .even a:hover{ - background:#ffffcc; - } - .newSidebar .contestList .tableHeader{ - background:url(../../images/thead-bg.gif) repeat-x 0 0; - height:33px; - border-top:1px solid #d2d2d2; - border-bottom:1px solid #d2d2d2; - } - .newSidebar .contestList .tableHeader span{ - text-align:center; - font-size:11px; - color:#353454; - float:left; - height:25px; - padding-top:8px; - cursor:pointer - } - .newSidebar .contestList .tableHeader span.down{ - background:url(../../images/arrow-down.png) no-repeat center 23px; - } - .newSidebar .contestList .tableHeader span.up{ - background:url(../../images/arrow-up.png) no-repeat center 23px; - } - .newSidebar .contestList .tableHeader span.statusTh{ - width:42px; - border-right:1px solid #d0d0d0; - } - .newSidebar .contestList .tableHeader span.titleTh{ - width:142px; - border-right:1px solid #d0d0d0; - border-left:1px solid #fff; - } - .newSidebar .contestList .tableHeader span.typeTh{ - width:46px; - border-left:1px solid #fff; - } - - .newSidebar .contestList .tableBody{ - background:#fffffe; - max-height:300px; - overflow:auto; - } - .newSidebar .contestList .tableBody table{ - width:100%; - font-size:11px; - color:#343436; - } - .newSidebar .contestList .tableBody table td{ - cursor:pointer; - padding:5px 3px; - border-bottom:1px solid #d2d2d2; - vertical-align:middle; - text-align:center; - } - .newSidebar .contestList .tableBody table td.leftAlign{ - text-align:left; - } - .newSidebar .contestList .tableBody table .even td{ - background:#ececec; - } - .newSidebar .contestList .tableBody table .hover td{ - background:#ffffcc; - font-weight:bold; - color:#ff0000; - } - .newSidebar .contestList .tableBody table span.running{ - background:url("../../images/running_ico.png") no-repeat 0 0; - display:inline-block; - width:11px; - height:11px; - } - .newSidebar .contestList .tableBody table span.draft{ - background:url("../../images/draft_ico.png") no-repeat 0 0; - display:inline-block; - width:11px; - height:11px; - } - .newSidebar .archiveLink{ - text-align:right; - padding:0 11px 12px 0; - } - .newSidebar .archiveLink a{ - background:url(../../images/archive.png) no-repeat 0 center; - padding-left:26px; - display:inline-block; - color:#fcfcfc; - text-decoration:none; - font-size:11px; - } - .newSidebar .archiveLink a:hover{ - text-decoration:underline; - } - -#helpCenterWidget{ - padding-top:9px; - background:url(../../images/sidebar-top-bg.gif) no-repeat 0 0; -} \ No newline at end of file diff --git a/scorecard_tool/web-app/css/scorecard/jScrollPane.css b/scorecard_tool/web-app/css/scorecard/jScrollPane.css deleted file mode 100644 index 7f3b6c0b7..000000000 --- a/scorecard_tool/web-app/css/scorecard/jScrollPane.css +++ /dev/null @@ -1,73 +0,0 @@ - -.jScrollPaneContainer { - position: relative; - overflow: hidden; - z-index: 1; - background-color: #bdbdbd; -} - -.jScrollPaneTrack { - position: absolute; - cursor: pointer; - right: 0; - top: 0; - height: 100%; - background: url(../images/scrolltrack.png) repeat-y left; -} -.jScrollPaneDrag { - position: absolute; - background: #666; - cursor: pointer; - overflow: hidden; - background: #ededed url(../images/panedrag_center.png) no-repeat center; - border-bottom: 1px solid #bdbdbd; - border-top: 1px solid #bdbdbd; -} -.jScrollPaneDragTop { - position: absolute; - top: 0; - left: 0; - overflow: hidden; -} -.jScrollPaneDragBottom { - position: absolute; - bottom: 0; - left: 0; - overflow: hidden; -} -a.jScrollArrowUp { - display: block; - position: absolute; - z-index: 1; - top: 0; - right: 0; - text-indent: -2000px; - overflow: hidden; - /*background-color: #666;*/ - height: 17px; - background: url(../images/scrollbar_up.png) no-repeat top left; -} -a.jScrollArrowUp:hover { - /*background-color: #f60;*/ - background: url(../images/scrollbar_up.png) no-repeat bottom left; -} - -a.jScrollArrowDown { - display: block; - position: absolute; - z-index: 1; - bottom: 0; - right: 0; - text-indent: -2000px; - overflow: hidden; - /*background-color: #666;*/ - height: 17px; - background: url(../images/scrollbar_down.png) no-repeat top; -} -a.jScrollArrowDown:hover { - /*background-color: #f60;*/ - background: url(../images/scrollbar_down.png) no-repeat bottom; -} -a.jScrollActiveArrowButton, a.jScrollActiveArrowButton:hover { - /*background-color: #f00;*/ -} \ No newline at end of file diff --git a/scorecard_tool/web-app/css/scorecard/jquery.multiSelect.css b/scorecard_tool/web-app/css/scorecard/jquery.multiSelect.css deleted file mode 100644 index a335ce763..000000000 --- a/scorecard_tool/web-app/css/scorecard/jquery.multiSelect.css +++ /dev/null @@ -1,85 +0,0 @@ -a.multiSelect { - background: #FFF url(../images/dropdown.blue.png) right center no-repeat; - border: solid 1px #BBB; - padding-right: 20px; - position: relative; - cursor: default; - text-decoration: none; - color: black; - display: -moz-inline-stack; - display: inline-block; - vertical-align: top; -} - -a.multiSelect:link, a.multiSelect:visited, a.multiSelect:hover, a.multiSelect:active { - color: black; - text-decoration: none; -} - -a.multiSelect span -{ - margin: 1px 0px 1px 3px; - overflow: hidden; - display: -moz-inline-stack; - display: inline-block; - white-space: nowrap; -} - -a.multiSelect.hover { - background-image: url(../images/dropdown.blue.hover.png); -} - -a.multiSelect.active, -a.multiSelect.focus { - border: inset 1px #000; -} - -a.multiSelect.active { - background-image: url(../images/dropdown.blue.active.png); -} - -.multiSelectOptions { - margin-top: -1px; - overflow-y: auto; - overflow-x: hidden; - border: solid 1px #B2B2B2; - background: #FFF; -} - -.multiSelectOptions LABEL { - padding: 0px 2px; - display: block; - white-space: nowrap; -} - -.multiSelectOptions LABEL.optGroup -{ - font-weight: bold; -} - -.multiSelectOptions .optGroupContainer LABEL -{ - padding-left: 10px; -} - -.multiSelectOptions.optGroupHasCheckboxes .optGroupContainer LABEL -{ - padding-left: 18px; -} - -.multiSelectOptions input{ - vertical-align: middle; -} - -.multiSelectOptions LABEL.checked { - background-color: #dce5f8; -} - -.multiSelectOptions LABEL.selectAll { - border-bottom: dotted 1px #CCC; -} - -.multiSelectOptions LABEL.hover { - background-color: #3399ff; - color: white; -} \ No newline at end of file diff --git a/scorecard_tool/web-app/css/scorecard/launchcontest.css b/scorecard_tool/web-app/css/scorecard/launchcontest.css deleted file mode 100644 index 73c1601c1..000000000 --- a/scorecard_tool/web-app/css/scorecard/launchcontest.css +++ /dev/null @@ -1,2123 +0,0 @@ -@charset "utf-8"; -/* CSS Document */ - -/** title **/ -#launchContestOut h2{ - padding-top:18px; - font-family:Arial, Helvetica, sans-serif; - font-size:14px; - line-height:36px; - } - -/** intro **/ -#launchContestOut .intro{ - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - line-height:14px; - color:#999999; - } -#launchContestOut .lcc{ - font-family:Arial, Helvetica, sans-serif; - - font-size:12px; - padding-right:5px; - vertical-align:baseline; - - color:#333333; - } - - -#launchContestOut .lcc_chk{ - width:120px; - height:28px; - float:left; - display:inline; - padding-left:24px; - - padding-top:5px; - } - -#launchContestOut .hide{ - display:none; -} - - - /** tab **/ - #launchContestOut .tabOut{ - padding-top:10px; - text-align:left; - } - - /*#launchContestOut .tabOut #tab{ - position:absolute; - width: 105px; - height: 68px; - - }*/ - - /** tab list **/ - #launchContestOut .tabOut ul{ - width:auto; - margin:0; - padding:0; - position:absolute; - } - - #launchContestOut .tabOut li{ - margin:0; - padding:0; - list-style:none; - cursor:pointer; - } - - #launchContestOut .tabOut li a{ - font-family:Arial, Helvetica, sans-serif; - text-align:center; - } - - #launchContestOut .tabOut li.top{ - height:34px; - } - - #launchContestOut .tabOut li.bottom{ - height:33px; - } - - /** tab link **/ - #launchContestOut .tabOut li.top a{ - width:106px; - height:34px; - display:block; - font-size:12px; - color:#000; - line-height:34px; - font-weight:bold; - text-decoration:none; - background:url(../../images/tabTop.gif) no-repeat; - } - - #launchContestOut .tabOut li.bottom a{ - width:106px; - height:33px; - display:block; - font-size:12px; - color:#000; - line-height:33px; - font-weight:bold; - text-decoration:none; - background:url(../../images/tabBottom.gif) no-repeat; - } - - /** current status **/ - #launchContestOut .tabOut li.top a.current{ - width:111px; - font-size:14px; - color:#fffffe; - background:url(../../images/tabTop_current.gif) no-repeat; - } - - #launchContestOut .tabOut li.bottom a.current{ - width:111px; - font-size:14px; - color:#fffffe; - background:url(../../images/tabBottom_current.gif) no-repeat; - } - /** end current status **/ - - /** end tab link **/ - - - /** tab contest **/ - #launchContestOut .tabContest{ - height:65px; - position:relative; - border:#bdbdbd solid 1px; - border-left:0; - } - #launchContestOut .tabContest1{ - height:35px; - border:none; - } - - #launchContestOut .selectX{ - padding-top:10px; - - height:28px; - } - - /** tr and br **/ - #launchContestOut .tabContest .tr{ - width:4px; - height:4px; - position:absolute; - top:-1px; - right:-1px; - background:url(../../images/launchContest_corcen_tr.gif) no-repeat; - } - - #launchContestOut .tabContest .br{ - width:4px; - height:4px; - position:absolute; - bottom:-1px; - right:-1px; - background:url(../../images/launchContest_corcen_br.gif) no-repeat; - } - - #launchContestOut .selectDesign,#launchContestOut .selectSoftware{ - width: 100%; - height: 100%; - margin-top: -1px; - padding-top:9px; - padding-left: 29px; - position:absolute; - overflow: visible; - background: url(../../images/launchContest_tabOut_tab.gif) no-repeat 0px 0px; - } - - #launchContestOut .selectDesign1{ - - padding-left: 0px; - - background: none; - } - - /** select **/ - #launchContestOut .selectDesign .selectOut,#launchContestOut .selectSoftware .selectOut{ - width:auto; - float:left; - display:inline; - margin-right:10px; - } - - /** tip link **/ - #launchContestOut .selectDesign .help,#launchContestOut .selectSoftware .help{ - width:108px; - height:28px; - float:right; - padding-left:34px; - padding-right:10px; - font-size:11px; - - background:url(../../images/iconI.png) no-repeat left center; - } - #launchContestOut .selectDesign .new_style{ - font-weight:bold; - - - - } - - #launchContestOut .selectDesign .moreLink,#launchContestOut .selectSoftware .moreLink{ - height:28px; - padding-left:10px; - font-size:11px; - line-height:28px; - text-decoration:none; - background:url(../../images/moreLink_icon.gif) no-repeat left center; - } - - #launchContestOut .selectDesign .moreLink:hover,#launchContestOut .selectSoftware .moreLink:hover{ - text-decoration:underline; - } - /** end .tabOut **/ - - - /** add new **/ - #launchContestOut .addNewContest{ - height:154px; - margin-top:34px; - border:#bdbdbd solid 1px; - } - - /** row **/ - #launchContestOut .addNewContest .row{ - height:28px; - margin-top:17px; - } - - /** label **/ - #launchContestOut .addNewContest label{ - width:118px; - float:left; - display:inline; - margin-left:14px; - font-family:Geneva, Arial, Helvetica, sans-serif; - font-size:14px; - line-height:28px; - } - - /** input **/ - #launchContestOut .addNewContest .projectSelect{ - height:28px; - } - - #launchContestOut .addNewContest .text{ - width:494px; - height:25px; - padding:0 5px; - line-height:25px; - border:0; - background:url(../../images/addNew_input.gif) no-repeat; - } - - #launchContestOut .addNewContest .projectSelect .text{ - width:362px; - height:25px; - padding:0 5px; - line-height:25px; - border:0; - background:url(../../images/tabContest_input.gif) no-repeat; - } - - #launchContestOut .addNewContest .projectSelect,#launchContestOut .addNewContest .billingSelect{ - width:auto; - float:left; - display:inline; - margin-right:26px; - } - - /** button **/ - #launchContestOut .addNewContest .button6{ - width:auto; - float:left; - display:inline; - margin-top:1px; - } - - #launchContestOut .addNewContest .button6 span.left{ - width:auto; - float:left; - display:inline; - } - - #launchContestOut .addNewContest .button6 span.right{ - width:auto; - float:left; - display:inline; - padding:4px 21px 0 24px; - } - /** end .addNewContest **/ - - /** paymentMethod **/ - - - /** #area1 .area1Content .paymentMethod **/ - #area1 .paymentMethod{ - - } - - #area1 .paymentMethod .paymentColumn{ - float: left; - width: 480px; - } - - #area1 .paymentMethod .paymentColumn h3{ - margin-top:20px; - } - - #area1 .paymentMethod .paypalColumn{ - float: right; - width: 200px; - height: 60px; - background: url(../../images/horizontal_solution_PPeCheck_tc.png) no-repeat left top; - } - - #area1 .paymentMethod .message{ - clear: left; - } - /** end #area1 .area1Content .paymentMethod **/ - - - - /** #launchContestOut .paymentMethod * **/ - #launchContestOut.paymentMethod .buttonBox{ - float: right; - clear: left; - margin: 0 20px 24px 50px; - } - - #launchContestOut.paymentMethod .buttonBox .contiune, - #launchContestOut.paymentMethod .buttonBox .draft, .paymentMethod .buttonBox .preview{ - margin-left: 10px; - margin-right: 3px; - } - - - #launchContestOut.paymentMethod .supRow{ - float: right; - height: 1px; - position: relative; - bottom: 10px; - right: 15px; - display: inline; - font: 13px normal; - z-index: 400; - } - - /** row **/ - #launchContestOut.paymentMethod .row{ - border: 1px solid transparent; - } - - - /** label **/ - #launchContestOut.paymentMethod label{ - width:140px; - float:left; - margin-left:14px; - font-family:Geneva, Arial, Helvetica, sans-serif; - font-size:14px; - line-height:28px; - margin-left:0; - margin-top:3px; - } - - /** input **/ - #launchContestOut.paymentMethod .text{ - width:324px; - height:25px; - margin-top: 6px; - padding:0 0 0 5px; - line-height:25px; - border:0; - background:url(../../images/paymentMethod_input.gif) no-repeat; - } - - #launchContestOut.paymentMethod .text.medium{ - width:160px; - background:url(../../images/paymentMethod_input_medium.gif) no-repeat; - } - - #launchContestOut.paymentMethod .text.small{ - width:65px; - background:url(../../images/paymentMethod_input_small.gif) no-repeat; - } - - #launchContestOut.paymentMethod .redTip{ - text-decoration: none; - font: 14px bold; - color: red; - } - - #launchContestOut.paymentMethod .row{ - clear: left; - } - - /* cardSelect, selectMonth, selectYear*/ - span.starNotice{ - width: 1px; - height: 28px; - display: block; - float: left; - } - - .cardSelect{ - width: 335px; - float: left; - } - .selectMonth{ - width: 65px; - float: left; - } - .selectYear{ - width: 250px; - float: left; - margin-left: 5px; - } - - - .cardSelect .newListSelected,.selectMonth .newListSelected, - .selectYear .newListSelected { - float: left; - height:28px; - padding:0 5px; - border:0; - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - color:#333; - line-height:28px; - cursor:pointer; - } - - .cardSelect .newListSelected{ - width:324px; - background:url(../../images/cardSelect_select.gif) no-repeat; - } - .selectMonth .newListSelected{ - width:48px; - background:url(../../images/selectMonth_select.gif) no-repeat; - } - .selectYear .newListSelected{ - width:70px; - background:url(../../images/selectYear_select.gif) no-repeat; - } - - - .cardSelect .selectedTxt{width:321px;} - .selectMonth .selectedTxt{width:48px;} - .selectYear .selectedTxt{width:70px;} - - - .cardSelect .newList, .selectMonth .newList, .selectYear .newList{ - border:#ccc solid 1px; - background:#fff; - position:absolute !important; - margin-top:-3px !important; - z-index: 600; - } - - .cardSelect .newList{width:324px !important;} - .selectMonth .newList{width:48px !important;} - .selectYear .newList{width:70px !important;} - - - #launchContestOut.paymentMethod .rowElem{ - height:25px; - width: 1px; - display: inline; - text-align: center; - font-size:20px; - margin: 3px 5px 0 0; - float: left; - } - /** end #launchContestOut .paymentMethod **/ - /** end .paymentMethod **/ - - - /** orderReview and related**/ - #launchContestOut h2.sectionHead{ - font-size:20px; - } - - #launchContestOut .orderReview .overviewBox{ - border:0; - } - - #launchContestOut .orderReview .overviewData th{ - width:160px; - text-align:left; - } - #launchContestOut .orderReview .overviewData td{ - font-weight:bold; - } - /** end .orderReview **/ - - - /* orderReview */ - #launchContestOut.orderReview .buttonBox{ - float: right; - clear:left; - margin: 0 20px 24px 50px; - } - - #launchContestOut.orderReview .buttonBox .contiune, - #launchContestOut.orderReview .buttonBox .draft, .paymentMethod .buttonBox .preview{ - margin-left: 10px; - margin-right: 3px; - } - - #launchContestOut.orderReview .message{ - clear: right; - } - /* end .orderReview*/ - - - /** contestDetails and related **/ - #launchContestOut .contestDetails .sectionHead{ - padding:10px 0 0 0; - } - - #launchContestOut .contestDetails h3{ - margin-top:15px; - } - - .prizesTable{ - width:100%; - border-spacing:0; - border:1px solid #c1c1c1; - } - - .prizesTable tbody{ - padding: 0; - margin: 0; - } - - .prizesTable td{ - width:auto; - font-size: 14px; - font-weight: bold; - text-align:center; - } - - .prizesTable td.large{ - width:auto; - text-align:left; - padding-left: 20px; - } - .prizesTable td.last{ - width:90px; - font-size: 20px; - height: 57px; - padding: 0; - margin: 0; - background: url(../../images/table_last_cell_background.gif) repeat-x; - } - - hr.dualDivider{ - border:0; - border-top: 1px solid #ccc; - border-bottom: 1px solid #ccc; - height: 3px; - margin: 15px 5px; - } - - table.total{ - width: 100%; - border: 0; - margin: 10px 0 0 0 ; - } - - table.total td{ - font-size: 20px; - font-weight: bold; - } - - table.total td.toLeft{ - text-align: left; - } - - table.total td.toRight{ - text-align: right; - padding-right: 10px; - } - - - /** end .contestDetails **/ - - - /* receipt */ - - .paymentNumBox{ - float: right; - font-size: 16px; - font-weight: bold; - position: relative; - top: 27px; - } - - .redAlert{ - font-family:Arial,Helvetica,sans-serif; - font-size:18px; - color: red; - line-height:36px; - padding-top:5px; - display: block; - font-weight: bold - } - - .message .rbContainer{ - - } - - .message .rbContainer .redButton{ - float: right; - margin: 5px 10px 15px 25px; - } - - /* end .receipt*/ - - - - - /** tiile **/ - #launchContestOut h3{ - height:26px; - margin-top:34px; - margin-bottom:2px; - font-size:14px; - } - - /** title icon **/ - #launchContestOut h3 span.icon{ - width:auto; - float:left; - display:inline; - } - - /** schedule **/ - #launchContestOut .schedule{ - height:165px; - border:#bdbdbd solid 1px; - } - - #launchContestOut .schedule1{ - - border:none; - } - - /** row **/ - #launchContestOut .schedule .row{ - height:22px; - margin-top:16px; - } - - #launchContestOut .schedule .selectrow{ - height:28px; - margin-top:12px; - } - - /** label **/ - #launchContestOut .schedule label{ - width:118px; - float:left; - display:inline; - margin-left:14px; - font-family:Tahoma, Arial, Helvetica, sans-serif; - font-size:14px; - line-height:28px; - } - - #launchContestOut .schedule .name_label{ - width:118px; - float:left; - display:inline; - margin-left:14px; - font-size:14px; - font-family:Arial, Helvetica, sans-serif; - color:#3B3B3B; - line-height:28px; - } - - /** select **/ - #launchContestOut .schedule .startSelect,#launchContestOut .schedule .milestoneSelect,#launchContestOut .schedule .endSelect{ - width:auto; - float:left; - display:inline; - margin-right:7px; - } - - /** input **/ - #launchContestOut .schedule .text{ - width:80px; - height:22px; - float:left; - display:inline; - padding:0 5px; - line-height:22px; - border:0; - color:#6c6c6c; - background:url(../../images/date_input.gif) no-repeat; - } - - #launchContestOut .schedule .startEtSelect,#launchContestOut .schedule .milestoneEtSelect,#launchContestOut .schedule .endEtSelect{ - width:auto; - float:left; - display:inline; - margin-right:4px; - } - - #launchContestOut .schedule span{ - font-size:12px; - color:#6c6c6c; - } - /** end .schedule **/ - - /** bottom button **/ - #launchContestOut .bottomButton{ - height:24px; - margin-top:18px; - } - - #launchContestOut .bottomButton .conditions{ - width:auto; - float:left; - display:inline; - font-size:14px; - color:#ff0000; - line-height:28px; - } - - /** upload **/ - .upload { - padding:10px 0px; - } - .upload .uploadInner{ - height:25px; - } - - /** input **/ - .upload .uploadInput{ - width:230px; - height:17px; - float:left; - display:inline; - padding:3px 5px; - color:#c4c4c4; - border:#a8abad solid 1px; - } - - .upload .uploadInner .fileIn{ - width:72px; - height:25px; - position:absolute; - } - - /** button **/ - .upload .button6{ - width:auto; - float:left; - display:inline; - margin-right:14px; - background: url(../../images/grey_button_bg.gif) repeat-x top; - } - - .upload a.button6 span.left{ - width:auto; - float:left; - display:inline; - background: url(../../images/grey_button_left.gif) no-repeat left top; - padding: 0; - } - - .upload a.button6:hover span.left{ - background: url(../../images/grey_button_left.gif) no-repeat left bottom; - } - - .upload a.button6 span.right{ - width:auto; - float:left; - display:inline; - background: url(../../images/grey_button_right.gif) no-repeat right top; - padding: 4px 13px 0 10px; - height: 20px; - } - - .upload a.button6:hover span.right{ - background: url(../../images/grey_button_right.gif) no-repeat right bottom; - } - - /** file input **/ - .upload .fileInput{ - width:272px; - height:17px; - float:left; - display:inline; - padding:3px 5px; - color:#c4c4c4; - border:#a8abad solid 1px; - } - - /** remove button **/ - .upload .removeButton{ - width:22px; - height:21px; - float:left; - display:inline; - margin-top:2px; - margin-left:7px; - background:url(../../images/removeButton.gif) no-repeat; - } - - .upload .removeButton:hover{ - background:url(../../images/removeButton_hover.gif) no-repeat; - } - - /** add button **/ - .upload .addButton{ - width:22px; - height:21px; - float:left; - display:inline; - margin-top:2px; - margin-left:7px; - background:url(../../images/addButton.gif) no-repeat; - } - - .upload .addButton:hover{ - background:url(../../images/addButton_hover.gif) no-repeat; - } - - - - .removeButton{ - width:22px; - height:21px; - float:left; - display:inline; - margin-top:10px; - margin-left:15px; - background:url(../../images/removeButton.gif) no-repeat; - } - - .removeButton:hover{ - background:url(../../images/removeButton_hover.gif) no-repeat; - } - - /** add button **/ - .addButton{ - width:22px; - height:21px; - float:left; - display:inline; - margin-top:10px; - margin-left:10px; - background:url(../../images/addButton.gif) no-repeat; - } - - .addButton:hover{ - background:url(../../images/addButton_hover.gif) no-repeat; - } - - /** prizesInner **/ - - #button_tech{ - height:90px; - padding-top:40px; - padding-bottom:20px; - padding-left:15px; - - width:45px; - float:left; - margin-left:20px; - margin-right:20px; - } - - #add{ - cursor:pointer; - } - - #remove{ - cursor:pointer; - } - - #add_categories{ - cursor:pointer; - } - - #remove_categories{ - cursor:pointer; - } - .head_font{ - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - color:#333; - font-weight:bold; - } - .head_font_space{ - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - color:#333; - font-weight:bold; - padding-left:260px; - } - .head_font_space_categories{ - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - color:#333; - font-weight:bold; - padding-left:275px; - } - #select1, #select1_categories{ - overflow:scroll; height:150px; width:285px; float:left; - } - #select2, #select2_categories{ - overflow:scroll; height:150px; width:285px; float:left; - } - .prizesInner{ - height:28px; - padding:5px 0; - border:#c1c1c1 solid 1px; - } - .prizesInner1{ - padding:0px 0; - border:none; - } - .prizesInner_software{ - height:180px; - padding:5px; - - } - - .prizesInner_tech{ - height:180px; - padding:5px; - - } - .mid_info{ - margin-left:7px; - } - - .last_info{ - float:right; - padding-top:3px; - } - - .head{ - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - - } - - .radio_font{ - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - color:#666; - font-weight:bold; - - } - - .place{ - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - font-weight:bold; - - } - .details{ - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - font-weight:bold; - padding-left:20px; - padding-top:25px; - - - } - IMG.new_cur{ - cursor:pointer; - } - .place_info{ - padding-left:200px; - } - - .place_par{ - margin-top:10px; - } - .prizesInner_software .placeInput{ - width:150px; - height:17px; - margin-left:5px; - display:inline; - text-align:right; - padding:3px 5px; - color:#c4c4c4; - border:#a8abad solid 1px; - } - - - .space_radio{ - - margin-left:20px; - } - - .extra_info{ - margin-top:10px; - - height:120px; - background-color:#DDD; - } - /** label **/ - .prizesInner label{ - width:auto; - float:left; - display:inline; - margin-top:4px; - font-family:Tahoma, Arial, Helvetica, sans-serif; - font-size:12px; - font-weight:bold; - color:#6c6c6c; - line-height:22px; - } - - .prizesInner label.first{ - margin-left:12px; - } - - .prizesInner label.second,.prizesInner label.third{ - margin-left:60px; - } - - .prizesInner .numberDor{ - width:auto; - float:left; - display:inline; - margin-top:4px; - font-family:Tahoma, Arial, Helvetica, sans-serif; - font-size:16px; - color:#6c6c6c; - line-height:22px; - font-weight:normal; - } - - .prizesInner .dw{ - width:auto; - float:left; - display:inline; - margin-top:4px; - margin-left:18px; - margin-right:4px; - font-family:Tahoma, Arial, Helvetica, sans-serif; - font-size:12px; - color:#6c6c6c; - line-height:22px; - } - - /** input **/ - .prizesInner .prizesInput{ - width:46px; - height:16px; - float:left; - display:inline; - margin-top:4px; - border:0; - padding:3px 9px; - font-weight:bold; - text-align:right; - color:#6c6c6c; - background:url(../../images/prizesInput.gif) no-repeat; - } - - /** button **/ - .prizesInner .addButton{ - width:22px; - height:21px; - float:left; - display:inline; - margin-left:77px; - background:url(../../images/addButton.gif) no-repeat; - } - - .prizesInner .addButton:hover{ - background:url(../../images/addButton_hover.gif) no-repeat; - } - - .prizesInner .removeButton{ - width:22px; - height:21px; - float:left; - display:inline; - margin-left:77px; - background:url(../../images/removeButton.gif) no-repeat; - } - - .prizesInner .removeButton:hover{ - background:url(../../images/removeButton_hover.gif) no-repeat; - } - /** end .prizesInner **/ - - - /** mPrizesInner **/ - .mPrizesInner{ - height:28px; - padding:5px 0; - border:#c1c1c1 solid 1px; - } - - /** label **/ - .mPrizesInner label{ - width:auto; - float:left; - display:inline; - font-family:Tahoma, Arial, Helvetica, sans-serif; - font-size:12px; - font-weight:bold; - color:#6c6c6c; - line-height:28px; - } - - .mPrizesInner .numberDor{ - width:auto; - float:left; - display:inline; - font-family:Tahoma, Arial, Helvetica, sans-serif; - font-size:16px; - color:#6c6c6c; - line-height:28px; - font-weight:normal; - } - - .mPrizesInner label.first{ - margin-left:22px; - } - - .mPrizesInner .dw{ - width:auto; - float:left; - display:inline; - margin-left:18px; - margin-right:12px; - font-family:Tahoma, Arial, Helvetica, sans-serif; - font-size:12px; - color:#6c6c6c; - line-height:28px; - } - - /** input **/ - .mPrizesInner .prizesInput{ - width:46px; - height:16px; - float:left; - display:inline; - margin-top:3px; - border:0; - padding:3px 9px; - font-weight:bold; - text-align:right; - color:#6c6c6c; - background:url(../../images/prizesInput.gif) no-repeat; - } - - .mPrizesInner strong{ - width:auto; - float:left; - display:inline; - margin-left:13px; - margin-right:16px; - font-family:Tahoma, Arial, Helvetica, sans-serif; - font-size:12px; - line-height:28px; - color:#6c6c6c; - } - /** end .mPrizesInner **/ - - A.link{ - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - } - /** mPrizesInner **/ - .deliverablesInner{ - padding:5px 0px; - padding-right:0; - border:#c1c1c1 solid 1px; - } - - .deliverablesInner1{ - - - border:none; - } - - /** input **/ - .deliverablesInner .checkInput{ - width:auto; - float:left; - display:inline; - margin-top:4px; - } - - /** label **/ - .deliverablesInner label{ - padding-left:2px; - padding-right:50px; - font-size:12px; - color:#6c6c6c; - } - - /** input **/ - .deliverablesInner .text{ - width:46px; - height:16px; - border:0; - padding:3px 9px; - font-weight:bold; - color:#6c6c6c; - margin-right:30px; - background:url(../../images/prizesInput.gif) no-repeat; - } - - /** file button **/ - .deliverablesInner .fileType{ - width:auto; - height:22px; - float:left; - display:inline; - margin-top:4px; - padding-left:28px; - font-size:12px; - color:#ab0000; - line-height:22px; - text-decoration:underline; - background:url(../../images/addButton.gif) no-repeat left center; - } - - .deliverablesInner .fileType:hover{ - text-decoration:none; - background:url(../../images/addButton_hover.gif) no-repeat left center; - } - - - /** button style **/ - .buttonBox{ - padding-top:24px; - } - - a.contiune{ - margin-right:0px; - margin-left:10px; - } - - a.contiune span.left{ - width:auto; - float:left; - display:inline; - } - - a.contiune span.right{ - width:auto; - float:left; - display:inline; - padding:4px 22px 0 18px; - } - - a.draft, a.preview{ - margin-right:24px; - background:url(../../images/grey_button_bg.gif) repeat-x left top; - } - - .tabHead a.draft, .tabHead a.draft{ - margin-top:6px; - margin-right:12px; - } - - a.draft:hover, a.preview:hover{ - background:url(../../images/grey_button_bg.gif) repeat-x left bottom; - } - - a.draft span.left, a.preview span.left{ - width:auto; - float:left; - display:inline; - background:url(../../images/grey_button_left.gif) no-repeat left top; - } - - a.draft:hover span.left, a.preview:hover span.left{ - background:url(../../images/grey_button_left.gif) no-repeat left bottom; - } - - .tabHead a.draft span.right, .tabHead a.preview span.right{ - padding:4px 15px 0 15px; - } - - a.draft span.right, a.preview span.right{ - width:auto; - float:left; - display:inline; - padding:4px 19px 0 15px; - background:url(../../images/grey_button_right.gif) no-repeat right top; - } - - a.draft:hover span.right, a.preview:hover span.right{ - background:url(../../images/grey_button_right.gif) no-repeat right bottom; - } - - -/** Contest Detail **/ -#launchContestOut .contestDetail h3{ - margin-top:18px; - } - - /** help icon **/ - #launchContestOut .helpIcon{ - width:16px; - height:15px; - float:left; - display:inline; - margin-left:6px; - background:url(../../images/help_ico4.gif) no-repeat; - } - - #launchContestOut .helpIcon:hover{ - background:url(../../images/help_ico4.gif) no-repeat left bottom; - } - - /** label **/ - #launchContestOut .contestDetail .prizes .catalogSelect { - float: left; - display: block; - margin: 10px 0px; - width: 100%; - } - - /** label **/ - #launchContestOut .contestDetail .prizes .catalogSelect label{ - float: left; - display: block; - margin-left:3px; - font-family:Geneva, Arial, Helvetica, sans-serif; - font-size:14px; - font-weight: bold; - line-height:28px; - } - - /** input **/ - #launchContestOut .contestDetail .prizes .catalogSelect .newListSelected{ - float: left; - display: block; - margin-left: 10px; - height:28px; - } - - /** textarea **/ - #launchContestOut .contestDetail .textarea{ - height:250px; - padding-left:10px; - border:#c4c4c4 solid 1px; - } - - #launchContestOut .contestDetail .textarea1{ - height:150px; - padding-left:10px; - border:#c4c4c4 solid 1px; - } - #launchContestOut .editor{ - float:right; - background-color:#DDD; - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - color:#333; - padding-top:3px; - padding-bottom:3px; - padding-left:10px; - padding-right:10px; - border: #666 solid 1px; - - } - #launchContestOut .editor A{ - padding-left:5px; - - } - - #launchContestOut .contestDetail .textarea textarea{ - width:100%; - height:239px; - border:0; - padding:5px 0; - font-size:14px; - color:#333; - - } - - #launchContestOut .contestDetail .textarea1 textarea{ - width:100%; - height:130px; - border:0; - padding:5px 0; - font-size:14px; - color:#333; - - } - - /** textarea bottom **/ - #launchContestOut .contestDetail .bottomTextarea{ - height:22px; - border:#dddddd solid 1px; - position:relative; - background:url(../../images/textarea_bottom_bg.gif) repeat-x; - } - - #launchContestOut .contestDetail .bottomTextarea p{ - margin-left:10px; - font-size:13px; - line-height:22px; - color:#494949; - } - - #launchContestOut .contestDetail .bottomTextarea .icon{ - width:11px; - height:11px; - position:absolute; - right:1px; - bottom:1px; - overflow:hidden; - background:url(../../images/textarea_bottom.gif) no-repeat; - } - -/*content page styes*/ -.tabHead{ - height:34px; - margin-top:25px; - background:url(../../images/tabHead.gif) 0 0 repeat-x; - position:relative; - } - .tabHead.head{ - margin-top:10px; - height:36px; - background:url(../../images/tabHead2.gif) 0 0 repeat-x; - } - - /** tab list **/ - .tabHead ul{ - margin-left:0px; - } - - .tabHead li{ - width:250px; - height:34px; - line-height:34px; - float:left; - display:inline; - font-weight:400; - color:#333; - font-size:12px; - padding-left:30px; - list-style-type:none; - } - - .tabHead li.current{ - width:111px; - font-weight:700; - font-size:14px; - background:url(../../images/tabTop_current.gif) 0 0 no-repeat; - color:#fffffe; - } - - /** tr **/ - .tabHead .tr{ - width:4px; - height:34px; - position:absolute; - top:0; - right:0px; - background:url(../../images/tabHead-tr.gif) no-repeat; - } - /** tl **/ - .tabHead .tl{ - width:4px; - height:34px; - position:absolute; - top:0; - left:0px; - background:url(../../images/tabHead-tl.gif) no-repeat; - } - - /** tr **/ - .tabHead .tr2{ - width:4px; - height:36px; - position:absolute; - top:0; - right:0px; - background:url(../../images/tabHead-tr2.gif) no-repeat; - } - /** tl **/ - .tabHead .tl2{ - width:4px; - height:36px; - position:absolute; - top:0; - left:0px; - background:url(../../images/tabHead-tl2.gif) no-repeat; - } - - .tabHead a.button6 span.right{ - padding-right: 15px; - padding-left: 15px; - } - - .tabHead a{ - margin-top: 6px; - margin-right: 5px; - } - - /* expand and collapse */ - .tabHead.head .group{ - margin-top: 9px; - height: 16px; - margin-left: 5px; - padding-left: 22px; - text-decoration: none; - font-weight: bold; - float: left; - } - - .tabHead.head .expand{ - text-decoration: none; - background: url(../../images/notification_expand_ico.png) no-repeat left; /* the expand icon */ - } - .tabHead.head .collapse{ background: transparent url("../../images/minimize.png") no-repeat scroll 0% 0%;} /* the collapse icon */ - - /** edit button **/ - .tabHead .editButton{ - float:right; - width:57px; - height:24px; - line-height:24px; - margin:5px 10px 0 0; - font-size:12px; - font-weight:700; - text-decoration:none; - color:#fffffe; - text-align:center; - background:url(../../images/editButton.gif) 0 0 no-repeat; - } - - .tabHead .editButton:hover{ - background:url(../../images/editButton.gif) 0 -24px no-repeat; - } - -/** over view **/ -.overviewBox{ - border:1px solid #ccc; - padding:10px 0; - } - - .overviewData { - font-size:14px; - text-align:left; - line-height:35px; - } - - .overviewData th{ - width:110px; - font-weight:400; - text-align:right; - } - - .overviewData td{ - font-family:Geneva, Arial, Helvetica, sans-serif; - font-size:14px; - color:#333; - padding-left:15px; - } - - .overviewData td img{ - vertical-align:middle; - } -/** content list **/ -.contentList{ - margin:10px 0; - } - - .contentList dt{ - font-size:12px; - line-height:18px; - font-weight:bold; - } - - .contentList dd{ - font-family:Geneva, Arial, Helvetica, sans-serif; - font-size:14px; - line-height:20px; - margin-left:0px; - margin-bottom:20px; - } - - .contentList dd img{ - vertical-align:middle; - } - -.cbox{ - border:1px solid #ccc; - padding:12px 17px 12px 12px; - margin-bottom:15px; - } - - /** file box **/ - #cboxFiles{ - height:48px; - padding-right:0; - } - - /** tip link **/ - #cboxFiles .tipLink,.deliverablesInner .tipLink,.mPrizesInner .tipLink,.prizesInner .tipLink{ - width:auto; - float:right; - display:inline; - margin-right:12px; - margin-top:18px; - } - - .deliverablesInner .tipLink,.mPrizesInner .tipLink,.prizesInner .tipLink{ - margin-top:6px; - } - - #cboxFiles dl{ - width:90%; - float:left; - display:inline; - } - #cboxFiles dt,#cboxFiles dd{ - width:45%; - float:left; - display:inline; - text-align:left; - margin-left:0px; - font-size:14px; - line-height:24px; - } - -.buttonBox .launchContest{ - width:150px; - float:right; - } - -/** save button **/ -.saveButton a{ - width:116px; - height:24px; - float:right; - height:24px; - line-height:24px; - font-size:12px; - font-weight:700; - text-decoration:none; - color:#fffffe; - text-align:center; - background:url(../../images/saveButton.gif) 0 0 no-repeat; - margin-right:20px; - } - .saveButton a:hover{ - background:url(../../images/saveButton.gif) 0 -24px no-repeat; - } - -.tipLink{ - margin-left:8px; - } - - -/** select init **/ -.roundelect{ - width:auto; - float:left; - display:inline; - } - -.tabContest .visibility{ - visibility:hidden; - } - -/** tabContest and project select **/ -.tabContest .newListSelected,.projectSelect .newListSelected{ - width:362px; - height:28px; - padding:0 5px; - border:0; - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - color:#333; - line-height:28px; - cursor:pointer; - background:url(../../images/tabContest_select.gif) no-repeat; - } - - .tabContest .selectedTxt,.projectSelect .selectedTxt{ - width:359px; - } - - .tabContest .newList,.projectSelect .newList{ - width:370px !important; - border:#ccc solid 1px; - background:#fff; - position:absolute !important; - z-index: 999 !important; - } - - /*.projectSelect .newList{ - overflow-x: hidden !important; - overflow-y: scroll !important; - }*/ - -/*** Fix A underline in jQuery stylish select 0.4.1 ***/ -div.newListSelected ul.newList a{ - text-decoration: none; -} - -/** billing and round select **/ -.billingSelect .newListSelected,.roundelect .newListSelected{ - width:283px; - height:28px; - padding:0 5px; - border:0; - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - color:#333; - line-height:28px; - cursor:pointer; - background:url(../../images/billing_select.gif) no-repeat; - } - - .roundelect .newListSelected{ - font-family:Tahoma, Arial, Helvetica, sans-serif; - color:#6c6c6c; - } - - .billingSelect .selectedTxt,.roundelect .selectedTxt{ - width:281px; - } - - .billingSelect .newList,.roundelect .newList{ - width:290px; - border:#ccc solid 1px; - background:#fff; - position:absolute; - z-index: 999 !important; - } - .roundelect .newList{ - overflow: hidden; - } - /*.billingSelect .newList{ - overflow-x: hidden !important; - overflow-y: scroll !important; - }*/ - -/** date select **/ -.startSelect .newListSelected,.milestoneSelect .newListSelected,.endSelect .newListSelected{ - width:196px; - height:22px; - padding:0 5px; - border:0; - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - color:#6c6c6c; - line-height:22px; - cursor:pointer; - background:url(../../images/startSelect.gif) no-repeat; - } - - .startSelect .selectedTxt,.milestoneSelect .selectedTxt,.endSelect .selectedTxt{ - width:196px; - } - - .startSelect .newList,.milestoneSelect .newList,.endSelect .newList{ - width:203px; - border:#ccc solid 1px; - background:#fff; - position:absolute; - margin-top:-3px; - } - -/** time select **/ -.startEtSelect .newListSelected,.milestoneEtSelect .newListSelected,.endEtSelect .newListSelected{ - width:49px; - height:22px; - padding:0 5px; - border:0; - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - color:#6c6c6c; - line-height:22px; - cursor:pointer; - position:relative; - z-index:100 !important; - background:url(../../images/timeSelect.gif) no-repeat; - } - - .startEtSelect .selectedTxt,.milestoneEtSelect .selectedTxt,.endEtSelect .selectedTxt{ - width:49px; - } - - .startEtSelect .newList,.milestoneEtSelect .newList,.endEtSelect .newList{ - width:56px; - border:#ccc solid 1px; - background:#fff; - position:absolute; - margin-top:-3px; - } - -/** num select **/ -.numSelect{ - width:auto; - float:left; - display:inline; - } - -.numSelect .newListSelected{ - width:52px; - height:28px; - padding:0 5px; - border:0; - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - color:#545b66; - line-height:22px; - cursor:pointer; - background:url(../../images/numSelect.gif) no-repeat; - } - - .numSelect .selectedTxt{ - width:52px; - font-family:Tahoma, Arial, Helvetica, sans-serif; - font-weight:bold; - text-indent:19px; - line-height:28px; - } - - .numSelect .newList{ - width:59px; - border:#ccc solid 1px; - background:#fff; - position:absolute; - margin-top:-3px; - color:#6c6c6c; - list-style:none; - } - - .numSelect .newList li{ - font-family:Tahoma, Arial, Helvetica, sans-serif; - font-weight:bold; - text-indent:19px; - color:#6c6c6c; - } - -/** catalogselect **/ -.catalogSelect .newListSelected{ - width:300px; - height:28px; - padding:0 5px; - border:0; - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - color:#333; - line-height:28px; - cursor:pointer; - background:url(../../images/tabCatalog_select.gif) no-repeat; - } - - .catalogSelect .selectedTxt{ - width:298px; - } - - .catalogSelect .newList{ - width:298px !important; - border:#ccc solid 1px; - background:#fff; - position:absolute !important; - margin-top:-3px !important; - } - -/** select li **/ -.newList li{ - width:100%; - height:22px; - line-height:22px; - overflow:hidden; - text-indent:5px; - text-align:left; - } - -.newList li.current{ - background:#eee; - } - -.newListHover{ - background:#ccc; - } - -/*************************************************************** date pick *********************************************/ -a.dp-choose-date { - width:21px; - height:19px; - float:left; - display:inline; - margin-top:1px; - margin-left:6px; - margin-right:22px; - overflow:hidden; - text-indent:-2000px; - background:url(../../images/date_icon.gif) no-repeat; -} - -.dp-choose-date{ - display:none; -} - -table.jCalendar { - background: #ededed; -} - -table.jCalendar th { - color: #2f3338; - font-family:"Arial Rounded MT Bold"; - padding:8px 3px; -} - -table.jCalendar td { - background: #dfe1e3; - color: #333; - padding:6px; - font-weight:bold; - text-align: center; - border:#bdc2c5 solid 1px; - font-family:"Arial Rounded MT Bold"; -} - -table.jCalendar tr td.other-month { - background: #dfe1e3; - color: #bdc2c5; -} - -table.jCalendar td.today { - background: #4c92d8; - color: #ffffff; - font-weight:bold; -} - -table.jCalendar td.selected { - background: #f66; - color: #fff; -} - -table.jCalendar td.selected.dp-hover { - background: #ccc; - color: #000; -} - -table.jCalendar td.dp-hover, -table.jCalendar tr.activeWeekHover td { - background: #ccc; - color: #fff; -} - -table.jCalendar tr.selectedWeek td { - background: #f66; - color: #fff; -} - -table.jCalendar td.disabled, table.jCalendar td.disabled.dp-hover { - background: #dfe1e3; - color: #888; -} - -table.jCalendar td.unselectable, -table.jCalendar td.unselectable:hover, -table.jCalendar td.unselectable.dp-hover { - background: #ccc; - color: #000; -} - -/* For the popup */ - -/* NOTE - you will probably want to style a.dp-choose-date - see how I did it in demo.css */ - -div.dp-popup { - position: relative; - background: #ededed; - font-size: 10px; - font-family: arial, sans-serif; - padding: 1px; - line-height: 1.2em; - border:#333 solid 1px; -} - -div#dp-popup { - position: absolute; - z-index: 199; -} - -div.dp-popup h2 { - font-size: 12px; - text-align: center; - margin: 4px 0; - padding: 0; -} - -a#dp-close { - font-size: 11px; - padding: 4px 0; - text-align: center; - display: block; -} - -a#dp-close:hover { - text-decoration: underline; -} - -div.dp-popup a { - color: #000; - text-decoration: none; - padding: 3px 2px 0; -} - -div.dp-popup div.dp-nav-prev { - position: absolute; - top: 2px; - left: 4px; - width: 100px; -} - -div.dp-popup div.dp-nav-prev a { - width:auto; - float: left; - display:inline; -} - -/* Opera needs the rules to be this specific otherwise it doesn't change the cursor back to pointer after you have disabled and re-enabled a link */ -div.dp-popup div.dp-nav-prev a, div.dp-popup div.dp-nav-next a { - cursor: pointer; -} - -div.dp-popup div.dp-nav-prev a.disabled, div.dp-popup div.dp-nav-next a.disabled { - cursor: default; -} - -div.dp-popup div.dp-nav-next { - position: absolute; - top: 2px; - right: 4px; - width: 100px; -} - -div.dp-popup div.dp-nav-next a { - width:auto; - float: right; - display:inline; -} - -div.dp-popup a.disabled { - cursor: default; - color: #aaa; -} - -div.dp-popup td { - cursor: pointer; -} - -div.dp-popup td.disabled { - cursor: default; -} - -.dp-nav-prev-year,.dp-nav-next-year{ - display:none; -} -/*date picker*/ -.date .text{ - width:auto; - float:left; - display:inline; -} - -#placeHolder{ - font-size:36px; - text-align:center; - line-height:350px; - font-weight:bold; - } - -.clear{ - width:1px; - height:1px; - clear:both; - overflow:hidden; - } - - -/** stylish select additional styles (payment-method.html) **/ -.selectDesign .newList { - background: white url(../../images/list_vert_line.gif) no-repeat 184px 0px; - } - -.selectDesign li.newListOptionTitle { - font-weight:bold; - width: 185px; - float: left; - display: block; - } - -.selectDesign .newListOptionTitle li { - font-weight:normal; - width: 185px; - - } - -.selectDesign .moreLink { - float: left; - } diff --git a/scorecard_tool/web-app/css/scorecard/main.css b/scorecard_tool/web-app/css/scorecard/main.css deleted file mode 100644 index 814802a0f..000000000 --- a/scorecard_tool/web-app/css/scorecard/main.css +++ /dev/null @@ -1,584 +0,0 @@ -/* FONT STACK */ -body, -input, select, textarea { - font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; -} - -/* BASE LAYOUT */ - -html { - background-color: #ddd; - background-image: -moz-linear-gradient(center top, #aaa, #ddd); - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #aaa), color-stop(1, #ddd)); - background-image: linear-gradient(top, #aaa, #ddd); - filter: progid:DXImageTransform.Microsoft.gradient(startColorStr = '#aaa', EndColorStr = '#ddd'); - background-repeat: no-repeat; - height: 100%; - /* change the box model to exclude the padding from the calculation of 100% height (IE8+) */ - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -html.no-cssgradients { - background-color: #aaa; -} - -.ie6 html { - height: 100%; -} - -html * { - margin: 0; -} - -body { - background: #ffffff; - color: #333333; - margin: 0 auto; - max-width: 960px; - overflow-x: hidden; /* prevents box-shadow causing a horizontal scrollbar in firefox when viewport < 960px wide */ - -moz-box-shadow: 0 0 0.3em #255b17; - -webkit-box-shadow: 0 0 0.3em #255b17; - box-shadow: 0 0 0.3em #255b17; -} - -#grailsLogo { - background-color: #abbf78; -} - -/* replace with .no-boxshadow body if you have modernizr available */ -.ie6 body, -.ie7 body, -.ie8 body { - border-color: #255b17; - border-style: solid; - border-width: 0 1px; -} - -.ie6 body { - height: 100%; -} - -a:link, a:visited, a:hover { - color: #48802c; -} - -a:hover, a:active { - outline: none; /* prevents outline in webkit on active links but retains it for tab focus */ -} - -h1 { - color: #48802c; - font-weight: normal; - font-size: 1.25em; - margin: 0.8em 0 0.3em 0; -} - -ul { - padding: 0; -} - -img { - border: 0; -} - -/* GENERAL */ - -#grailsLogo a { - display: inline-block; - margin: 1em; -} - -.content { -} - -.content h1 { - border-bottom: 1px solid #CCCCCC; - margin: 0.8em 1em 0.3em; - padding: 0 0.25em; -} - -.scaffold-list h1 { - border: none; -} - -.footer { - background: #abbf78; - color: #000; - clear: both; - font-size: 0.8em; - padding: 1em; - min-height: 1em; -} - -.footer a { - color: #255b17; -} - -.spinner { - background: url(../images/spinner.gif) 50% 50% no-repeat transparent; - height: 16px; - width: 16px; - padding: 0.5em; - position: absolute; - right: 0; - top: 0; - text-indent: -9999px; -} - -/* NAVIGATION MENU */ - -.nav { - background-color: #efefef; - padding: 0.5em 0.75em; - -moz-box-shadow: 0 0 3px 1px #aaaaaa; - -webkit-box-shadow: 0 0 3px 1px #aaaaaa; - box-shadow: 0 0 3px 1px #aaaaaa; - zoom: 1; -} - -.nav ul { - overflow: hidden; - padding-left: 0; - zoom: 1; -} - -.nav li { - display: block; - float: left; - list-style-type: none; - margin-right: 0.5em; - padding: 0; -} - -.nav a { - color: #666666; - display: block; - padding: 0.25em 0.7em; - text-decoration: none; - -moz-border-radius: 0.3em; - -webkit-border-radius: 0.3em; - border-radius: 0.3em; -} - -.nav a:active, .nav a:visited { - color: #666666; -} - -.nav a:focus, .nav a:hover { - background-color: #999999; - color: #ffffff; - outline: none; - text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8); -} - -.no-borderradius .nav a:focus, .no-borderradius .nav a:hover { - background-color: transparent; - color: #444444; - text-decoration: underline; -} - -.nav a.home, .nav a.list, .nav a.create { - background-position: 0.7em center; - background-repeat: no-repeat; - text-indent: 25px; -} - -.nav a.home { - background-image: url(../images/skin/house.png); -} - -.nav a.list { - background-image: url(../images/skin/database_table.png); -} - -.nav a.create { - background-image: url(../images/skin/database_add.png); -} - -/* CREATE/EDIT FORMS AND SHOW PAGES */ - -fieldset, -.property-list { - margin: 0.6em 1.25em 0 1.25em; - padding: 0.3em 1.8em 1.25em; - position: relative; - zoom: 1; - border: none; -} - -.property-list .fieldcontain { - list-style: none; - overflow: hidden; - zoom: 1; -} - -.fieldcontain { - margin-top: 1em; -} - -.fieldcontain label, -.fieldcontain .property-label { - color: #666666; - text-align: right; - width: 25%; -} - -.fieldcontain .property-label { - float: left; -} - -.fieldcontain .property-value { - display: block; - margin-left: 27%; -} - -label { - cursor: pointer; - display: inline-block; - margin: 0 0.25em 0 0; -} - -input, select, textarea { - background-color: #fcfcfc; - border: 1px solid #cccccc; - font-size: 1em; - padding: 0.2em 0.4em; -} - -select { - padding: 0.2em 0.2em 0.2em 0; -} - -select[multiple] { - vertical-align: top; -} - -textarea { - width: 250px; - height: 150px; - overflow: auto; /* IE always renders vertical scrollbar without this */ - vertical-align: top; -} - -input[type=checkbox], input[type=radio] { - background-color: transparent; - border: 0; - padding: 0; -} - -input:focus, select:focus, textarea:focus { - background-color: #ffffff; - border: 1px solid #eeeeee; - outline: 0; - -moz-box-shadow: 0 0 0.5em #ffffff; - -webkit-box-shadow: 0 0 0.5em #ffffff; - box-shadow: 0 0 0.5em #ffffff; -} - -.required-indicator { - color: #48802C; - display: inline-block; - font-weight: bold; - margin-left: 0.3em; - position: relative; - top: 0.1em; -} - -ul.one-to-many { - display: inline-block; - list-style-position: inside; - vertical-align: top; -} - -.ie6 ul.one-to-many, .ie7 ul.one-to-many { - display: inline; - zoom: 1; -} - -ul.one-to-many li.add { - list-style-type: none; -} - -/* EMBEDDED PROPERTIES */ - -fieldset.embedded { - background-color: transparent; - border: 1px solid #CCCCCC; - padding-left: 0; - padding-right: 0; - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} - -fieldset.embedded legend { - margin: 0 1em; -} - -/* MESSAGES AND ERRORS */ - -.errors, -.message { - font-size: 0.8em; - line-height: 2; - margin: 1em 2em; - padding: 0.5em; -} - -.message { - background: #f3f3ff; - border: 1px solid #b2d1ff; - color: #006dba; - -moz-box-shadow: 0 0 0.25em #b2d1ff; - -webkit-box-shadow: 0 0 0.25em #b2d1ff; - box-shadow: 0 0 0.25em #b2d1ff; -} - -.errors { - background: #fff3f3; - border: 1px solid #ffaaaa; - color: #cc0000; - -moz-box-shadow: 0 0 0.25em #ff8888; - -webkit-box-shadow: 0 0 0.25em #ff8888; - box-shadow: 0 0 0.25em #ff8888; -} - -.errors ul, -.message { - padding: 0; -} - -.errors li { - list-style: none; - background: transparent url(../images/skin/exclamation.png) 0 50% no-repeat; - text-indent: 22px; -} - -.message { - background: transparent url(../images/skin/information.png) 0 50% no-repeat; - text-indent: 22px; -} - -/* form fields with errors */ - -.error input, .error select, .error textarea { - background: #fff3f3; - border-color: #ffaaaa; - color: #cc0000; -} - -.error input:focus, .error select:focus, .error textarea:focus { - -moz-box-shadow: 0 0 0.5em #ffaaaa; - -webkit-box-shadow: 0 0 0.5em #ffaaaa; - box-shadow: 0 0 0.5em #ffaaaa; -} - -/* same effects for browsers that support HTML5 client-side validation (these have to be specified separately or IE will ignore the entire rule) */ - -input:invalid, select:invalid, textarea:invalid { - background: #fff3f3; - border-color: #ffaaaa; - color: #cc0000; -} - -input:invalid:focus, select:invalid:focus, textarea:invalid:focus { - -moz-box-shadow: 0 0 0.5em #ffaaaa; - -webkit-box-shadow: 0 0 0.5em #ffaaaa; - box-shadow: 0 0 0.5em #ffaaaa; -} - -/* TABLES */ - -table { - border-top: 1px solid #DFDFDF; - border-collapse: collapse; - width: 100%; - margin-bottom: 1em; -} - -tr { - border: 0; -} - -tr>td:first-child, tr>th:first-child { - padding-left: 1.25em; -} - -tr>td:last-child, tr>th:last-child { - padding-right: 1.25em; -} - -td, th { - line-height: 1.5em; - padding: 0.5em 0.6em; - text-align: left; - vertical-align: top; -} - -th { - background-color: #efefef; - background-image: -moz-linear-gradient(top, #ffffff, #eaeaea); - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #ffffff), color-stop(1, #eaeaea)); - filter: progid:DXImageTransform.Microsoft.gradient(startColorStr = '#ffffff', EndColorStr = '#eaeaea'); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffffff', EndColorStr='#eaeaea')"; - color: #666666; - font-weight: bold; - line-height: 1.7em; - padding: 0.2em 0.6em; -} - -thead th { - white-space: nowrap; -} - -th a { - display: block; - text-decoration: none; -} - -th a:link, th a:visited { - color: #666666; -} - -th a:hover, th a:focus { - color: #333333; -} - -th.sortable a { - background-position: right; - background-repeat: no-repeat; - padding-right: 1.1em; -} - -th.asc a { - background-image: url(../images/skin/sorted_asc.gif); -} - -th.desc a { - background-image: url(../images/skin/sorted_desc.gif); -} - -.odd { - background: #f7f7f7; -} - -.even { - background: #ffffff; -} - -th:hover, tr:hover { - background: #E1F2B6; -} - -/* PAGINATION */ - -.pagination { - border-top: 0; - margin: 0; - padding: 0.3em 0.2em; - text-align: center; - -moz-box-shadow: 0 0 3px 1px #AAAAAA; - -webkit-box-shadow: 0 0 3px 1px #AAAAAA; - box-shadow: 0 0 3px 1px #AAAAAA; - background-color: #EFEFEF; -} - -.pagination a, -.pagination .currentStep { - color: #666666; - display: inline-block; - margin: 0 0.1em; - padding: 0.25em 0.7em; - text-decoration: none; - -moz-border-radius: 0.3em; - -webkit-border-radius: 0.3em; - border-radius: 0.3em; -} - -.pagination a:hover, .pagination a:focus, -.pagination .currentStep { - background-color: #999999; - color: #ffffff; - outline: none; - text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8); -} - -.no-borderradius .pagination a:hover, .no-borderradius .pagination a:focus, -.no-borderradius .pagination .currentStep { - background-color: transparent; - color: #444444; - text-decoration: underline; -} - -/* ACTION BUTTONS */ - -.buttons { - background-color: #efefef; - overflow: hidden; - padding: 0.3em; - -moz-box-shadow: 0 0 3px 1px #aaaaaa; - -webkit-box-shadow: 0 0 3px 1px #aaaaaa; - box-shadow: 0 0 3px 1px #aaaaaa; - margin: 0.1em 0 0 0; - border: none; -} - -.buttons input, -.buttons a { - background-color: transparent; - border: 0; - color: #666666; - cursor: pointer; - display: inline-block; - margin: 0 0.25em 0; - overflow: visible; - padding: 0.25em 0.7em; - text-decoration: none; - - -moz-border-radius: 0.3em; - -webkit-border-radius: 0.3em; - border-radius: 0.3em; -} - -.buttons input:hover, .buttons input:focus, -.buttons a:hover, .buttons a:focus { - background-color: #999999; - color: #ffffff; - outline: none; - text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8); - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} - -.no-borderradius .buttons input:hover, .no-borderradius .buttons input:focus, -.no-borderradius .buttons a:hover, .no-borderradius .buttons a:focus { - background-color: transparent; - color: #444444; - text-decoration: underline; -} - -.buttons .delete, .buttons .edit, .buttons .save { - background-position: 0.7em center; - background-repeat: no-repeat; - text-indent: 25px; -} - -.buttons .delete { - background-image: url(../images/skin/database_delete.png); -} - -.buttons .edit { - background-image: url(../images/skin/database_edit.png); -} - -.buttons .save { - background-image: url(../images/skin/database_save.png); -} - -a.skip { - position: absolute; - left: -9999px; -} diff --git a/scorecard_tool/web-app/css/scorecard/mobile.css b/scorecard_tool/web-app/css/scorecard/mobile.css deleted file mode 100644 index 633b9b761..000000000 --- a/scorecard_tool/web-app/css/scorecard/mobile.css +++ /dev/null @@ -1,82 +0,0 @@ -/* Styles for mobile devices */ - -@media screen and (max-width: 480px) { - .nav { - padding: 0.5em; - } - - .nav li { - margin: 0 0.5em 0 0; - padding: 0.25em; - } - - /* Hide individual steps in pagination, just have next & previous */ - .pagination .step, .pagination .currentStep { - display: none; - } - - .pagination .prevLink { - float: left; - } - - .pagination .nextLink { - float: right; - } - - /* pagination needs to wrap around floated buttons */ - .pagination { - overflow: hidden; - } - - /* slightly smaller margin around content body */ - fieldset, - .property-list { - padding: 0.3em 1em 1em; - } - - input, textarea { - width: 100%; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; - } - - select, input[type=checkbox], input[type=radio], input[type=submit], input[type=button], input[type=reset] { - width: auto; - } - - /* hide all but the first column of list tables */ - .scaffold-list td:not(:first-child), - .scaffold-list th:not(:first-child) { - display: none; - } - - .scaffold-list thead th { - text-align: center; - } - - /* stack form elements */ - .fieldcontain { - margin-top: 0.6em; - } - - .fieldcontain label, - .fieldcontain .property-label, - .fieldcontain .property-value { - display: block; - float: none; - margin: 0 0 0.25em 0; - text-align: left; - width: auto; - } - - .errors ul, - .message p { - margin: 0.5em; - } - - .error ul { - margin-left: 0; - } -} diff --git a/scorecard_tool/web-app/css/scorecard/modal.css b/scorecard_tool/web-app/css/scorecard/modal.css deleted file mode 100644 index 05736a577..000000000 --- a/scorecard_tool/web-app/css/scorecard/modal.css +++ /dev/null @@ -1,308 +0,0 @@ -*{padding: 0; margin: 0;} -#TB_window { - font: 12px Arial, Helvetica, sans-serif; - color: #333333; -} - -#TB_secondLine { - font: 10px Arial, Helvetica, sans-serif; - color:#666666; -} - - -/* ----------------------------------------------------------------------------------------------------------------*/ -/* ---------->>> modal settings <<<-----------------------------------------------------------------------------*/ -/* ----------------------------------------------------------------------------------------------------------------*/ -#TB_overlay { - position:absolute; - z-index:100; - top: 0px; - left: 0px; - height:100%; - width:100%; - display:none; -} - -.TB_overlayMacFFBGHack {background: url(macFFBgHack.png) repeat;} -.TB_overlayBG { - background:#000000; -} - -* html #TB_overlay { /* ie6 hack */ - position: absolute; -} - -#TB_window { - width:830px; - height:424px !important; - position:absolute; - background: #ffffff; - z-index: 102; - color:#000000; - display:none; - top:0; - left:0; - border: 1px solid #000; - text-align:left; - overflow:hidden; -} - -* html #TB_window { /* ie6 hack */ -position: absolute; -} - -#TB_window img#TB_Image { - display:block; - margin: 15px 0 0 15px; - border-right: 1px solid #ccc; - border-bottom: 1px solid #ccc; - border-top: 1px solid #666; - border-left: 1px solid #666; -} - -#TB_caption{ - height:25px; - padding:7px 30px 10px 25px; - float:left; -} - -#TB_closeWindow{ - height:25px; - padding:11px 25px 10px 0; - float:right; -} - -#TB_closeAjaxWindow{ - padding:7px 10px 5px 0; - margin-bottom:1px; - text-align:right; - float:right; -} - -#TB_ajaxWindowTitle{ - float:left; - padding:7px 0 5px 10px; - margin-bottom:1px; -} - -#TB_title{ - background-color:#e8e8e8; - height:27px; -} - -#TB_ajaxContent{ - height:395px; - clear:both; - padding:2px 15px 0 15px; - overflow:auto; - text-align:left; - line-height:1.4em; -} - -#TB_ajaxContent.TB_modal{ - padding:15px; -} - -#TB_ajaxContent p{ - padding:5px 0px 5px 0px; -} - -#TB_load{ - position: fixed; - display:none; - height:13px; - width:208px; - z-index:103; - top: 50%; - left: 50%; - margin: -6px 0 0 -104px; /* -height/2 0 0 -width/2 */ -} - -* html #TB_load { /* ie6 hack */ -position: absolute; -} - -#TB_HideSelect{ - z-index:99; - position:fixed; - top: 0; - left: 0; - background-color:#fff; - border:none; - height:100%; - width:100%; -} - -* html #TB_HideSelect { /* ie6 hack */ - position: absolute; -} - -#TB_iframeContent{ - clear:both; - border:none; - margin-bottom:-1px; - margin-top:1px; -} - -/* OVERRIDE! */ -#TB_window_custom { - position:absolute; - z-index: 102; - color:#000000; - display:none; - top:0; - left:0; - overflow:hidden; - background-color: inherit; -} - -* html #TB_window_custom { /* ie6 hack */ -position: absolute; -} - .specrev-window { - width:360px !important; - height:211px !important; - border: none !important; - background: transparent url(../../images/specplan_window.gif) no-repeat top left !important; - text-align:center !important; - position:absolute; - overflow:hidden; - } - .specrev-window a { - display: block; - margin: auto; - width: 191px; - height: 25px; - } - .specrev-window a.review-now { background: url(../../images/specplan_btn_now.gif) no-repeat top left; } - .specrev-window a.review-later { background: url(../../images/specplan_btn_l8r.gif) no-repeat top left; } - .specrev-window a:hover { - background-position: 0 -25px; - } - .specrev-window h1 { - font-size: 19px !important; - margin: 25px 0 20px 0; - } - .specrev-window p { - font-size: 12px; - color: #747474; - } - .specrev-window p.or { - margin: 10px 0; - } - .specrev-window p.note { - margin: 5px 0 0 0; - } - -/* add Manually window*/ -.addWindow.ui-dialog-content.ui-widget-content{ - margin: 0; - padding: 0; -} - .addWindow.ui-dialog-content.ui-widget-content .header{ - height: 42px; - background-color: #f0f0f0; - border-bottom: #bdbdbd 1px solid; - } - .addWindow.ui-dialog-content.ui-widget-content .header p.title{ - padding: 0; - margin: 0 20px; - font-size: 16px; - color:#333; - line-height: 42px; - } - .addWindow.ui-dialog-content.ui-widget-content .body{ - padding: 20px; - color: #333; - font-size: 11px; - } - #addMatch.addWindow.ui-dialog-content.ui-widget-content .body{ - padding: 0 0 0 20px; - } - #addMatch.addWindow.ui-dialog-content.ui-widget-content .body .card{ - margin-right: 0px; - } - .addWindow.ui-dialog-content.ui-widget-content .body textarea{ - width: 400px; - padding: 0 3px; - font-family: Arial; - margin: 5px 0; - padding: 0 3px; - } - #addManually.addWindow .body textarea.question{height:30px;} - #addManually.addWindow .body textarea.guideline, - #addReq.addWindow .body textarea.guideline{height:130px;} - #addManually.addWindow .body label, - #addReq.addWindow .body label{ - display: block; - width: 70px; - float: left; - } - #addManually.addWindow .body p, - #addReq.addWindow .body p{ - line-height: 18px; - } - #addManually.addWindow .body p.higher, - #addReq.addWindow .body p.higher{ - line-height: 25px; - } - #addReq.addWindow .body p.note{ - color: #666; - } - #addScorecard2.addWindow .body select, - #addManually.addWindow .body select, - #addReq.addWindow .body select{ - height: 20px; - font-size: 11px; - color: #333; - } - #addManually.addWindow .body select.medium, - #addReq.addWindow .body select.medium{width:130px;} - #addManually.addWindow .body select.long, - #addReq.addWindow .body select.long{width:338px;} - - .addWindow.ui-dialog-content.ui-widget-content .foot{ - height: 54px; - width: 100%; - background-color: #f0f0f0; - border-top: #bdbdbd 1px solid; - } - #addScorecard2.addWindow a.clearBtn, - #addManually.addWindow a.moreQuestions, - #addReq.addWindow a.moreQuestions{ - padding: 15px 10px; - color: #ec1c23; - font-size: 11px; - font-weight: bold; - text-decoration: none; - } - #addReq.addWindow a.moreQuestions{ - padding: 0px; - line-height: 30px; - } - #addScorecard2.addWindow a.clearBtn:hover, - #addManually.addWindow a.moreQuestions:hover, - #addReq.addWindow a.moreQuestions:hover{ - text-decoration: underline; - } - .addWindow.ui-dialog-content.ui-widget-content .foot .buttons{ - margin: 15px 15px 0 0; - padding:0; - float: right; - } -#addScorecard .tabHead a.button6 span.right{ - padding: 4px 27px 0 27px; - margin: 0; - width: 41px; - height: 20px; - border: none; -} -#addScorecard .tabHead a.button6 span.left{ - padding: 0; - margin: 0; - border: none; - height: 24px; - width: 94px; - color: #fff; - background-color: inherit; -} diff --git a/scorecard_tool/web-app/css/scorecard/permissions.css b/scorecard_tool/web-app/css/scorecard/permissions.css deleted file mode 100644 index e1057980c..000000000 --- a/scorecard_tool/web-app/css/scorecard/permissions.css +++ /dev/null @@ -1,299 +0,0 @@ -/* css for permissions.html */ - -.b{ - font-weight: bold; -} -.permissions{ - border-bottom: 1px solid #A8ABAD; -} -#users{ - display: none; -} -.permissions #tabs3 ul li{ - width:50%; -} -.permissions .container2Content{ - padding:20px 0px 40px 1px; -} - -.permissions table.notifications{ - border-left:0px solid #FFFFFF; -} - -.permissions table tr.subTr td{ - border:0px solid #FFFFFF; - padding:3px 0px 3px 10px; - font-size: 10px; - background: transparent url(../../images/dot.png) repeat-x scroll bottom center; -} -.permissions table th.permCol{ - width:30%; -} -.permissions table th.permCol2{ - width:8%; -} -.permissions table td.permCol input{ - float:left; - margin-top:2px; - margin-right:5px; -} -.permissions table td.permCol .group{ - float:left; -} -.permissions table td.permCol{ - border-left: 0px solid #FFFFFF; -} - -.permissions table tr.applyForAll a.button1{ - margin-right:10px; -} -.permissions table td a.addUser{ - background: transparent url(../../images/user.png) no-repeat; - display: block; - height:23px; - width:23px; - margin-left:40%; -} -.permissions table td a.addUser:hover{ - background: transparent url(../../images/user_active.png) no-repeat; -} - -.permissions table td a.addProject{ - background: transparent url(../../images/folder.png) no-repeat; - display: block; - height:23px; - width:23px; - margin-left:30%; - float:left; - margin-right:10px; -} -.permissions table td a.addProject:hover{ - background: transparent url(../../images/folder_active.png) no-repeat; -} -.permissions table td a.removeProject{ - background: transparent url(../../images/delete1.png) no-repeat; - display: block; - height:23px; - width:23px; - float:left; -} - -.permissions table td a.subgroup{ - text-decoration: none; -} -.permissionsButtons{ - overflow: hidden; - margin-top:20px; -} - -.permissions table.notifications .collapse{ - background: transparent url(../../images/minimize.png) no-repeat; -} - -/* customized dialog css */ -.ui-dialog { - padding:0px; -} -.ui-widget-overlay{ - background: #000000 none repeat scroll 0 0; - opacity:0.6; - filter:alpha(opacity=60); -} -.ui-dialog .ui-dialog-titlebar{ - display: none; -} -.ui-dialog .header{ - height:27px; - background-color:#E8E8E8; - overflow: hidden; -} -.ui-dialog .header .title{ - float:left; - font-size: 12px; - font-weight: bold; - margin-top:5px; - margin-left:20px; -} -.ui-dialog .content{ - margin: 0 20px 0 20px; -} -.ui-dialog .areaHeader.topSpace{ - margin-top: 20px; - margin-bottom: 10px; - margin-left: 20px; -} -.ui-dialog .areaHeader.bottomSpace{ - margin-top: 10px; - margin-bottom: 20px; - margin-left: 20px; -} -.ui-dialog .areaHeader .leftAlign{ - float:left; -} -.ui-dialog .areaHeader .expandCollapse a.button6{ - font-weight: bold; - color: #fff; - background-color: inherit; -} -.ui-dialog .areaHeader .expandCollapse span.borderPipe{ - color: #333; - font-size: 11px; - font-weight: normal; -} - .ui-dialog .project.scorecard.view{ - margin-bottom: 10px; - } -.ui-dialog .body{ - overflow: hidden; -} -.ui-dialog .body .left,.ui-dialog .body .middle,.ui-dialog .body .right{ - float:left; - margin-left:20px; - margin-top:20px; -} -.ui-dialog .body .left,.ui-dialog .body .right{ - border:1px solid #CCCCCC; - width:220px; - height:300px; -} -.ui-dialog .body .middle{ - margin-top:150px; -} -.ui-dialog .body .middle a{ - display: block; - *margin-bottom: 10px; -} - - -.ui-dialog .body .list{ - overflow: auto; - height:220px; - border-top:1px solid #CCCCCC; -} - -.ui-dialog .body .list .listItem{ - padding: 3px 0px 3px 10px; - margin:1px 0px ; - font-size: 11px; - background: transparent url(../../images/dot.png) repeat-x scroll bottom center; - cursor: pointer; -} - -.ui-dialog .body .list .listItem.active{ - background-color: #CCCCCC; -} - -.ui-dialog .body .subtitle{ - background: transparent url(../../images/calendar_header.png) repeat-x scroll 0 0; - height:33px; - font-size: 11px; -} -.ui-dialog .body .subtitle a.leftTxt{ - display:block; - font-weight: bold; - color:#FFFFFF; - text-decoration: none; - float:left; - margin-top:10px; - margin-left:10px; - background-color: inherit; -} -.ui-dialog .body .subtitle a.rightTxt{ - display:block; - color:#CCCCCC; - text-decoration: none; - float:right; - margin-top:10px; - margin-right:5px; - background-color: inherit; -} -.ui-dialog .body .searchBox { - padding:10px 0px 10px 10px; - overflow: hidden; -} -.ui-dialog .body .searchBox a.button1{ - display: block; -} -.ui-dialog .body .searchBox .searchTxt{ - float:left; - margin-right:10px; -} -.ui-dialog .body .searchBox .searchTxt input{ - width: 110px; - height:20px; - font-size: 11px; -} -.ui-dialog .foot .buttons{ - padding-left:150px; -} -.ui-dialog .foot .buttons a.button6{ - color:#FFFFFF; - text-align: center; - background-color: inherit; -} - -.ui-dialog a.dialogClose{ - background: transparent url(../../images/close_ico.png) no-repeat scroll 0 0; - height:15px; - width:15px; - display: block; - margin-top:5px; - margin-right:10px; - float:right; -} -#addUserDialog,#manageUserDialog,#addProjectDialog{ - padding:0px; -} - - -.pagination-info{ - margin:0px 20px; -} - -.display-perpage .selectedTxt{ - width:32px; - padding-left:5px; -} -.display-perpage .newList{ - width:40px !important; - border:#ccc solid 1px; - background:#fff; - position:absolute !important; - z-index: 999 !important; - text-align: center; -} - -.display-perpage .newList a{ - text-decoration: none; -} -.display-perpage .newList{ - overflow: hidden scroll!important; - overflow-y: scroll !important; -} -.display-perpage .newListSelected { - background:transparent url(../../images/pagination-select.png) no-repeat scroll 0 0; - border:0 none; - color:#333333; - cursor:pointer; - font-family:Arial,Helvetica,sans-serif; - font-size:11px; - height:17px; - line-height:15px; - padding:0 5px; - float:left; -} -.display-perpage .label{ - padding-top:2px; -} - -.separator{ - border-bottom:1px solid #CCCCCC; - height:10px; - margin-bottom:20px; - margin-top:10px; - width:100%; -} -#notificationSetting .pagination{ - width:250px; -} - diff --git a/scorecard_tool/web-app/css/scorecard/screen.css b/scorecard_tool/web-app/css/scorecard/screen.css deleted file mode 100644 index f4f4a19e1..000000000 --- a/scorecard_tool/web-app/css/scorecard/screen.css +++ /dev/null @@ -1,1395 +0,0 @@ -/* This file will contain css used in both the index and the other pages */ - -/* Remove Firefox button outline */ -a:hover, a:active, a:focus, a:active{ - outline: none; - /*-moz-outline-style: none; */ -} -:focus {outline: none;} -.clear{ - clear:both; - } -/**/ - -/***new_updates**/ -.status{ - font-family:Arial, Helvetica, sans-serif; - font-weight:bold; - font-size:16px; - color:#F00; - padding-left:10px; -} -.reviewer_text{ - font-family:Arial, Helvetica, sans-serif; - font-weight:bold; - font-size:0.9em; - color: #000; - float: right; - padding-right:10px; -} -.reviewer_handle_text{ - font-family:Arial, Helvetica, sans-serif; - font-weight:bold; - font-size:0.9em; - color:#666; - float: right; - padding-right:10px; -} - -.edit_type{ - float:right; - padding-right:5px; -} - -.edit_prize{ - - float:right; - padding-right:5px; -} - -.edit_round{ - - float:right; - padding-right:5px; -} - -.edit_spec{ - - float:right; - padding-right:5px; -} - -.edit_files{ - - float:right; - padding-right:5px; -} - -.sr_question_showdetail { - float:right; - margin-top: 6px; - padding-right:10px; -} - -.sr_addcomment { - float:right; - padding: 5px; - padding-right: 10px; -} - -.sr_editcomment { - float:right; - margin-top: 5px; - margin-right: -5px; -} - -.det_font{ - font-size:14px; - font-family:Arial, Helvetica, sans-serif; - color:#3B3B3B; -} - -.det_font_tab{ - font-size:12px; - font-family:Arial, Helvetica, sans-serif; - color:#3B3B3B; -} - -.srquestion_detail_font{ - font-size:0.8em; - font-family:Arial, Helvetica, sans-serif; - color:#3B3B3B; - margin-bottom: 8px; -} - .srquestion_detail_font .index{ - padding-left: 40px; - padding-right: 30px; - float:left; - font-weight: bold; - } - .srquestion_detail_font .option{ - } - - -.small_info{ - padding-left:125px; - font-size:12px; - font-weight:bold; -} - -.small_info_spec{ - - font-size:12px; - -} -.small_info_spec_last{ - - font-size:12px; - - -} - -.bottom_spec{ - height:20px; - margin-bottom:10px; - border-bottom:#999 solid 1px; - width:100%; -} -.mylist{ - font-size:12px; - margin-top:10px; - margin-bottom:10px; - margin-left:15px; -} -.name{ - - padding-right:20px; - float:left; - -} -.gray_name{ - - padding-right:20px; - float:left; - color:#666; - font-size:12px; - -} -.name2{ - - padding-right:15px; - -} -.bigin{ - width:370px; - height:25px; -} -.contest_type{ - margin-top:10px; -} - -.left_align{ - float:left; - color:#000; - font-size:12px; -} - -.contest_type_edit{ - border:#F00 solid 1px; - /*margin-top:10px;*/ -} - -.contest_files{ - /*margin-top:10px;*/ -} - - -.contest_files_edit{ - border:#F00 solid 1px; - /*margin-top:10px;*/ -} - -.contest_prize{ - /*margin-top:10px;*/ -} - - -.contest_prize_edit{ - border:#F00 solid 1px; - /*margin-top:10px;*/ -} - -.contest_round{ - /*margin-top:10px;*/ -} - -.contest_spec{ - /*margin-top:10px;*/ -} - -.contest_round_edit{ - border:#F00 solid 1px; - /*margin-top:10px;*/ -} - -.contest_spec_edit{ - border:#F00 solid 1px; - /*margin-top:10px;*/ -} - -.spec_review_question{ - margin-top:10px; -} - -.spec_review_odd_question{ - margin-top:10px; - padding-bottom: 10px; - background-color:#F5F5F5; -} - -.add_comment{ - height:10px; - padding-top:10px; -} -.add_comment a img{ - border:none; - float:right; -} -.add_comment a{ - font-size:12px; - font-weight:bold; - font-family:Verdana, Geneva, sans-serif; -} -.add_comment_cancel_text{ - color:#616161; - text-decoration:underline; - padding-left:10px; - margin-right: 12px; - float:right; -} - -.save{ - height:10px; - padding-top:10px; -} -.save a img{ - border:none; - float:right; -} - -.save a{ - font-size:12px; - font-weight:bold; - font-family:Verdana, Geneva, sans-serif; -} -.cancel_text{ - color:#616161; - text-decoration:underline; - padding-left:10px; - float:right; - -} - -.cancel_text_prize{ - color:#616161; - text-decoration:underline; - padding-left:10px; - float:right; - -} -.cancel_text_round{ - color:#616161; - text-decoration:underline; - padding-left:10px; - float:right; - -} - -.cancel_text_spec{ - color:#616161; - text-decoration:underline; - padding-left:10px; - float:right; - -} - -.cancel_text_files{ - color:#616161; - text-decoration:underline; - padding-left:10px; - float:right; - -} - - -#resubmit{ - text-align:center; - margin-top:20px; -} - -.deleteImg{ - margin-left:10px; - padding-top:5px; -} - -A.delete{ - color:#F00; - margin-left:5px; - font-size:13px; -} - -#resubmit .bottom_text{ - font-family:Verdana, Geneva, sans-serif; - font-size:12px; - color:#999; - background-color: inherit; -} - -.ip{ - float:left; - background-color:#009; - width:100px; - height:50px; -} - -.op{ - float:left; - background-color:#999; - width:100px; - height:50px; -} - -.first_tab{ - width:250px; -} -.first_tab_prize{ - width:350px; -} - -.sec_tab{ - width:70px; -} - -.sec_tab_prize{ - width:180px; -} -.sec_tab_files{ - width:480px; -} - -/*new updates end*/ -.details .caption{ /* help popup titles */ - background: url(../../images/title_bg.png) repeat-x; -} - - -.no_details .caption_det_type{ /* help popup titles */ - /*background: url(../../images/title_bg.png) repeat-x;*/ - - background-color:#F5F5F5; - - } - - .no_details .caption_det_prize{ /* help popup titles */ - /*background: url(../../images/title_bg.png) repeat-x;*/ - - background-color:#F5F5F5; - - } - .no_details .caption_det_files{ /* help popup titles */ - /*background: url(../../images/title_bg.png) repeat-x;*/ - - background-color:#F5F5F5; - - } - - .no_details .caption_det_round{ /* help popup titles */ - /*background: url(../../images/title_bg.png) repeat-x;*/ - - - - } - .no_details .caption_det_spec{ /* help popup titles */ - /*background: url(../../images/title_bg.png) repeat-x;*/ - - } - - .details .caption .captionLeft{ - background: url(../../images/title_left.png) no-repeat left; - } - - .details .caption .captionRight{ - background: url(../../images/title_right.png) no-repeat right; - } - .details .caption .captionInner{ - height: 35px; - } - .no_details .caption .captionInner{ - height: 35px; - } - - .no_details .caption_det_type .captionInner{ - height: 35px; - } - .no_details .caption_det_prize .captionInner{ - height: 35px; - } - .no_details .caption_det_type_edit .captionInner{ - height: 35px; - } - .no_details .caption_det_prize_edit .captionInner{ - height: 35px; - } - .no_details .caption_det_round .captionInner{ - height: 35px; - } - .no_details .caption_det_round_edit .captionInner{ - height: 35px; - } - - .no_details .caption_det_spec .captionInner{ - height: 35px; - } - .no_details .caption_det_spec_edit .captionInner{ - height: 35px; - } - - .no_details .caption_det_files .captionInner{ - height: 35px; - } - .no_details .caption_det_files_edit .captionInner{ - height: 35px; - } - - .details .caption .captionInner H2{ - margin: 0; - padding: 0; - font-family: Verdana, Geneva, sans-serif; - font-size: 14px; - padding-top: 8px; - padding-left:10px; - - } - - .no_details .caption_det_type .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - } - - .no_details .caption_det_prize .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - - } - .no_details .caption_det_round .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - - } - .no_details .caption_det_spec .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - - } - .no_details .caption_det_files .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - - } - .no_details .caption_det_type_edit .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - - } - .no_details .caption_det_prize_edit .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - - } - - .no_details .caption_det_round_edit .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - - } - .no_details .caption_det_spec_edit .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - - } - .no_details .caption_det_files_edit .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - - } - - .no_details .caption_specreview { - padding:10px; - } - .no_details .det_specreview { - padding:10px; - } - .no_details .comment_specreview { - padding:0px 10px 1px 10px; - } - .no_details .comment_specreview .old_comment{ - margin-left: 40px; - margin-right: 12px; - /*height:70px;*/ - padding: 10px 20px 10px 20px; - font-size:0.75em; - background: #ffc; - color: #777; - border:#fc0 solid 1px; - } - .no_details .comment_specreview .old_comment p{ - margin-bottom: 7px; - } - .no_details .comment_specreview .old_comment .text_comment{ - font-size:1em; - font-weight: bold; - color: #444; - margin-bottom: 10px; - } - .no_details .comment_specreview .old_comment span.text_reviewer_handle{ - font-size:1em; - font-weight: bold; - color: #ca0; - } - .no_details .to_add_your_comment { - padding:10px; - padding-bottom:0px; - } - .no_details .add_your_comment { - padding:10px; - padding-bottom: 25px; - } - .no_details .add_your_comment .textarea1{ - height:90px; - margin-left: 40px; - margin-right: 35px; - } - .no_details .add_your_comment .textarea1 textarea{ - width:100%; - height:70px; - padding: 10px; - font-size: 12px; - background: #fff; - color:#999; - border:#c4c4c4 solid 1px; - overflow: hidden; - - } - - .no_details .captionInner{ - padding: 5px 0px 10px 0px; - } - .no_details .captionInner H2 { - margin: 0px; - padding: 0px; - font-family: Arial, Helvetica, sans-serif; - font-size: 0.9em; - font-weight: bold; - } - .no_details .captionInner H2 span { - margin-top: -19px; - margin-left: 35px; - margin-right: 80px; - line-height: 1.3em; - } - .no_details .captionInner H2 span span.normal_text{ - font-weight: normal; - } - .no_details .captionInner H2.red { - color: red; - } - .no_details .captionInner H2 img.icon_status{ - top: 5px; - position: relative; - margin-right: 10px; - } - -/* popups */ - -.deleteUserInner P{ - text-align: center; - padding-bottom: 5px; -} - -.deleteUserInner .button1{ - float: right; - margin: 4px 4px 0 4px; -} - -.popupButtons{ - height: 100%; - overflow: hidden; - padding: 5px 0; -} - -#TB_closeWindowButton{ - width: 15px; - height: 15px; - background: url(../../images/close_ico.png) no-repeat; - display: block; -} - -/* Help modal window */ - - -.helpPopupInner .caption .captionInner H2{ /* title */ - color: #333; -} - -.helpPopupInner .helpArea{ - padding-bottom: 20px; -} - -.helpPopupInner .logoArea{ - padding: 20px 0; -} - -.popupFooter{ - padding: 20px 0 0 0; - margin: 0 auto; - font-size: 11px; - color: #333; - border-top: 1px solid #bdbdbd; - background-color: #f6f6f6; - text-align: center; -} - -.popupFooter A{ - text-decoration: none; - color: #333 !important; -} - -.popupFooter H2{ - font-family: Verdana, Helvetica, sans-serif; - margin: 0 0 5px 0; - font-size: 12px; - font-weight: normal; -} - -.popupFooter P{ - margin: 0; - font-size: 11px; -} - -/*----------- - BUTTONS --------------*/ - - - -A.button1{ - float: left; - background: transparent url(../../images/button_left.png) no-repeat left; - font-size: 12px; - font-weight: bold; - color: #362f2d; - text-decoration: none; -} - - A.button1 SPAN{ - float: left; - background: transparent url(../../images/button_right.png) no-repeat right; - padding: 5px 10px 2px 10px; - cursor: pointer; - height: 20px; - overflow: hidden; - } - - A.button1:hover{ - color: #000; - } - -A.button2{ - display: block; - background: transparent url(../../images/button.png) no-repeat top; - width: 253px; - height: 24px; - font-family: Arial, Helvetica, sans-serif; - font-size: 14px; - color: #FFF; - text-decoration: none; - font-weight: bold; - text-align: center; - padding-top: 6px; -} - - A.button2:hover{ - background: transparent url(../../images/button.png) no-repeat bottom; - } - -A.button3{ - display: block; - text-align: center; - margin: 0 auto; - text-decoration: none; - background: url(../../images/button2.png) no-repeat top; - width: 232px; - height: 23px; - color: #333333; - font-family: "Myriad pro", Arial, Helvetica, sans-serif; - font-size: 14px; - font-weight: bold; - padding-top: 7px; -} - -A.button3:hover{ - background-position: bottom; -} - -A.button4{ - display: block; - background: transparent url(../../images/button3.png) no-repeat top; - width: 144px; - height: 18px; - padding-top: 3px; - color: #FFF; - font-size: 11px; - font-weight: bold; - margin: 0 auto; - text-decoration: none; - margin-bottom: 5px; -} - -A.button4:hover{ - background-position: bottom; -} - -A.button5{ - display: block; - background: transparent url(../../images/button4.png) no-repeat top; - width: 144px; - height: 18px; - padding-top: 3px; - color: #000; - font-size: 11px; - font-weight: bold; - margin: 0 auto; - text-decoration: none; -} - - A.button5.back{ - display: block; - background: transparent url(../../images/button4b.png) no-repeat top; - width: 151px; - height: 19px; - padding-top: 5px; - padding-left: 27px; - color: #666; - font-size: 11px; - font-weight: bold; - margin: 0 auto; - text-decoration: none; - font-family: Arial; - } - -A.button5:hover, -A.button5.back:hover{ - background-position: bottom; -} - -A.button6, -A.button7, -A.button8, -A.button10{ - float: right; - background: transparent url(../../images/button5_left.png) no-repeat left top; - font-weight: bold; - font-size: 12px; - font-family: Arial, Helvetica, sans-serif; - color: #FFF; - text-decoration: none; - margin: 0 3px; -} - A.button6.green{ - background-image: url(../../images/button11_left.png); - } - - A.button6 SPAN, - A.button7 SPAN, - A.button8 SPAN, - A.button10 SPAN{ - display: block; - cursor: pointer; - } - - A.button7 SPAN.right{ - padding: 4px 27px 0 27px; - height: 20px; - } - -A.button7{ - background: url(../../images/button7_bg.png) repeat-x top; - color: #333; -} - - A.button7 SPAN.left{ - display: block; - background: url(../../images/button7_left.png) no-repeat left top; - padding: 0; - } - - A.button7 SPAN.right{ - display: block; - background: url(../../images/button7_right.png) no-repeat right top; - } - -A.button8{ - background: transparent url(../../images/button8_bg.png) repeat-x top; - color: #FFF !important; -} - - A.button8 SPAN.left{ - background: url(../../images/button8_left.png) no-repeat left top; - padding: 0; - } - - A.button8 SPAN.right{ - background: url(../../images/button8_right.png) no-repeat right top; - padding: 5px 27px 0 27px; - height: 21px; - } -A.button10{ - background: transparent url(../../images/button10_bg.png) repeat-x top; - color: #FFF !important; -} - - A.button10 SPAN.left{ - background: url(../../images/button10_left.png) no-repeat left top; - padding: 0; - } - - A.button10 SPAN.right{ - background: url(../../images/button10_right.png) no-repeat right top; - padding: 5px 27px 0 27px; - height: 21px; - } - -A.button6{ - background: url(../../images/button5_bg.png) repeat-x top; -} - A.button6.green{ - background-image: url(../../images/button11_bg.png); - } - - A.button6 SPAN.left{ - background: url(../../images/button5_left.png) no-repeat left top; - padding: 0; - } - A.button6.green SPAN.left{ - background-image: url(../../images/button11_left.png); - } - - A.button6 SPAN.right{ - background: url(../../images/button5_right.png) no-repeat right top; - padding: 4px 27px 0 27px; - height: 20px; - } - A.button6.green SPAN.right{ - background-image: url(../../images/button11_right.png); - } - -A.button6:hover, -A.button7:hover, -A.button8:hover, -A.button10:hover{ - background-position: left bottom; - text-decoration: none !important; -} - - A.button6:hover SPAN, - A.button7:hover SPAN, - A.button8:hover SPAN, - A.button10:hover SPAN{ - background-position: right bottom; - } - - A.button7:hover SPAN.left{ - background-position: left bottom; - } - - A.button7:hover SPAN.right{ - background-position: right bottom; - } - - A.button8:hover SPAN.left, - A.button10:hover SPAN.left{ - background-position: left bottom; - } - - A.button8:hover SPAN.right, - A.button10:hover SPAN.right{ - background-position: right bottom; - } - - A.button6:hover SPAN.left{ - background-position: left bottom; - } - - A.button6:hover SPAN.right{ - background-position: right bottom; - } - -A.button9{ - display: block; - background: transparent url(../../images/button9.png) no-repeat top; - width: 126px; - height: 15px; - font-family: Arial, Helvetica, sans-serif; - font-size: 12px; - color: #FFF; - text-decoration: none; - font-weight: bold; - text-align: center; - } - - A.button9:hover{ - background: transparent url(../../images/button9.png) no-repeat bottom; - } - -/*---------------- - MISC -----------------*/ - -IMG{ - border: none; -} - -.hide{ - display: none; -} - -.fLeft{ - float: left !important; -} - -.fRight{ - float: right !important; -} - -.lastColumn{ - text-align: left !important; - padding-left: 10px !important; -} -#loading { - background: url("../../images/loading.gif") no-repeat scroll center center transparent; - border: 0 solid #666666; - font: 15px Tahoma,Geneva,sans-serif; - height: 100px; - left: 50%; - margin-left: -50px; - margin-top: -50px; - overflow: auto; - padding: 10px; - position: fixed; - text-align: center; - top: 50%; - width: 100px; - z-index: 100; -} -.searchRowBox { - float:left; - width:420px; -} - - -.contestsContainer { - position: relative; -} - - -/*help center widget*/ -#helpCenterWidget{ - padding:0 15px; - } - #helpCenterWidget h6{ - background:url(../../images/questionIcon.png) no-repeat 0 center; - padding-left:32px; - line-height:22px; - font-size:17px; - color:#fffffd; - margin-top:3px; - margin-bottom:13px; - margin-left:7px; - } - .homePage #helpCenterWidget h6{ - margin-left:0px; - - } - #helpCenterWidget ul.tabList{ - float:left; - display:inline; - } - #helpCenterWidget ul.tabList li{ - float:left; - display:inline; - margin-right:3px; - } - #helpCenterWidget ul.tabList li.last{ - margin-right:0; - } - #helpCenterWidget ul.tabList a, - #helpCenterWidget ul.tabList a:visited{ - background:url(../../images/tabListBG.png) repeat-x 100% -22px; - width:auto; - display:inline-block; - - height:22px; - line-height:22px; - overflow:hidden; - - padding:0 8px; - - text-decoration:none; - font-size:11px; - font-weight:bold; - text-decoration:none; - color:#fffffe; - } - - #helpCenterWidget ul.tabList a:hover{ - background:url(../../images/tabListBG.png) repeat-x 0 -88px; - } - - #helpCenterWidget ul.tabList a.actived, - #helpCenterWidget ul.tabList a.actived:visited, - #helpCenterWidget ul.tabList a.actived:hover{ - background:url(../../images/tabListBGActived.png) repeat-x 0 -23px; - position:relative; - top:1px; - height:23px; - overflow:hidden; - border-left:1px solid #5e5651; - border-right:1px solid #5e5651; - z-index:2; - } - .dashboardPage #helpCenterWidget ul.tabList a{ - padding:0 14px; - } - #helpCenterWidget ul.tabList a.tabMore, - #helpCenterWidget ul.tabList a.tabMore:visited{ - display:none; - } - #helpCenterWidget ul.tabList a#moreTab, - #helpCenterWidget ul.tabList a#lessTab{ - padding:0 14px; - } - .dashboardPage #helpCenterWidget ul.tabList a#moreTab, - .dashboardPage #helpCenterWidget ul.tabList a#lessTab{ - padding:0 12px; - } - - .tabContent{ - width:100%; - background:#4c413c; - border:1px solid #5e5651; - padding-bottom:10px; - position:relative; - } - .dashboardPage .tabContent{ - top:-1px; - } - .viewAllLink, - .viewAllLink:visited{ - position:absolute; - bottom:15px; - right:15px; - text-decoration:underline; - font-size:11px; - font-weight:bold; - color:#efefef; - } - .viewAllLink:hover{ - text-decoration:none; - } - - .tabContent ul{ - padding:15px; - list-style:none; - } - .tabContent ul li{ - padding-bottom:10px; - background:url(../../images/grayArrow.gif) no-repeat 0 3px; - } - .tabContent ul a, - .tabContent ul a:visited{ - font-size:11.05px; - text-decoration:none; - color:#fffffd; - margin-left:13px; - display:block; - } - .tabContent ul a:hover{ - text-decoration:underline; - } - #helpCenterWidget .contactUs{ - margin:13px -15px 0; - text-align:center; - background:url(../../images/shadow.png) repeat-x 0 0; - padding-top:22px; - padding-bottom:26px; - } - -.darkenBtn, -.darkenBtn:visited { - color: #fffffd; - background: url(../../images/darkenBtn.png) no-repeat 0 0; - width: auto; - display: inline-block; - padding-left: 12px; - text-decoration: none; - font-size: 14px; - font-weight: bold; - height: 33px; - line-height: 33px; - overflow: hidden; -} - -.darkenBtn .right { - background: url(../../images/darkenBtn.png) no-repeat 100% -66px; - width: auto; - display: inline-block; - padding-right: 12px; - height: 33px; - line-height: 33px; - overflow: hidden; - cursor: pointer; -} - -.darkenBtn .middle { - background: url(../../images/darkenBtn.png) repeat-x 0 -33px; - width: auto; - display: inline-block; - padding: 0 10px; - height: 33px; - line-height: 33px; - overflow: hidden; - cursor: pointer; -} - -.darkenBtn:hover { - background: url(../../images/darkenBtn.png) no-repeat 0 -99px; -} - -.darkenBtn:hover .right { - background: url(../../images/darkenBtn.png) no-repeat 100% -165px; -} - -.darkenBtn:hover .middle { - background: url(../../images/darkenBtn.png) repeat-x 0 -132px; -} - - -#modalBackground { - width: 100%; - height: 100%; - position: absolute; - left: 0; - top: 0; - z-index: 10000; - display: none; - background: #000002; -} - -#new-modal { - top: 0; - left: 0; - position: fixed; - z-index: 10001; -} - -#new-modal .outLay { - position: relative; - display: none; -} - -.outLay { - width: 360px; -} - -#new-modal .outLay .modalHeader .closeModal, -#new-modal .outLay .modalHeader .closeOtherModal { - position: absolute; - right: 0; - top: 0; - display: block; - width: 30px; - height: 30px; - text-indent: -9999px; - background: url(../../images/modal-close.png) left top no-repeat; - z-index: 2; -} - -#new-modal .outLay .modalHeader .closeModal:hover { - background-position: left -30px; -} - -#new-modal .outLay .modalHeader { - height: 40px; - background: url(../../images/modal-header.png) left top no-repeat; - padding-left: 8px; - overflow: hidden; -} - -#new-modal .outLay .modalHeader .modalHeaderRight { - height: 40px; - background: url(../../images/modal-header.png) right -80px no-repeat; - padding-right: 8px; -} - -#new-modal .outLay .modalHeader .modalHeaderCenter { - height: 40px; - font-size: 14px; - line-height: 40px; - font-family: Arial, Helvetica, sans-serif; - font-weight: bold; - color: #000000; - padding-left: 22px; - background: url(../../images/modal-header.png) left -40px repeat-x; -} - -#new-modal .outLay .modalHeaderSmall { - height: 8px; - background: url(../../images/preloader-corner.png) left top no-repeat; - padding-left: 8px; - overflow: hidden; -} - -#new-modal .outLay .modalHeaderSmall .modalHeaderSmallRight { - height: 8px; - background: url(../../images/preloader-corner.png) right -16px no-repeat; - padding-right: 8px; -} - -#new-modal .outLay .modalHeaderSmall .modalHeaderSmallCenter { - height: 8px; - background: url(../../images/preloader-corner.png) left -8px repeat-x; -} - -#new-modal .outLay .modalFooter { - height: 8px; - background: url(../../images/preloader-corner.png) left -24px no-repeat; - padding-left: 8px; - overflow: hidden; -} - -#new-modal .outLay .modalFooter .modalFooterRight { - height: 8px; - background: url(../../images/preloader-corner.png) right -40px no-repeat; - padding-right: 8px; -} - -#new-modal .outLay .modalFooter .modalFooterCenter { - height: 8px; - background: url(../../images/preloader-corner.png) left -32px repeat-x; -} - - -.outLay .modalBody { - border: 4px solid #000000; - border-top-width: 0; - border-bottom-width: 0; - background: #e6e6e6 url(../../images/modal-body-normal.png) left top repeat-x; - font-size: 12px; - color: #333333; - line-height: 18px; - min-height: 10px; -} - -.outLay .iconNotice { - position: absolute; - left: 22px; - top: 73px; -} - -.outLay .modalBody .noticeContent { - padding-left: 96px; - height: 109px; - width: 240px; -} - -.outLay .modalBody .modalCommandBox { - border-top: 1px solid #ccc; - padding-top: 16px; - height: 36px; - text-align: center; -} - -.outLay input.text { - height: 19px; - padding-left: 6px; - padding-right: 6px; - border-top: 1px solid #717171; - border-left: 1px solid #b4b4b4; - border-right: 1px solid #b4b4b4; - border-bottom: 1px solid #dadada; - font-family: Arial, Helvetica, sans-serif; - color: #333333; - line-height: 18px; - font-size: 12px; - background: #ffffff url(../../images/modal-text-shadow.png) left top repeat-x; -} - -.outLay .textField { - border: 1px solid #999999; - border-top-color: #737373; - padding-left: 6px; - padding-right: 6px; - padding-top: 4px; - padding-bottom: 4px; - font-family: Arial, Helvetica, sans-serif; - color: #333333; - line-height: 18px; - font-size: 12px; - overflow: auto; -} - -/* #preloaderModal */ -#preloaderModal { - width: 100px; - height: 80px; -} - -#preloaderModal .modalBody { - height: auto; - min-height: 10px; - padding-top: 4px; - text-align: center; - background: url(../../images/preloader-body.png) left -2px repeat-x; -} - -#preloaderModal .modalBody .preloaderTips { - padding-top: 5px; - font-size: 12px; - color: #333333; -} - -/* end #preloaderModal */ - -#errorDialog li { - list-style-type: disc; -} diff --git a/scorecard_tool/web-app/css/scorecard/ui.core.css b/scorecard_tool/web-app/css/scorecard/ui.core.css deleted file mode 100644 index c2f18f2c0..000000000 --- a/scorecard_tool/web-app/css/scorecard/ui.core.css +++ /dev/null @@ -1,37 +0,0 @@ -/* -* jQuery UI CSS Framework -* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) -* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. -*/ - -/* Layout helpers -----------------------------------*/ -.ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } -.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%; } \ No newline at end of file diff --git a/scorecard_tool/web-app/css/scorecard/ui.dialog.css b/scorecard_tool/web-app/css/scorecard/ui.dialog.css deleted file mode 100644 index 2997595b7..000000000 --- a/scorecard_tool/web-app/css/scorecard/ui.dialog.css +++ /dev/null @@ -1,13 +0,0 @@ -/* Dialog -----------------------------------*/ -.ui-dialog { position: relative; padding: .2em; width: 300px; } -.ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; } -.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } -.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 { 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 button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; } -.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } -.ui-draggable .ui-dialog-titlebar { cursor: move; } diff --git a/scorecard_tool/web-app/css/scorecard/ui.theme.css b/scorecard_tool/web-app/css/scorecard/ui.theme.css deleted file mode 100644 index fbf02e4be..000000000 --- a/scorecard_tool/web-app/css/scorecard/ui.theme.css +++ /dev/null @@ -1,243 +0,0 @@ -/* -* jQuery UI CSS Framework -* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) -* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. -* To view and modify this theme, visit http://jqueryui.com/themeroller/ -*/ - - -/* Component containers -----------------------------------*/ -.ui-widget { /*font-family: Verdana,Arial,sans-serif*//*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; } -.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; } -.ui-widget-content a { color: #222222/*{fcContent}*/; } -.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; } -.ui-widget-header a { color: #222222/*{fcHeader}*/; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; outline: none; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; outline: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; outline: none; } -.ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; outline: none; } -.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; outline: none; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; outline: none; text-decoration: none; } - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636/*{fcHighlight}*/; } -.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; } -.ui-state-error a, .ui-widget-content .ui-state-error a { color: #cd0a0a/*{fcError}*/; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #cd0a0a/*{fcError}*/; } -.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } -.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; } -.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; } -.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; } -.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; } -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; } - -/* 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-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-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; } -.ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; } -.ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; } -.ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; } -.ui-corner-top { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; } -.ui-corner-bottom { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; } -.ui-corner-right { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; } -.ui-corner-left { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; } -.ui-corner-all { -moz-border-radius: 4px/*{cornerRadius}*/; -webkit-border-radius: 4px/*{cornerRadius}*/; } - -/* Overlays */ -.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; } -.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; } \ No newline at end of file diff --git a/scorecard_tool/web-app/images/TopCoder_logo.png b/scorecard_tool/web-app/images/TopCoder_logo.png deleted file mode 100644 index f355a0d72..000000000 Binary files a/scorecard_tool/web-app/images/TopCoder_logo.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/TopCoder_logo2.png b/scorecard_tool/web-app/images/TopCoder_logo2.png deleted file mode 100644 index 0048be0d5..000000000 Binary files a/scorecard_tool/web-app/images/TopCoder_logo2.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/TopCoder_logo3.png b/scorecard_tool/web-app/images/TopCoder_logo3.png deleted file mode 100644 index 3bae0b6a7..000000000 Binary files a/scorecard_tool/web-app/images/TopCoder_logo3.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/add-icon-hover.png b/scorecard_tool/web-app/images/add-icon-hover.png deleted file mode 100644 index 60ac4867f..000000000 Binary files a/scorecard_tool/web-app/images/add-icon-hover.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/add-icon.png b/scorecard_tool/web-app/images/add-icon.png deleted file mode 100644 index 12d8ae798..000000000 Binary files a/scorecard_tool/web-app/images/add-icon.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/addmenu.png b/scorecard_tool/web-app/images/addmenu.png deleted file mode 100644 index c28a0d281..000000000 Binary files a/scorecard_tool/web-app/images/addmenu.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/apple-touch-icon-retina.png b/scorecard_tool/web-app/images/apple-touch-icon-retina.png deleted file mode 100644 index 5cc83edbe..000000000 Binary files a/scorecard_tool/web-app/images/apple-touch-icon-retina.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/apple-touch-icon.png b/scorecard_tool/web-app/images/apple-touch-icon.png deleted file mode 100644 index aba337f61..000000000 Binary files a/scorecard_tool/web-app/images/apple-touch-icon.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/area2_bg2.png b/scorecard_tool/web-app/images/area2_bg2.png deleted file mode 100644 index 1046660a0..000000000 Binary files a/scorecard_tool/web-app/images/area2_bg2.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/area_title.png b/scorecard_tool/web-app/images/area_title.png deleted file mode 100644 index 0b7dfb7a5..000000000 Binary files a/scorecard_tool/web-app/images/area_title.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/area_title2.png b/scorecard_tool/web-app/images/area_title2.png deleted file mode 100644 index 8eb32468e..000000000 Binary files a/scorecard_tool/web-app/images/area_title2.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/area_title3.png b/scorecard_tool/web-app/images/area_title3.png deleted file mode 100644 index 74b066be8..000000000 Binary files a/scorecard_tool/web-app/images/area_title3.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/area_title4.png b/scorecard_tool/web-app/images/area_title4.png deleted file mode 100644 index c72fab266..000000000 Binary files a/scorecard_tool/web-app/images/area_title4.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/awarding_ico.png b/scorecard_tool/web-app/images/awarding_ico.png deleted file mode 100644 index c38342546..000000000 Binary files a/scorecard_tool/web-app/images/awarding_ico.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/border_bottom_left.png b/scorecard_tool/web-app/images/border_bottom_left.png deleted file mode 100644 index a8b71e023..000000000 Binary files a/scorecard_tool/web-app/images/border_bottom_left.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/border_bottom_right.png b/scorecard_tool/web-app/images/border_bottom_right.png deleted file mode 100644 index 08337b6fc..000000000 Binary files a/scorecard_tool/web-app/images/border_bottom_right.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/border_top_left.png b/scorecard_tool/web-app/images/border_top_left.png deleted file mode 100644 index 90653f870..000000000 Binary files a/scorecard_tool/web-app/images/border_top_left.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/border_top_right.png b/scorecard_tool/web-app/images/border_top_right.png deleted file mode 100644 index ac6bad31b..000000000 Binary files a/scorecard_tool/web-app/images/border_top_right.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/borders2.png b/scorecard_tool/web-app/images/borders2.png deleted file mode 100644 index 681042ff1..000000000 Binary files a/scorecard_tool/web-app/images/borders2.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/borders3.png b/scorecard_tool/web-app/images/borders3.png deleted file mode 100644 index b9a4592b1..000000000 Binary files a/scorecard_tool/web-app/images/borders3.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/box_top.png b/scorecard_tool/web-app/images/box_top.png deleted file mode 100644 index fecbc39fb..000000000 Binary files a/scorecard_tool/web-app/images/box_top.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/box_top2.png b/scorecard_tool/web-app/images/box_top2.png deleted file mode 100644 index 512d15a76..000000000 Binary files a/scorecard_tool/web-app/images/box_top2.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/button.png b/scorecard_tool/web-app/images/button.png deleted file mode 100644 index bea66c9da..000000000 Binary files a/scorecard_tool/web-app/images/button.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/button10_bg.png b/scorecard_tool/web-app/images/button10_bg.png deleted file mode 100644 index 54eb63cfe..000000000 Binary files a/scorecard_tool/web-app/images/button10_bg.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/button10_left.png b/scorecard_tool/web-app/images/button10_left.png deleted file mode 100644 index ad209f74b..000000000 Binary files a/scorecard_tool/web-app/images/button10_left.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/button10_right.png b/scorecard_tool/web-app/images/button10_right.png deleted file mode 100644 index c45e32c26..000000000 Binary files a/scorecard_tool/web-app/images/button10_right.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/button11_bg.png b/scorecard_tool/web-app/images/button11_bg.png deleted file mode 100644 index 6f7ed7bdf..000000000 Binary files a/scorecard_tool/web-app/images/button11_bg.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/button11_left.png b/scorecard_tool/web-app/images/button11_left.png deleted file mode 100644 index e3a384955..000000000 Binary files a/scorecard_tool/web-app/images/button11_left.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/button11_right.png b/scorecard_tool/web-app/images/button11_right.png deleted file mode 100644 index e48a5c774..000000000 Binary files a/scorecard_tool/web-app/images/button11_right.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/button2.png b/scorecard_tool/web-app/images/button2.png deleted file mode 100644 index 90b40f10b..000000000 Binary files a/scorecard_tool/web-app/images/button2.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/button4b.png b/scorecard_tool/web-app/images/button4b.png deleted file mode 100644 index de7860edb..000000000 Binary files a/scorecard_tool/web-app/images/button4b.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/button5_bg.png b/scorecard_tool/web-app/images/button5_bg.png deleted file mode 100644 index 62022d2d8..000000000 Binary files a/scorecard_tool/web-app/images/button5_bg.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/button5_left.png b/scorecard_tool/web-app/images/button5_left.png deleted file mode 100644 index 34cc5bc7a..000000000 Binary files a/scorecard_tool/web-app/images/button5_left.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/button5_right.png b/scorecard_tool/web-app/images/button5_right.png deleted file mode 100644 index 3cfcfd7d6..000000000 Binary files a/scorecard_tool/web-app/images/button5_right.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/button7_bg.png b/scorecard_tool/web-app/images/button7_bg.png deleted file mode 100644 index cf8b50bc7..000000000 Binary files a/scorecard_tool/web-app/images/button7_bg.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/button7_left.png b/scorecard_tool/web-app/images/button7_left.png deleted file mode 100644 index b54a74946..000000000 Binary files a/scorecard_tool/web-app/images/button7_left.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/button7_right.png b/scorecard_tool/web-app/images/button7_right.png deleted file mode 100644 index 69d9cf0cc..000000000 Binary files a/scorecard_tool/web-app/images/button7_right.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/calendar_header.png b/scorecard_tool/web-app/images/calendar_header.png deleted file mode 100644 index 8b875cb07..000000000 Binary files a/scorecard_tool/web-app/images/calendar_header.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/check-match-hover.png b/scorecard_tool/web-app/images/check-match-hover.png deleted file mode 100644 index 55d4ed727..000000000 Binary files a/scorecard_tool/web-app/images/check-match-hover.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/check-match.png b/scorecard_tool/web-app/images/check-match.png deleted file mode 100644 index 3300151a6..000000000 Binary files a/scorecard_tool/web-app/images/check-match.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/close_ico.png b/scorecard_tool/web-app/images/close_ico.png deleted file mode 100644 index 77abb9eec..000000000 Binary files a/scorecard_tool/web-app/images/close_ico.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/container2_bottom.png b/scorecard_tool/web-app/images/container2_bottom.png deleted file mode 100644 index 70150c4bb..000000000 Binary files a/scorecard_tool/web-app/images/container2_bottom.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/container2_bottom_left.png b/scorecard_tool/web-app/images/container2_bottom_left.png deleted file mode 100644 index be1eb9e12..000000000 Binary files a/scorecard_tool/web-app/images/container2_bottom_left.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/content_border.png b/scorecard_tool/web-app/images/content_border.png deleted file mode 100644 index 080a70eb8..000000000 Binary files a/scorecard_tool/web-app/images/content_border.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/contest_bottom.png b/scorecard_tool/web-app/images/contest_bottom.png deleted file mode 100644 index ae388bb15..000000000 Binary files a/scorecard_tool/web-app/images/contest_bottom.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/contest_list_bg.png b/scorecard_tool/web-app/images/contest_list_bg.png deleted file mode 100644 index 8dc2d75d1..000000000 Binary files a/scorecard_tool/web-app/images/contest_list_bg.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/contests_caption.png b/scorecard_tool/web-app/images/contests_caption.png deleted file mode 100644 index cfa8ab14d..000000000 Binary files a/scorecard_tool/web-app/images/contests_caption.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/darkenBtn.png b/scorecard_tool/web-app/images/darkenBtn.png deleted file mode 100644 index f7c1d177c..000000000 Binary files a/scorecard_tool/web-app/images/darkenBtn.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/down.png b/scorecard_tool/web-app/images/down.png deleted file mode 100644 index 220903b0f..000000000 Binary files a/scorecard_tool/web-app/images/down.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/draft_ico.png b/scorecard_tool/web-app/images/draft_ico.png deleted file mode 100644 index 75b0a63c2..000000000 Binary files a/scorecard_tool/web-app/images/draft_ico.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/dropdown.blue.active.png b/scorecard_tool/web-app/images/dropdown.blue.active.png deleted file mode 100644 index fac4ca59f..000000000 Binary files a/scorecard_tool/web-app/images/dropdown.blue.active.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/dropdown.blue.hover.png b/scorecard_tool/web-app/images/dropdown.blue.hover.png deleted file mode 100644 index 148420be3..000000000 Binary files a/scorecard_tool/web-app/images/dropdown.blue.hover.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/dropdown.blue.png b/scorecard_tool/web-app/images/dropdown.blue.png deleted file mode 100644 index 8cd370cd8..000000000 Binary files a/scorecard_tool/web-app/images/dropdown.blue.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/favicon.ico b/scorecard_tool/web-app/images/favicon.ico deleted file mode 100644 index 3dfcb9279..000000000 Binary files a/scorecard_tool/web-app/images/favicon.ico and /dev/null differ diff --git a/scorecard_tool/web-app/images/grails_logo.jpg b/scorecard_tool/web-app/images/grails_logo.jpg deleted file mode 100644 index 8be657c07..000000000 Binary files a/scorecard_tool/web-app/images/grails_logo.jpg and /dev/null differ diff --git a/scorecard_tool/web-app/images/grails_logo.png b/scorecard_tool/web-app/images/grails_logo.png deleted file mode 100644 index 9836b93d2..000000000 Binary files a/scorecard_tool/web-app/images/grails_logo.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/grayArrow.gif b/scorecard_tool/web-app/images/grayArrow.gif deleted file mode 100644 index 9da1447ba..000000000 Binary files a/scorecard_tool/web-app/images/grayArrow.gif and /dev/null differ diff --git a/scorecard_tool/web-app/images/header_dash_bg.png b/scorecard_tool/web-app/images/header_dash_bg.png deleted file mode 100644 index e3fe0e34f..000000000 Binary files a/scorecard_tool/web-app/images/header_dash_bg.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/header_landing_bg.png b/scorecard_tool/web-app/images/header_landing_bg.png deleted file mode 100644 index dd2864bcd..000000000 Binary files a/scorecard_tool/web-app/images/header_landing_bg.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/home_ico.png b/scorecard_tool/web-app/images/home_ico.png deleted file mode 100644 index 937e637c5..000000000 Binary files a/scorecard_tool/web-app/images/home_ico.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/leftnav_btm.png b/scorecard_tool/web-app/images/leftnav_btm.png deleted file mode 100644 index 582e1eb92..000000000 Binary files a/scorecard_tool/web-app/images/leftnav_btm.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/leftnav_midstretch.png b/scorecard_tool/web-app/images/leftnav_midstretch.png deleted file mode 100644 index 3cb8a5155..000000000 Binary files a/scorecard_tool/web-app/images/leftnav_midstretch.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/leftnav_top.png b/scorecard_tool/web-app/images/leftnav_top.png deleted file mode 100644 index 6afec7d32..000000000 Binary files a/scorecard_tool/web-app/images/leftnav_top.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/loading.gif b/scorecard_tool/web-app/images/loading.gif deleted file mode 100644 index 3288d1035..000000000 Binary files a/scorecard_tool/web-app/images/loading.gif and /dev/null differ diff --git a/scorecard_tool/web-app/images/loginIcon.png b/scorecard_tool/web-app/images/loginIcon.png deleted file mode 100644 index 4af0e11b8..000000000 Binary files a/scorecard_tool/web-app/images/loginIcon.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/login_input2.png b/scorecard_tool/web-app/images/login_input2.png deleted file mode 100644 index c04b39496..000000000 Binary files a/scorecard_tool/web-app/images/login_input2.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/logo2.png b/scorecard_tool/web-app/images/logo2.png deleted file mode 100644 index 578eca4f7..000000000 Binary files a/scorecard_tool/web-app/images/logo2.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/milestone_ico.png b/scorecard_tool/web-app/images/milestone_ico.png deleted file mode 100644 index d0c9c3501..000000000 Binary files a/scorecard_tool/web-app/images/milestone_ico.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/minimize.png b/scorecard_tool/web-app/images/minimize.png deleted file mode 100644 index 29a561d4d..000000000 Binary files a/scorecard_tool/web-app/images/minimize.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/move-icon-disabled.png b/scorecard_tool/web-app/images/move-icon-disabled.png deleted file mode 100644 index 8e4e6438a..000000000 Binary files a/scorecard_tool/web-app/images/move-icon-disabled.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/move-icon-hover.png b/scorecard_tool/web-app/images/move-icon-hover.png deleted file mode 100644 index 5145d8862..000000000 Binary files a/scorecard_tool/web-app/images/move-icon-hover.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/move-icon.png b/scorecard_tool/web-app/images/move-icon.png deleted file mode 100644 index 0143e8fe2..000000000 Binary files a/scorecard_tool/web-app/images/move-icon.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/my_project_ico.png b/scorecard_tool/web-app/images/my_project_ico.png deleted file mode 100644 index e0be77ad4..000000000 Binary files a/scorecard_tool/web-app/images/my_project_ico.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/notification_expand_ico.png b/scorecard_tool/web-app/images/notification_expand_ico.png deleted file mode 100644 index 1860cf7c3..000000000 Binary files a/scorecard_tool/web-app/images/notification_expand_ico.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/page_next.png b/scorecard_tool/web-app/images/page_next.png deleted file mode 100644 index cde83c6f2..000000000 Binary files a/scorecard_tool/web-app/images/page_next.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/page_next_nactive.png b/scorecard_tool/web-app/images/page_next_nactive.png deleted file mode 100644 index 34ff0a44d..000000000 Binary files a/scorecard_tool/web-app/images/page_next_nactive.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/page_prev.png b/scorecard_tool/web-app/images/page_prev.png deleted file mode 100644 index 14f90e37b..000000000 Binary files a/scorecard_tool/web-app/images/page_prev.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/page_prev_nactive.png b/scorecard_tool/web-app/images/page_prev_nactive.png deleted file mode 100644 index 180f6d808..000000000 Binary files a/scorecard_tool/web-app/images/page_prev_nactive.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/pagination-select.png b/scorecard_tool/web-app/images/pagination-select.png deleted file mode 100644 index 692feef13..000000000 Binary files a/scorecard_tool/web-app/images/pagination-select.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/problem-button.png b/scorecard_tool/web-app/images/problem-button.png deleted file mode 100644 index 594fdd9ea..000000000 Binary files a/scorecard_tool/web-app/images/problem-button.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/problem_bg.png b/scorecard_tool/web-app/images/problem_bg.png deleted file mode 100644 index d5052e0b9..000000000 Binary files a/scorecard_tool/web-app/images/problem_bg.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/problem_corner.png b/scorecard_tool/web-app/images/problem_corner.png deleted file mode 100644 index 1619417d6..000000000 Binary files a/scorecard_tool/web-app/images/problem_corner.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/problem_line.png b/scorecard_tool/web-app/images/problem_line.png deleted file mode 100644 index 41f44fd44..000000000 Binary files a/scorecard_tool/web-app/images/problem_line.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/problem_rating.swf b/scorecard_tool/web-app/images/problem_rating.swf deleted file mode 100644 index 1571eb344..000000000 Binary files a/scorecard_tool/web-app/images/problem_rating.swf and /dev/null differ diff --git a/scorecard_tool/web-app/images/problem_statement.gif b/scorecard_tool/web-app/images/problem_statement.gif deleted file mode 100644 index c22aee456..000000000 Binary files a/scorecard_tool/web-app/images/problem_statement.gif and /dev/null differ diff --git a/scorecard_tool/web-app/images/project_th_bg.png b/scorecard_tool/web-app/images/project_th_bg.png deleted file mode 100644 index 0fcbbc38f..000000000 Binary files a/scorecard_tool/web-app/images/project_th_bg.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/questionIcon.png b/scorecard_tool/web-app/images/questionIcon.png deleted file mode 100644 index cf109fc4c..000000000 Binary files a/scorecard_tool/web-app/images/questionIcon.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/rating-bg.png b/scorecard_tool/web-app/images/rating-bg.png deleted file mode 100644 index d8c5faf98..000000000 Binary files a/scorecard_tool/web-app/images/rating-bg.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/remove-icon-disabled.png b/scorecard_tool/web-app/images/remove-icon-disabled.png deleted file mode 100644 index 177ec7218..000000000 Binary files a/scorecard_tool/web-app/images/remove-icon-disabled.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/remove-icon-hover.png b/scorecard_tool/web-app/images/remove-icon-hover.png deleted file mode 100644 index f4ac66105..000000000 Binary files a/scorecard_tool/web-app/images/remove-icon-hover.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/remove-icon.png b/scorecard_tool/web-app/images/remove-icon.png deleted file mode 100644 index 99e0938e8..000000000 Binary files a/scorecard_tool/web-app/images/remove-icon.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/running_ico.png b/scorecard_tool/web-app/images/running_ico.png deleted file mode 100644 index 41a4db4a1..000000000 Binary files a/scorecard_tool/web-app/images/running_ico.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/scorecard-tool-logo.png b/scorecard_tool/web-app/images/scorecard-tool-logo.png deleted file mode 100644 index f7b4e3a46..000000000 Binary files a/scorecard_tool/web-app/images/scorecard-tool-logo.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/scroll-drag-top.png b/scorecard_tool/web-app/images/scroll-drag-top.png deleted file mode 100644 index 3074aeb7d..000000000 Binary files a/scorecard_tool/web-app/images/scroll-drag-top.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/scrollbar-arrow-down.png b/scorecard_tool/web-app/images/scrollbar-arrow-down.png deleted file mode 100644 index bc40db5c5..000000000 Binary files a/scorecard_tool/web-app/images/scrollbar-arrow-down.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/scrollbar-arrow-up.png b/scorecard_tool/web-app/images/scrollbar-arrow-up.png deleted file mode 100644 index 9c3fc4897..000000000 Binary files a/scorecard_tool/web-app/images/scrollbar-arrow-up.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/scrollbar-drag-bottom.png b/scorecard_tool/web-app/images/scrollbar-drag-bottom.png deleted file mode 100644 index 3074aeb7d..000000000 Binary files a/scorecard_tool/web-app/images/scrollbar-drag-bottom.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/scrollbar-drag-middle.png b/scorecard_tool/web-app/images/scrollbar-drag-middle.png deleted file mode 100644 index 61eeba521..000000000 Binary files a/scorecard_tool/web-app/images/scrollbar-drag-middle.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/scrollbar-track.png b/scorecard_tool/web-app/images/scrollbar-track.png deleted file mode 100644 index 7f5c68e7e..000000000 Binary files a/scorecard_tool/web-app/images/scrollbar-track.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/scrollbar_down.png b/scorecard_tool/web-app/images/scrollbar_down.png deleted file mode 100644 index f0f73f85a..000000000 Binary files a/scorecard_tool/web-app/images/scrollbar_down.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/scrollbar_up.png b/scorecard_tool/web-app/images/scrollbar_up.png deleted file mode 100644 index e3b8fe411..000000000 Binary files a/scorecard_tool/web-app/images/scrollbar_up.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/scrolltrack.png b/scorecard_tool/web-app/images/scrolltrack.png deleted file mode 100644 index 5aa6cbe0e..000000000 Binary files a/scorecard_tool/web-app/images/scrolltrack.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/select_input_bg.png b/scorecard_tool/web-app/images/select_input_bg.png deleted file mode 100644 index b7518a240..000000000 Binary files a/scorecard_tool/web-app/images/select_input_bg.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/select_input_ico.png b/scorecard_tool/web-app/images/select_input_ico.png deleted file mode 100644 index 5b8f76f6e..000000000 Binary files a/scorecard_tool/web-app/images/select_input_ico.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/shadow.png b/scorecard_tool/web-app/images/shadow.png deleted file mode 100644 index f45e04ceb..000000000 Binary files a/scorecard_tool/web-app/images/shadow.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/skin/database_add.png b/scorecard_tool/web-app/images/skin/database_add.png deleted file mode 100644 index 802bd6cde..000000000 Binary files a/scorecard_tool/web-app/images/skin/database_add.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/skin/database_delete.png b/scorecard_tool/web-app/images/skin/database_delete.png deleted file mode 100644 index cce652e84..000000000 Binary files a/scorecard_tool/web-app/images/skin/database_delete.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/skin/database_edit.png b/scorecard_tool/web-app/images/skin/database_edit.png deleted file mode 100644 index e501b668c..000000000 Binary files a/scorecard_tool/web-app/images/skin/database_edit.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/skin/database_save.png b/scorecard_tool/web-app/images/skin/database_save.png deleted file mode 100644 index 44c06dddf..000000000 Binary files a/scorecard_tool/web-app/images/skin/database_save.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/skin/database_table.png b/scorecard_tool/web-app/images/skin/database_table.png deleted file mode 100644 index 693709cbc..000000000 Binary files a/scorecard_tool/web-app/images/skin/database_table.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/skin/exclamation.png b/scorecard_tool/web-app/images/skin/exclamation.png deleted file mode 100644 index c37bd062e..000000000 Binary files a/scorecard_tool/web-app/images/skin/exclamation.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/skin/house.png b/scorecard_tool/web-app/images/skin/house.png deleted file mode 100644 index fed62219f..000000000 Binary files a/scorecard_tool/web-app/images/skin/house.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/skin/information.png b/scorecard_tool/web-app/images/skin/information.png deleted file mode 100644 index 12cd1aef9..000000000 Binary files a/scorecard_tool/web-app/images/skin/information.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/skin/shadow.jpg b/scorecard_tool/web-app/images/skin/shadow.jpg deleted file mode 100644 index b7ed44fad..000000000 Binary files a/scorecard_tool/web-app/images/skin/shadow.jpg and /dev/null differ diff --git a/scorecard_tool/web-app/images/skin/sorted_asc.gif b/scorecard_tool/web-app/images/skin/sorted_asc.gif deleted file mode 100644 index 6b179c11c..000000000 Binary files a/scorecard_tool/web-app/images/skin/sorted_asc.gif and /dev/null differ diff --git a/scorecard_tool/web-app/images/skin/sorted_desc.gif b/scorecard_tool/web-app/images/skin/sorted_desc.gif deleted file mode 100644 index 38b3a01d0..000000000 Binary files a/scorecard_tool/web-app/images/skin/sorted_desc.gif and /dev/null differ diff --git a/scorecard_tool/web-app/images/spinner.gif b/scorecard_tool/web-app/images/spinner.gif deleted file mode 100644 index 1ed786f2e..000000000 Binary files a/scorecard_tool/web-app/images/spinner.gif and /dev/null differ diff --git a/scorecard_tool/web-app/images/springsource.png b/scorecard_tool/web-app/images/springsource.png deleted file mode 100644 index e806d0011..000000000 Binary files a/scorecard_tool/web-app/images/springsource.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/tabHead-tl2.gif b/scorecard_tool/web-app/images/tabHead-tl2.gif deleted file mode 100644 index 36e1a9f4c..000000000 Binary files a/scorecard_tool/web-app/images/tabHead-tl2.gif and /dev/null differ diff --git a/scorecard_tool/web-app/images/tabHead-tr2.gif b/scorecard_tool/web-app/images/tabHead-tr2.gif deleted file mode 100644 index 517c38af8..000000000 Binary files a/scorecard_tool/web-app/images/tabHead-tr2.gif and /dev/null differ diff --git a/scorecard_tool/web-app/images/tabHead2.gif b/scorecard_tool/web-app/images/tabHead2.gif deleted file mode 100644 index c0cb2971b..000000000 Binary files a/scorecard_tool/web-app/images/tabHead2.gif and /dev/null differ diff --git a/scorecard_tool/web-app/images/tabListBG.png b/scorecard_tool/web-app/images/tabListBG.png deleted file mode 100644 index 93e707411..000000000 Binary files a/scorecard_tool/web-app/images/tabListBG.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/tabListBGActived.png b/scorecard_tool/web-app/images/tabListBGActived.png deleted file mode 100644 index 9edce0144..000000000 Binary files a/scorecard_tool/web-app/images/tabListBGActived.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/tabs2_left.png b/scorecard_tool/web-app/images/tabs2_left.png deleted file mode 100644 index f196c625e..000000000 Binary files a/scorecard_tool/web-app/images/tabs2_left.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/tabs2_right.png b/scorecard_tool/web-app/images/tabs2_right.png deleted file mode 100644 index e4f164eb3..000000000 Binary files a/scorecard_tool/web-app/images/tabs2_right.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/tabs_left.png b/scorecard_tool/web-app/images/tabs_left.png deleted file mode 100644 index 718f46b0c..000000000 Binary files a/scorecard_tool/web-app/images/tabs_left.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/tabs_left_on.png b/scorecard_tool/web-app/images/tabs_left_on.png deleted file mode 100644 index e5db542f8..000000000 Binary files a/scorecard_tool/web-app/images/tabs_left_on.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/tabs_right.png b/scorecard_tool/web-app/images/tabs_right.png deleted file mode 100644 index 9fd6f6ddc..000000000 Binary files a/scorecard_tool/web-app/images/tabs_right.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/tabs_right_on.png b/scorecard_tool/web-app/images/tabs_right_on.png deleted file mode 100644 index c144ca4ee..000000000 Binary files a/scorecard_tool/web-app/images/tabs_right_on.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/th_left_bg.png b/scorecard_tool/web-app/images/th_left_bg.png deleted file mode 100644 index f8cdf8c70..000000000 Binary files a/scorecard_tool/web-app/images/th_left_bg.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/th_right_bg.png b/scorecard_tool/web-app/images/th_right_bg.png deleted file mode 100644 index 8d5c3cfaf..000000000 Binary files a/scorecard_tool/web-app/images/th_right_bg.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/title_bg.png b/scorecard_tool/web-app/images/title_bg.png deleted file mode 100644 index 4b51f54da..000000000 Binary files a/scorecard_tool/web-app/images/title_bg.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/title_left.png b/scorecard_tool/web-app/images/title_left.png deleted file mode 100644 index a7141fc93..000000000 Binary files a/scorecard_tool/web-app/images/title_left.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/title_right.png b/scorecard_tool/web-app/images/title_right.png deleted file mode 100644 index c621db72f..000000000 Binary files a/scorecard_tool/web-app/images/title_right.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/top_nav_button.png b/scorecard_tool/web-app/images/top_nav_button.png deleted file mode 100644 index 386570bd2..000000000 Binary files a/scorecard_tool/web-app/images/top_nav_button.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/top_nav_button_left.png b/scorecard_tool/web-app/images/top_nav_button_left.png deleted file mode 100644 index eb1a984db..000000000 Binary files a/scorecard_tool/web-app/images/top_nav_button_left.png and /dev/null differ diff --git a/scorecard_tool/web-app/images/welcome2.png b/scorecard_tool/web-app/images/welcome2.png deleted file mode 100644 index f36529eef..000000000 Binary files a/scorecard_tool/web-app/images/welcome2.png and /dev/null differ diff --git a/scorecard_tool/web-app/js/prototype/animation.js b/scorecard_tool/web-app/js/prototype/animation.js deleted file mode 100644 index c35c2a593..000000000 --- a/scorecard_tool/web-app/js/prototype/animation.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -Copyright (c) 2006, Yahoo! Inc. All rights reserved. -Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 0.10.0 -*/ -YAHOO.util.Anim=function(el,attributes,duration,method){if(el){this.init(el,attributes,duration,method);}};YAHOO.util.Anim.prototype={doMethod:function(attribute,start,end){return this.method(this.currentFrame,start,end-start,this.totalFrames);},setAttribute:function(attribute,val,unit){YAHOO.util.Dom.setStyle(this.getEl(),attribute,val+unit);},getAttribute:function(attribute){return parseFloat(YAHOO.util.Dom.getStyle(this.getEl(),attribute));},defaultUnit:'px',defaultUnits:{opacity:' '},init:function(el,attributes,duration,method){var isAnimated=false;var startTime=null;var endTime=null;var actualFrames=0;var defaultValues={};el=YAHOO.util.Dom.get(el);this.attributes=attributes||{};this.duration=duration||1;this.method=method||YAHOO.util.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=YAHOO.util.AnimMgr.fps;this.getEl=function(){return el;};this.setDefault=function(attribute,val){if(val.constructor!=Array&&(val=='auto'||isNaN(val))){switch(attribute){case'width':val=el.clientWidth||el.offsetWidth;break;case'height':val=el.clientHeight||el.offsetHeight;break;case'left':if(YAHOO.util.Dom.getStyle(el,'position')=='absolute'){val=el.offsetLeft;}else{val=0;}break;case'top':if(YAHOO.util.Dom.getStyle(el,'position')=='absolute'){val=el.offsetTop;}else{val=0;}break;default:val=0;}}defaultValues[attribute]=val;};this.getDefault=function(attribute){return defaultValues[attribute];};this.isAnimated=function(){return isAnimated;};this.getStartTime=function(){return startTime;};this.animate=function(){if(this.isAnimated()){return false;}this.onStart.fire();this._onStart.fire();this.totalFrames=(this.useSeconds)?Math.ceil(YAHOO.util.AnimMgr.fps*this.duration):this.duration;YAHOO.util.AnimMgr.registerElement(this);var attributes=this.attributes;var el=this.getEl();var val;for(var attribute in attributes){val=this.getAttribute(attribute);this.setDefault(attribute,val);}isAnimated=true;actualFrames=0;startTime=new Date();};this.stop=function(){if(!this.isAnimated()){return false;}this.currentFrame=0;endTime=new Date();var data={time:endTime,duration:endTime-startTime,frames:actualFrames,fps:actualFrames/this.duration};isAnimated=false;actualFrames=0;this.onComplete.fire(data);};var onTween=function(){var start;var end=null;var val;var unit;var attributes=this['attributes'];for(var attribute in attributes){unit=attributes[attribute]['unit']||this.defaultUnits[attribute]||this.defaultUnit;if(typeof attributes[attribute]['from']!='undefined'){start=attributes[attribute]['from'];}else{start=this.getDefault(attribute);}if(typeof attributes[attribute]['to']!='undefined'){end=attributes[attribute]['to'];}else if(typeof attributes[attribute]['by']!='undefined'){if(start.constructor==Array){end=[];for(var i=0,len=start.length;i0&&isFinite(tweak)){if(tween.currentFrame+tweak>=frames){tweak=frames-(frame+1);}tween.currentFrame+=tweak;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(points,t){var n=points.length;var tmp=[];for(var i=0;i0&&control[0].constructor!=Array){control=[control];}if(YAHOO.util.Dom.getStyle(this.getEl(),'position')=='static'){YAHOO.util.Dom.setStyle(this.getEl(),'position','relative');}if(typeof attributes['points']['from']!='undefined'){YAHOO.util.Dom.setXY(this.getEl(),attributes['points']['from']);start=this.getAttribute('points');}else if((start[0]===0||start[1]===0)){YAHOO.util.Dom.setXY(this.getEl(),YAHOO.util.Dom.getXY(this.getEl()));start=this.getAttribute('points');}var i,len;if(typeof attributes['points']['to']!='undefined'){end=translateValues(attributes['points']['to'],this);for(i=0,len=control.length;i0){translatedPoints=translatedPoints.concat(control);}translatedPoints[translatedPoints.length]=end;}};this._onStart.subscribe(onStart);};YAHOO.util.Scroll=function(el,attributes,duration,method){if(el){YAHOO.util.Anim.call(this,el,attributes,duration,method);}};YAHOO.util.Scroll.prototype=new YAHOO.util.Anim();YAHOO.util.Scroll.prototype.defaultUnits.scroll=' ';YAHOO.util.Scroll.prototype.doMethod=function(attribute,start,end){var val=null;if(attribute=='scroll'){val=[this.method(this.currentFrame,start[0],end[0]-start[0],this.totalFrames),this.method(this.currentFrame,start[1],end[1]-start[1],this.totalFrames)];}else{val=this.method(this.currentFrame,start,end-start,this.totalFrames);}return val;};YAHOO.util.Scroll.prototype.getAttribute=function(attribute){var val=null;var el=this.getEl();if(attribute=='scroll'){val=[el.scrollLeft,el.scrollTop];}else{val=parseFloat(YAHOO.util.Dom.getStyle(el,attribute));}return val;};YAHOO.util.Scroll.prototype.setAttribute=function(attribute,val,unit){var el=this.getEl();if(attribute=='scroll'){el.scrollLeft=val[0];el.scrollTop=val[1];}else{YAHOO.util.Dom.setStyle(el,attribute,val+unit);}}; diff --git a/scorecard_tool/web-app/js/prototype/builder.js b/scorecard_tool/web-app/js/prototype/builder.js deleted file mode 100644 index f1f42b9ac..000000000 --- a/scorecard_tool/web-app/js/prototype/builder.js +++ /dev/null @@ -1,136 +0,0 @@ -// script.aculo.us builder.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 - -// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// -// script.aculo.us is freely distributable under the terms of an MIT-style license. -// For details, see the script.aculo.us web site: http://script.aculo.us/ - -var Builder = { - NODEMAP: { - AREA: 'map', - CAPTION: 'table', - COL: 'table', - COLGROUP: 'table', - LEGEND: 'fieldset', - OPTGROUP: 'select', - OPTION: 'select', - PARAM: 'object', - TBODY: 'table', - TD: 'table', - TFOOT: 'table', - TH: 'table', - THEAD: 'table', - TR: 'table' - }, - // note: For Firefox < 1.5, OPTION and OPTGROUP tags are currently broken, - // due to a Firefox bug - node: function(elementName) { - elementName = elementName.toUpperCase(); - - // try innerHTML approach - var parentTag = this.NODEMAP[elementName] || 'div'; - var parentElement = document.createElement(parentTag); - try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707 - parentElement.innerHTML = "<" + elementName + ">"; - } catch(e) {} - var element = parentElement.firstChild || null; - - // see if browser added wrapping tags - if(element && (element.tagName.toUpperCase() != elementName)) - element = element.getElementsByTagName(elementName)[0]; - - // fallback to createElement approach - if(!element) element = document.createElement(elementName); - - // abort if nothing could be created - if(!element) return; - - // attributes (or text) - if(arguments[1]) - if(this._isStringOrNumber(arguments[1]) || - (arguments[1] instanceof Array) || - arguments[1].tagName) { - this._children(element, arguments[1]); - } else { - var attrs = this._attributes(arguments[1]); - if(attrs.length) { - try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707 - parentElement.innerHTML = "<" +elementName + " " + - attrs + ">"; - } catch(e) {} - element = parentElement.firstChild || null; - // workaround firefox 1.0.X bug - if(!element) { - element = document.createElement(elementName); - for(attr in arguments[1]) - element[attr == 'class' ? 'className' : attr] = arguments[1][attr]; - } - if(element.tagName.toUpperCase() != elementName) - element = parentElement.getElementsByTagName(elementName)[0]; - } - } - - // text, or array of children - if(arguments[2]) - this._children(element, arguments[2]); - - return $(element); - }, - _text: function(text) { - return document.createTextNode(text); - }, - - ATTR_MAP: { - 'className': 'class', - 'htmlFor': 'for' - }, - - _attributes: function(attributes) { - var attrs = []; - for(attribute in attributes) - attrs.push((attribute in this.ATTR_MAP ? this.ATTR_MAP[attribute] : attribute) + - '="' + attributes[attribute].toString().escapeHTML().gsub(/"/,'"') + '"'); - return attrs.join(" "); - }, - _children: function(element, children) { - if(children.tagName) { - element.appendChild(children); - return; - } - if(typeof children=='object') { // array can hold nodes and text - children.flatten().each( function(e) { - if(typeof e=='object') - element.appendChild(e); - else - if(Builder._isStringOrNumber(e)) - element.appendChild(Builder._text(e)); - }); - } else - if(Builder._isStringOrNumber(children)) - element.appendChild(Builder._text(children)); - }, - _isStringOrNumber: function(param) { - return(typeof param=='string' || typeof param=='number'); - }, - build: function(html) { - var element = this.node('div'); - $(element).update(html.strip()); - return element.down(); - }, - dump: function(scope) { - if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope - - var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " + - "BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " + - "FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+ - "KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+ - "PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+ - "TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/); - - tags.each( function(tag){ - scope[tag] = function() { - return Builder.node.apply(Builder, [tag].concat($A(arguments))); - }; - }); - } -}; \ No newline at end of file diff --git a/scorecard_tool/web-app/js/prototype/controls.js b/scorecard_tool/web-app/js/prototype/controls.js deleted file mode 100644 index 7392fb664..000000000 --- a/scorecard_tool/web-app/js/prototype/controls.js +++ /dev/null @@ -1,965 +0,0 @@ -// script.aculo.us controls.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 - -// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// (c) 2005-2009 Ivan Krstic (http://blogs.law.harvard.edu/ivan) -// (c) 2005-2009 Jon Tirsen (http://www.tirsen.com) -// Contributors: -// Richard Livsey -// Rahul Bhargava -// Rob Wills -// -// script.aculo.us is freely distributable under the terms of an MIT-style license. -// For details, see the script.aculo.us web site: http://script.aculo.us/ - -// Autocompleter.Base handles all the autocompletion functionality -// that's independent of the data source for autocompletion. This -// includes drawing the autocompletion menu, observing keyboard -// and mouse events, and similar. -// -// Specific autocompleters need to provide, at the very least, -// a getUpdatedChoices function that will be invoked every time -// the text inside the monitored textbox changes. This method -// should get the text for which to provide autocompletion by -// invoking this.getToken(), NOT by directly accessing -// this.element.value. This is to allow incremental tokenized -// autocompletion. Specific auto-completion logic (AJAX, etc) -// belongs in getUpdatedChoices. -// -// Tokenized incremental autocompletion is enabled automatically -// when an autocompleter is instantiated with the 'tokens' option -// in the options parameter, e.g.: -// new Ajax.Autocompleter('id','upd', '/url/', { tokens: ',' }); -// will incrementally autocomplete with a comma as the token. -// Additionally, ',' in the above example can be replaced with -// a token array, e.g. { tokens: [',', '\n'] } which -// enables autocompletion on multiple tokens. This is most -// useful when one of the tokens is \n (a newline), as it -// allows smart autocompletion after linebreaks. - -if(typeof Effect == 'undefined') - throw("controls.js requires including script.aculo.us' effects.js library"); - -var Autocompleter = { }; -Autocompleter.Base = Class.create({ - baseInitialize: function(element, update, options) { - element = $(element); - this.element = element; - this.update = $(update); - this.hasFocus = false; - this.changed = false; - this.active = false; - this.index = 0; - this.entryCount = 0; - this.oldElementValue = this.element.value; - - if(this.setOptions) - this.setOptions(options); - else - this.options = options || { }; - - this.options.paramName = this.options.paramName || this.element.name; - this.options.tokens = this.options.tokens || []; - this.options.frequency = this.options.frequency || 0.4; - this.options.minChars = this.options.minChars || 1; - this.options.onShow = this.options.onShow || - function(element, update){ - if(!update.style.position || update.style.position=='absolute') { - update.style.position = 'absolute'; - Position.clone(element, update, { - setHeight: false, - offsetTop: element.offsetHeight - }); - } - Effect.Appear(update,{duration:0.15}); - }; - this.options.onHide = this.options.onHide || - function(element, update){ new Effect.Fade(update,{duration:0.15}) }; - - if(typeof(this.options.tokens) == 'string') - this.options.tokens = new Array(this.options.tokens); - // Force carriage returns as token delimiters anyway - if (!this.options.tokens.include('\n')) - this.options.tokens.push('\n'); - - this.observer = null; - - this.element.setAttribute('autocomplete','off'); - - Element.hide(this.update); - - Event.observe(this.element, 'blur', this.onBlur.bindAsEventListener(this)); - Event.observe(this.element, 'keydown', this.onKeyPress.bindAsEventListener(this)); - }, - - show: function() { - if(Element.getStyle(this.update, 'display')=='none') this.options.onShow(this.element, this.update); - if(!this.iefix && - (Prototype.Browser.IE) && - (Element.getStyle(this.update, 'position')=='absolute')) { - new Insertion.After(this.update, - ''); - this.iefix = $(this.update.id+'_iefix'); - } - if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50); - }, - - fixIEOverlapping: function() { - Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)}); - this.iefix.style.zIndex = 1; - this.update.style.zIndex = 2; - Element.show(this.iefix); - }, - - hide: function() { - this.stopIndicator(); - if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update); - if(this.iefix) Element.hide(this.iefix); - }, - - startIndicator: function() { - if(this.options.indicator) Element.show(this.options.indicator); - }, - - stopIndicator: function() { - if(this.options.indicator) Element.hide(this.options.indicator); - }, - - onKeyPress: function(event) { - if(this.active) - switch(event.keyCode) { - case Event.KEY_TAB: - case Event.KEY_RETURN: - this.selectEntry(); - Event.stop(event); - case Event.KEY_ESC: - this.hide(); - this.active = false; - Event.stop(event); - return; - case Event.KEY_LEFT: - case Event.KEY_RIGHT: - return; - case Event.KEY_UP: - this.markPrevious(); - this.render(); - Event.stop(event); - return; - case Event.KEY_DOWN: - this.markNext(); - this.render(); - Event.stop(event); - return; - } - else - if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN || - (Prototype.Browser.WebKit > 0 && event.keyCode == 0)) return; - - this.changed = true; - this.hasFocus = true; - - if(this.observer) clearTimeout(this.observer); - this.observer = - setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000); - }, - - activate: function() { - this.changed = false; - this.hasFocus = true; - this.getUpdatedChoices(); - }, - - onHover: function(event) { - var element = Event.findElement(event, 'LI'); - if(this.index != element.autocompleteIndex) - { - this.index = element.autocompleteIndex; - this.render(); - } - Event.stop(event); - }, - - onClick: function(event) { - var element = Event.findElement(event, 'LI'); - this.index = element.autocompleteIndex; - this.selectEntry(); - this.hide(); - }, - - onBlur: function(event) { - // needed to make click events working - setTimeout(this.hide.bind(this), 250); - this.hasFocus = false; - this.active = false; - }, - - render: function() { - if(this.entryCount > 0) { - for (var i = 0; i < this.entryCount; i++) - this.index==i ? - Element.addClassName(this.getEntry(i),"selected") : - Element.removeClassName(this.getEntry(i),"selected"); - if(this.hasFocus) { - this.show(); - this.active = true; - } - } else { - this.active = false; - this.hide(); - } - }, - - markPrevious: function() { - if(this.index > 0) this.index--; - else this.index = this.entryCount-1; - this.getEntry(this.index).scrollIntoView(true); - }, - - markNext: function() { - if(this.index < this.entryCount-1) this.index++; - else this.index = 0; - this.getEntry(this.index).scrollIntoView(false); - }, - - getEntry: function(index) { - return this.update.firstChild.childNodes[index]; - }, - - getCurrentEntry: function() { - return this.getEntry(this.index); - }, - - selectEntry: function() { - this.active = false; - this.updateElement(this.getCurrentEntry()); - }, - - updateElement: function(selectedElement) { - if (this.options.updateElement) { - this.options.updateElement(selectedElement); - return; - } - var value = ''; - if (this.options.select) { - var nodes = $(selectedElement).select('.' + this.options.select) || []; - if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select); - } else - value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal'); - - var bounds = this.getTokenBounds(); - if (bounds[0] != -1) { - var newValue = this.element.value.substr(0, bounds[0]); - var whitespace = this.element.value.substr(bounds[0]).match(/^\s+/); - if (whitespace) - newValue += whitespace[0]; - this.element.value = newValue + value + this.element.value.substr(bounds[1]); - } else { - this.element.value = value; - } - this.oldElementValue = this.element.value; - this.element.focus(); - - if (this.options.afterUpdateElement) - this.options.afterUpdateElement(this.element, selectedElement); - }, - - updateChoices: function(choices) { - if(!this.changed && this.hasFocus) { - this.update.innerHTML = choices; - Element.cleanWhitespace(this.update); - Element.cleanWhitespace(this.update.down()); - - if(this.update.firstChild && this.update.down().childNodes) { - this.entryCount = - this.update.down().childNodes.length; - for (var i = 0; i < this.entryCount; i++) { - var entry = this.getEntry(i); - entry.autocompleteIndex = i; - this.addObservers(entry); - } - } else { - this.entryCount = 0; - } - - this.stopIndicator(); - this.index = 0; - - if(this.entryCount==1 && this.options.autoSelect) { - this.selectEntry(); - this.hide(); - } else { - this.render(); - } - } - }, - - addObservers: function(element) { - Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this)); - Event.observe(element, "click", this.onClick.bindAsEventListener(this)); - }, - - onObserverEvent: function() { - this.changed = false; - this.tokenBounds = null; - if(this.getToken().length>=this.options.minChars) { - this.getUpdatedChoices(); - } else { - this.active = false; - this.hide(); - } - this.oldElementValue = this.element.value; - }, - - getToken: function() { - var bounds = this.getTokenBounds(); - return this.element.value.substring(bounds[0], bounds[1]).strip(); - }, - - getTokenBounds: function() { - if (null != this.tokenBounds) return this.tokenBounds; - var value = this.element.value; - if (value.strip().empty()) return [-1, 0]; - var diff = arguments.callee.getFirstDifferencePos(value, this.oldElementValue); - var offset = (diff == this.oldElementValue.length ? 1 : 0); - var prevTokenPos = -1, nextTokenPos = value.length; - var tp; - for (var index = 0, l = this.options.tokens.length; index < l; ++index) { - tp = value.lastIndexOf(this.options.tokens[index], diff + offset - 1); - if (tp > prevTokenPos) prevTokenPos = tp; - tp = value.indexOf(this.options.tokens[index], diff + offset); - if (-1 != tp && tp < nextTokenPos) nextTokenPos = tp; - } - return (this.tokenBounds = [prevTokenPos + 1, nextTokenPos]); - } -}); - -Autocompleter.Base.prototype.getTokenBounds.getFirstDifferencePos = function(newS, oldS) { - var boundary = Math.min(newS.length, oldS.length); - for (var index = 0; index < boundary; ++index) - if (newS[index] != oldS[index]) - return index; - return boundary; -}; - -Ajax.Autocompleter = Class.create(Autocompleter.Base, { - initialize: function(element, update, url, options) { - this.baseInitialize(element, update, options); - this.options.asynchronous = true; - this.options.onComplete = this.onComplete.bind(this); - this.options.defaultParams = this.options.parameters || null; - this.url = url; - }, - - getUpdatedChoices: function() { - this.startIndicator(); - - var entry = encodeURIComponent(this.options.paramName) + '=' + - encodeURIComponent(this.getToken()); - - this.options.parameters = this.options.callback ? - this.options.callback(this.element, entry) : entry; - - if(this.options.defaultParams) - this.options.parameters += '&' + this.options.defaultParams; - - new Ajax.Request(this.url, this.options); - }, - - onComplete: function(request) { - this.updateChoices(request.responseText); - } -}); - -// The local array autocompleter. Used when you'd prefer to -// inject an array of autocompletion options into the page, rather -// than sending out Ajax queries, which can be quite slow sometimes. -// -// The constructor takes four parameters. The first two are, as usual, -// the id of the monitored textbox, and id of the autocompletion menu. -// The third is the array you want to autocomplete from, and the fourth -// is the options block. -// -// Extra local autocompletion options: -// - choices - How many autocompletion choices to offer -// -// - partialSearch - If false, the autocompleter will match entered -// text only at the beginning of strings in the -// autocomplete array. Defaults to true, which will -// match text at the beginning of any *word* in the -// strings in the autocomplete array. If you want to -// search anywhere in the string, additionally set -// the option fullSearch to true (default: off). -// -// - fullSsearch - Search anywhere in autocomplete array strings. -// -// - partialChars - How many characters to enter before triggering -// a partial match (unlike minChars, which defines -// how many characters are required to do any match -// at all). Defaults to 2. -// -// - ignoreCase - Whether to ignore case when autocompleting. -// Defaults to true. -// -// It's possible to pass in a custom function as the 'selector' -// option, if you prefer to write your own autocompletion logic. -// In that case, the other options above will not apply unless -// you support them. - -Autocompleter.Local = Class.create(Autocompleter.Base, { - initialize: function(element, update, array, options) { - this.baseInitialize(element, update, options); - this.options.array = array; - }, - - getUpdatedChoices: function() { - this.updateChoices(this.options.selector(this)); - }, - - setOptions: function(options) { - this.options = Object.extend({ - choices: 10, - partialSearch: true, - partialChars: 2, - ignoreCase: true, - fullSearch: false, - selector: function(instance) { - var ret = []; // Beginning matches - var partial = []; // Inside matches - var entry = instance.getToken(); - var count = 0; - - for (var i = 0; i < instance.options.array.length && - ret.length < instance.options.choices ; i++) { - - var elem = instance.options.array[i]; - var foundPos = instance.options.ignoreCase ? - elem.toLowerCase().indexOf(entry.toLowerCase()) : - elem.indexOf(entry); - - while (foundPos != -1) { - if (foundPos == 0 && elem.length != entry.length) { - ret.push("
  • " + elem.substr(0, entry.length) + "" + - elem.substr(entry.length) + "
  • "); - break; - } else if (entry.length >= instance.options.partialChars && - instance.options.partialSearch && foundPos != -1) { - if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) { - partial.push("
  • " + elem.substr(0, foundPos) + "" + - elem.substr(foundPos, entry.length) + "" + elem.substr( - foundPos + entry.length) + "
  • "); - break; - } - } - - foundPos = instance.options.ignoreCase ? - elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) : - elem.indexOf(entry, foundPos + 1); - - } - } - if (partial.length) - ret = ret.concat(partial.slice(0, instance.options.choices - ret.length)); - return "
      " + ret.join('') + "
    "; - } - }, options || { }); - } -}); - -// AJAX in-place editor and collection editor -// Full rewrite by Christophe Porteneuve (April 2007). - -// Use this if you notice weird scrolling problems on some browsers, -// the DOM might be a bit confused when this gets called so do this -// waits 1 ms (with setTimeout) until it does the activation -Field.scrollFreeActivate = function(field) { - setTimeout(function() { - Field.activate(field); - }, 1); -}; - -Ajax.InPlaceEditor = Class.create({ - initialize: function(element, url, options) { - this.url = url; - this.element = element = $(element); - this.prepareOptions(); - this._controls = { }; - arguments.callee.dealWithDeprecatedOptions(options); // DEPRECATION LAYER!!! - Object.extend(this.options, options || { }); - if (!this.options.formId && this.element.id) { - this.options.formId = this.element.id + '-inplaceeditor'; - if ($(this.options.formId)) - this.options.formId = ''; - } - if (this.options.externalControl) - this.options.externalControl = $(this.options.externalControl); - if (!this.options.externalControl) - this.options.externalControlOnly = false; - this._originalBackground = this.element.getStyle('background-color') || 'transparent'; - this.element.title = this.options.clickToEditText; - this._boundCancelHandler = this.handleFormCancellation.bind(this); - this._boundComplete = (this.options.onComplete || Prototype.emptyFunction).bind(this); - this._boundFailureHandler = this.handleAJAXFailure.bind(this); - this._boundSubmitHandler = this.handleFormSubmission.bind(this); - this._boundWrapperHandler = this.wrapUp.bind(this); - this.registerListeners(); - }, - checkForEscapeOrReturn: function(e) { - if (!this._editing || e.ctrlKey || e.altKey || e.shiftKey) return; - if (Event.KEY_ESC == e.keyCode) - this.handleFormCancellation(e); - else if (Event.KEY_RETURN == e.keyCode) - this.handleFormSubmission(e); - }, - createControl: function(mode, handler, extraClasses) { - var control = this.options[mode + 'Control']; - var text = this.options[mode + 'Text']; - if ('button' == control) { - var btn = document.createElement('input'); - btn.type = 'submit'; - btn.value = text; - btn.className = 'editor_' + mode + '_button'; - if ('cancel' == mode) - btn.onclick = this._boundCancelHandler; - this._form.appendChild(btn); - this._controls[mode] = btn; - } else if ('link' == control) { - var link = document.createElement('a'); - link.href = '#'; - link.appendChild(document.createTextNode(text)); - link.onclick = 'cancel' == mode ? this._boundCancelHandler : this._boundSubmitHandler; - link.className = 'editor_' + mode + '_link'; - if (extraClasses) - link.className += ' ' + extraClasses; - this._form.appendChild(link); - this._controls[mode] = link; - } - }, - createEditField: function() { - var text = (this.options.loadTextURL ? this.options.loadingText : this.getText()); - var fld; - if (1 >= this.options.rows && !/\r|\n/.test(this.getText())) { - fld = document.createElement('input'); - fld.type = 'text'; - var size = this.options.size || this.options.cols || 0; - if (0 < size) fld.size = size; - } else { - fld = document.createElement('textarea'); - fld.rows = (1 >= this.options.rows ? this.options.autoRows : this.options.rows); - fld.cols = this.options.cols || 40; - } - fld.name = this.options.paramName; - fld.value = text; // No HTML breaks conversion anymore - fld.className = 'editor_field'; - if (this.options.submitOnBlur) - fld.onblur = this._boundSubmitHandler; - this._controls.editor = fld; - if (this.options.loadTextURL) - this.loadExternalText(); - this._form.appendChild(this._controls.editor); - }, - createForm: function() { - var ipe = this; - function addText(mode, condition) { - var text = ipe.options['text' + mode + 'Controls']; - if (!text || condition === false) return; - ipe._form.appendChild(document.createTextNode(text)); - }; - this._form = $(document.createElement('form')); - this._form.id = this.options.formId; - this._form.addClassName(this.options.formClassName); - this._form.onsubmit = this._boundSubmitHandler; - this.createEditField(); - if ('textarea' == this._controls.editor.tagName.toLowerCase()) - this._form.appendChild(document.createElement('br')); - if (this.options.onFormCustomization) - this.options.onFormCustomization(this, this._form); - addText('Before', this.options.okControl || this.options.cancelControl); - this.createControl('ok', this._boundSubmitHandler); - addText('Between', this.options.okControl && this.options.cancelControl); - this.createControl('cancel', this._boundCancelHandler, 'editor_cancel'); - addText('After', this.options.okControl || this.options.cancelControl); - }, - destroy: function() { - if (this._oldInnerHTML) - this.element.innerHTML = this._oldInnerHTML; - this.leaveEditMode(); - this.unregisterListeners(); - }, - enterEditMode: function(e) { - if (this._saving || this._editing) return; - this._editing = true; - this.triggerCallback('onEnterEditMode'); - if (this.options.externalControl) - this.options.externalControl.hide(); - this.element.hide(); - this.createForm(); - this.element.parentNode.insertBefore(this._form, this.element); - if (!this.options.loadTextURL) - this.postProcessEditField(); - if (e) Event.stop(e); - }, - enterHover: function(e) { - if (this.options.hoverClassName) - this.element.addClassName(this.options.hoverClassName); - if (this._saving) return; - this.triggerCallback('onEnterHover'); - }, - getText: function() { - return this.element.innerHTML.unescapeHTML(); - }, - handleAJAXFailure: function(transport) { - this.triggerCallback('onFailure', transport); - if (this._oldInnerHTML) { - this.element.innerHTML = this._oldInnerHTML; - this._oldInnerHTML = null; - } - }, - handleFormCancellation: function(e) { - this.wrapUp(); - if (e) Event.stop(e); - }, - handleFormSubmission: function(e) { - var form = this._form; - var value = $F(this._controls.editor); - this.prepareSubmission(); - var params = this.options.callback(form, value) || ''; - if (Object.isString(params)) - params = params.toQueryParams(); - params.editorId = this.element.id; - if (this.options.htmlResponse) { - var options = Object.extend({ evalScripts: true }, this.options.ajaxOptions); - Object.extend(options, { - parameters: params, - onComplete: this._boundWrapperHandler, - onFailure: this._boundFailureHandler - }); - new Ajax.Updater({ success: this.element }, this.url, options); - } else { - var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); - Object.extend(options, { - parameters: params, - onComplete: this._boundWrapperHandler, - onFailure: this._boundFailureHandler - }); - new Ajax.Request(this.url, options); - } - if (e) Event.stop(e); - }, - leaveEditMode: function() { - this.element.removeClassName(this.options.savingClassName); - this.removeForm(); - this.leaveHover(); - this.element.style.backgroundColor = this._originalBackground; - this.element.show(); - if (this.options.externalControl) - this.options.externalControl.show(); - this._saving = false; - this._editing = false; - this._oldInnerHTML = null; - this.triggerCallback('onLeaveEditMode'); - }, - leaveHover: function(e) { - if (this.options.hoverClassName) - this.element.removeClassName(this.options.hoverClassName); - if (this._saving) return; - this.triggerCallback('onLeaveHover'); - }, - loadExternalText: function() { - this._form.addClassName(this.options.loadingClassName); - this._controls.editor.disabled = true; - var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); - Object.extend(options, { - parameters: 'editorId=' + encodeURIComponent(this.element.id), - onComplete: Prototype.emptyFunction, - onSuccess: function(transport) { - this._form.removeClassName(this.options.loadingClassName); - var text = transport.responseText; - if (this.options.stripLoadedTextTags) - text = text.stripTags(); - this._controls.editor.value = text; - this._controls.editor.disabled = false; - this.postProcessEditField(); - }.bind(this), - onFailure: this._boundFailureHandler - }); - new Ajax.Request(this.options.loadTextURL, options); - }, - postProcessEditField: function() { - var fpc = this.options.fieldPostCreation; - if (fpc) - $(this._controls.editor)['focus' == fpc ? 'focus' : 'activate'](); - }, - prepareOptions: function() { - this.options = Object.clone(Ajax.InPlaceEditor.DefaultOptions); - Object.extend(this.options, Ajax.InPlaceEditor.DefaultCallbacks); - [this._extraDefaultOptions].flatten().compact().each(function(defs) { - Object.extend(this.options, defs); - }.bind(this)); - }, - prepareSubmission: function() { - this._saving = true; - this.removeForm(); - this.leaveHover(); - this.showSaving(); - }, - registerListeners: function() { - this._listeners = { }; - var listener; - $H(Ajax.InPlaceEditor.Listeners).each(function(pair) { - listener = this[pair.value].bind(this); - this._listeners[pair.key] = listener; - if (!this.options.externalControlOnly) - this.element.observe(pair.key, listener); - if (this.options.externalControl) - this.options.externalControl.observe(pair.key, listener); - }.bind(this)); - }, - removeForm: function() { - if (!this._form) return; - this._form.remove(); - this._form = null; - this._controls = { }; - }, - showSaving: function() { - this._oldInnerHTML = this.element.innerHTML; - this.element.innerHTML = this.options.savingText; - this.element.addClassName(this.options.savingClassName); - this.element.style.backgroundColor = this._originalBackground; - this.element.show(); - }, - triggerCallback: function(cbName, arg) { - if ('function' == typeof this.options[cbName]) { - this.options[cbName](this, arg); - } - }, - unregisterListeners: function() { - $H(this._listeners).each(function(pair) { - if (!this.options.externalControlOnly) - this.element.stopObserving(pair.key, pair.value); - if (this.options.externalControl) - this.options.externalControl.stopObserving(pair.key, pair.value); - }.bind(this)); - }, - wrapUp: function(transport) { - this.leaveEditMode(); - // Can't use triggerCallback due to backward compatibility: requires - // binding + direct element - this._boundComplete(transport, this.element); - } -}); - -Object.extend(Ajax.InPlaceEditor.prototype, { - dispose: Ajax.InPlaceEditor.prototype.destroy -}); - -Ajax.InPlaceCollectionEditor = Class.create(Ajax.InPlaceEditor, { - initialize: function($super, element, url, options) { - this._extraDefaultOptions = Ajax.InPlaceCollectionEditor.DefaultOptions; - $super(element, url, options); - }, - - createEditField: function() { - var list = document.createElement('select'); - list.name = this.options.paramName; - list.size = 1; - this._controls.editor = list; - this._collection = this.options.collection || []; - if (this.options.loadCollectionURL) - this.loadCollection(); - else - this.checkForExternalText(); - this._form.appendChild(this._controls.editor); - }, - - loadCollection: function() { - this._form.addClassName(this.options.loadingClassName); - this.showLoadingText(this.options.loadingCollectionText); - var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); - Object.extend(options, { - parameters: 'editorId=' + encodeURIComponent(this.element.id), - onComplete: Prototype.emptyFunction, - onSuccess: function(transport) { - var js = transport.responseText.strip(); - if (!/^\[.*\]$/.test(js)) // TODO: improve sanity check - throw('Server returned an invalid collection representation.'); - this._collection = eval(js); - this.checkForExternalText(); - }.bind(this), - onFailure: this.onFailure - }); - new Ajax.Request(this.options.loadCollectionURL, options); - }, - - showLoadingText: function(text) { - this._controls.editor.disabled = true; - var tempOption = this._controls.editor.firstChild; - if (!tempOption) { - tempOption = document.createElement('option'); - tempOption.value = ''; - this._controls.editor.appendChild(tempOption); - tempOption.selected = true; - } - tempOption.update((text || '').stripScripts().stripTags()); - }, - - checkForExternalText: function() { - this._text = this.getText(); - if (this.options.loadTextURL) - this.loadExternalText(); - else - this.buildOptionList(); - }, - - loadExternalText: function() { - this.showLoadingText(this.options.loadingText); - var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); - Object.extend(options, { - parameters: 'editorId=' + encodeURIComponent(this.element.id), - onComplete: Prototype.emptyFunction, - onSuccess: function(transport) { - this._text = transport.responseText.strip(); - this.buildOptionList(); - }.bind(this), - onFailure: this.onFailure - }); - new Ajax.Request(this.options.loadTextURL, options); - }, - - buildOptionList: function() { - this._form.removeClassName(this.options.loadingClassName); - this._collection = this._collection.map(function(entry) { - return 2 === entry.length ? entry : [entry, entry].flatten(); - }); - var marker = ('value' in this.options) ? this.options.value : this._text; - var textFound = this._collection.any(function(entry) { - return entry[0] == marker; - }.bind(this)); - this._controls.editor.update(''); - var option; - this._collection.each(function(entry, index) { - option = document.createElement('option'); - option.value = entry[0]; - option.selected = textFound ? entry[0] == marker : 0 == index; - option.appendChild(document.createTextNode(entry[1])); - this._controls.editor.appendChild(option); - }.bind(this)); - this._controls.editor.disabled = false; - Field.scrollFreeActivate(this._controls.editor); - } -}); - -//**** DEPRECATION LAYER FOR InPlace[Collection]Editor! **** -//**** This only exists for a while, in order to let **** -//**** users adapt to the new API. Read up on the new **** -//**** API and convert your code to it ASAP! **** - -Ajax.InPlaceEditor.prototype.initialize.dealWithDeprecatedOptions = function(options) { - if (!options) return; - function fallback(name, expr) { - if (name in options || expr === undefined) return; - options[name] = expr; - }; - fallback('cancelControl', (options.cancelLink ? 'link' : (options.cancelButton ? 'button' : - options.cancelLink == options.cancelButton == false ? false : undefined))); - fallback('okControl', (options.okLink ? 'link' : (options.okButton ? 'button' : - options.okLink == options.okButton == false ? false : undefined))); - fallback('highlightColor', options.highlightcolor); - fallback('highlightEndColor', options.highlightendcolor); -}; - -Object.extend(Ajax.InPlaceEditor, { - DefaultOptions: { - ajaxOptions: { }, - autoRows: 3, // Use when multi-line w/ rows == 1 - cancelControl: 'link', // 'link'|'button'|false - cancelText: 'cancel', - clickToEditText: 'Click to edit', - externalControl: null, // id|elt - externalControlOnly: false, - fieldPostCreation: 'activate', // 'activate'|'focus'|false - formClassName: 'inplaceeditor-form', - formId: null, // id|elt - highlightColor: '#ffff99', - highlightEndColor: '#ffffff', - hoverClassName: '', - htmlResponse: true, - loadingClassName: 'inplaceeditor-loading', - loadingText: 'Loading...', - okControl: 'button', // 'link'|'button'|false - okText: 'ok', - paramName: 'value', - rows: 1, // If 1 and multi-line, uses autoRows - savingClassName: 'inplaceeditor-saving', - savingText: 'Saving...', - size: 0, - stripLoadedTextTags: false, - submitOnBlur: false, - textAfterControls: '', - textBeforeControls: '', - textBetweenControls: '' - }, - DefaultCallbacks: { - callback: function(form) { - return Form.serialize(form); - }, - onComplete: function(transport, element) { - // For backward compatibility, this one is bound to the IPE, and passes - // the element directly. It was too often customized, so we don't break it. - new Effect.Highlight(element, { - startcolor: this.options.highlightColor, keepBackgroundImage: true }); - }, - onEnterEditMode: null, - onEnterHover: function(ipe) { - ipe.element.style.backgroundColor = ipe.options.highlightColor; - if (ipe._effect) - ipe._effect.cancel(); - }, - onFailure: function(transport, ipe) { - alert('Error communication with the server: ' + transport.responseText.stripTags()); - }, - onFormCustomization: null, // Takes the IPE and its generated form, after editor, before controls. - onLeaveEditMode: null, - onLeaveHover: function(ipe) { - ipe._effect = new Effect.Highlight(ipe.element, { - startcolor: ipe.options.highlightColor, endcolor: ipe.options.highlightEndColor, - restorecolor: ipe._originalBackground, keepBackgroundImage: true - }); - } - }, - Listeners: { - click: 'enterEditMode', - keydown: 'checkForEscapeOrReturn', - mouseover: 'enterHover', - mouseout: 'leaveHover' - } -}); - -Ajax.InPlaceCollectionEditor.DefaultOptions = { - loadingCollectionText: 'Loading options...' -}; - -// Delayed observer, like Form.Element.Observer, -// but waits for delay after last key input -// Ideal for live-search fields - -Form.Element.DelayedObserver = Class.create({ - initialize: function(element, delay, callback) { - this.delay = delay || 0.5; - this.element = $(element); - this.callback = callback; - this.timer = null; - this.lastValue = $F(this.element); - Event.observe(this.element,'keyup',this.delayedListener.bindAsEventListener(this)); - }, - delayedListener: function(event) { - if(this.lastValue == $F(this.element)) return; - if(this.timer) clearTimeout(this.timer); - this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000); - this.lastValue = $F(this.element); - }, - onTimerEvent: function() { - this.timer = null; - this.callback(this.element, $F(this.element)); - } -}); \ No newline at end of file diff --git a/scorecard_tool/web-app/js/prototype/dragdrop.js b/scorecard_tool/web-app/js/prototype/dragdrop.js deleted file mode 100644 index 15c6dbca6..000000000 --- a/scorecard_tool/web-app/js/prototype/dragdrop.js +++ /dev/null @@ -1,974 +0,0 @@ -// script.aculo.us dragdrop.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 - -// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// -// script.aculo.us is freely distributable under the terms of an MIT-style license. -// For details, see the script.aculo.us web site: http://script.aculo.us/ - -if(Object.isUndefined(Effect)) - throw("dragdrop.js requires including script.aculo.us' effects.js library"); - -var Droppables = { - drops: [], - - remove: function(element) { - this.drops = this.drops.reject(function(d) { return d.element==$(element) }); - }, - - add: function(element) { - element = $(element); - var options = Object.extend({ - greedy: true, - hoverclass: null, - tree: false - }, arguments[1] || { }); - - // cache containers - if(options.containment) { - options._containers = []; - var containment = options.containment; - if(Object.isArray(containment)) { - containment.each( function(c) { options._containers.push($(c)) }); - } else { - options._containers.push($(containment)); - } - } - - if(options.accept) options.accept = [options.accept].flatten(); - - Element.makePositioned(element); // fix IE - options.element = element; - - this.drops.push(options); - }, - - findDeepestChild: function(drops) { - deepest = drops[0]; - - for (i = 1; i < drops.length; ++i) - if (Element.isParent(drops[i].element, deepest.element)) - deepest = drops[i]; - - return deepest; - }, - - isContained: function(element, drop) { - var containmentNode; - if(drop.tree) { - containmentNode = element.treeNode; - } else { - containmentNode = element.parentNode; - } - return drop._containers.detect(function(c) { return containmentNode == c }); - }, - - isAffected: function(point, element, drop) { - return ( - (drop.element!=element) && - ((!drop._containers) || - this.isContained(element, drop)) && - ((!drop.accept) || - (Element.classNames(element).detect( - function(v) { return drop.accept.include(v) } ) )) && - Position.within(drop.element, point[0], point[1]) ); - }, - - deactivate: function(drop) { - if(drop.hoverclass) - Element.removeClassName(drop.element, drop.hoverclass); - this.last_active = null; - }, - - activate: function(drop) { - if(drop.hoverclass) - Element.addClassName(drop.element, drop.hoverclass); - this.last_active = drop; - }, - - show: function(point, element) { - if(!this.drops.length) return; - var drop, affected = []; - - this.drops.each( function(drop) { - if(Droppables.isAffected(point, element, drop)) - affected.push(drop); - }); - - if(affected.length>0) - drop = Droppables.findDeepestChild(affected); - - if(this.last_active && this.last_active != drop) this.deactivate(this.last_active); - if (drop) { - Position.within(drop.element, point[0], point[1]); - if(drop.onHover) - drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element)); - - if (drop != this.last_active) Droppables.activate(drop); - } - }, - - fire: function(event, element) { - if(!this.last_active) return; - Position.prepare(); - - if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active)) - if (this.last_active.onDrop) { - this.last_active.onDrop(element, this.last_active.element, event); - return true; - } - }, - - reset: function() { - if(this.last_active) - this.deactivate(this.last_active); - } -}; - -var Draggables = { - drags: [], - observers: [], - - register: function(draggable) { - if(this.drags.length == 0) { - this.eventMouseUp = this.endDrag.bindAsEventListener(this); - this.eventMouseMove = this.updateDrag.bindAsEventListener(this); - this.eventKeypress = this.keyPress.bindAsEventListener(this); - - Event.observe(document, "mouseup", this.eventMouseUp); - Event.observe(document, "mousemove", this.eventMouseMove); - Event.observe(document, "keypress", this.eventKeypress); - } - this.drags.push(draggable); - }, - - unregister: function(draggable) { - this.drags = this.drags.reject(function(d) { return d==draggable }); - if(this.drags.length == 0) { - Event.stopObserving(document, "mouseup", this.eventMouseUp); - Event.stopObserving(document, "mousemove", this.eventMouseMove); - Event.stopObserving(document, "keypress", this.eventKeypress); - } - }, - - activate: function(draggable) { - if(draggable.options.delay) { - this._timeout = setTimeout(function() { - Draggables._timeout = null; - window.focus(); - Draggables.activeDraggable = draggable; - }.bind(this), draggable.options.delay); - } else { - window.focus(); // allows keypress events if window isn't currently focused, fails for Safari - this.activeDraggable = draggable; - } - }, - - deactivate: function() { - this.activeDraggable = null; - }, - - updateDrag: function(event) { - if(!this.activeDraggable) return; - var pointer = [Event.pointerX(event), Event.pointerY(event)]; - // Mozilla-based browsers fire successive mousemove events with - // the same coordinates, prevent needless redrawing (moz bug?) - if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return; - this._lastPointer = pointer; - - this.activeDraggable.updateDrag(event, pointer); - }, - - endDrag: function(event) { - if(this._timeout) { - clearTimeout(this._timeout); - this._timeout = null; - } - if(!this.activeDraggable) return; - this._lastPointer = null; - this.activeDraggable.endDrag(event); - this.activeDraggable = null; - }, - - keyPress: function(event) { - if(this.activeDraggable) - this.activeDraggable.keyPress(event); - }, - - addObserver: function(observer) { - this.observers.push(observer); - this._cacheObserverCallbacks(); - }, - - removeObserver: function(element) { // element instead of observer fixes mem leaks - this.observers = this.observers.reject( function(o) { return o.element==element }); - this._cacheObserverCallbacks(); - }, - - notify: function(eventName, draggable, event) { // 'onStart', 'onEnd', 'onDrag' - if(this[eventName+'Count'] > 0) - this.observers.each( function(o) { - if(o[eventName]) o[eventName](eventName, draggable, event); - }); - if(draggable.options[eventName]) draggable.options[eventName](draggable, event); - }, - - _cacheObserverCallbacks: function() { - ['onStart','onEnd','onDrag'].each( function(eventName) { - Draggables[eventName+'Count'] = Draggables.observers.select( - function(o) { return o[eventName]; } - ).length; - }); - } -}; - -/*--------------------------------------------------------------------------*/ - -var Draggable = Class.create({ - initialize: function(element) { - var defaults = { - handle: false, - reverteffect: function(element, top_offset, left_offset) { - var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02; - new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur, - queue: {scope:'_draggable', position:'end'} - }); - }, - endeffect: function(element) { - var toOpacity = Object.isNumber(element._opacity) ? element._opacity : 1.0; - new Effect.Opacity(element, {duration:0.2, from:0.7, to:toOpacity, - queue: {scope:'_draggable', position:'end'}, - afterFinish: function(){ - Draggable._dragging[element] = false - } - }); - }, - zindex: 1000, - revert: false, - quiet: false, - scroll: false, - scrollSensitivity: 20, - scrollSpeed: 15, - snap: false, // false, or xy or [x,y] or function(x,y){ return [x,y] } - delay: 0 - }; - - if(!arguments[1] || Object.isUndefined(arguments[1].endeffect)) - Object.extend(defaults, { - starteffect: function(element) { - element._opacity = Element.getOpacity(element); - Draggable._dragging[element] = true; - new Effect.Opacity(element, {duration:0.2, from:element._opacity, to:0.7}); - } - }); - - var options = Object.extend(defaults, arguments[1] || { }); - - this.element = $(element); - - if(options.handle && Object.isString(options.handle)) - this.handle = this.element.down('.'+options.handle, 0); - - if(!this.handle) this.handle = $(options.handle); - if(!this.handle) this.handle = this.element; - - if(options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) { - options.scroll = $(options.scroll); - this._isScrollChild = Element.childOf(this.element, options.scroll); - } - - Element.makePositioned(this.element); // fix IE - - this.options = options; - this.dragging = false; - - this.eventMouseDown = this.initDrag.bindAsEventListener(this); - Event.observe(this.handle, "mousedown", this.eventMouseDown); - - Draggables.register(this); - }, - - destroy: function() { - Event.stopObserving(this.handle, "mousedown", this.eventMouseDown); - Draggables.unregister(this); - }, - - currentDelta: function() { - return([ - parseInt(Element.getStyle(this.element,'left') || '0'), - parseInt(Element.getStyle(this.element,'top') || '0')]); - }, - - initDrag: function(event) { - if(!Object.isUndefined(Draggable._dragging[this.element]) && - Draggable._dragging[this.element]) return; - if(Event.isLeftClick(event)) { - // abort on form elements, fixes a Firefox issue - var src = Event.element(event); - if((tag_name = src.tagName.toUpperCase()) && ( - tag_name=='INPUT' || - tag_name=='SELECT' || - tag_name=='OPTION' || - tag_name=='BUTTON' || - tag_name=='TEXTAREA')) return; - - var pointer = [Event.pointerX(event), Event.pointerY(event)]; - var pos = this.element.cumulativeOffset(); - this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) }); - - Draggables.activate(this); - Event.stop(event); - } - }, - - startDrag: function(event) { - this.dragging = true; - if(!this.delta) - this.delta = this.currentDelta(); - - if(this.options.zindex) { - this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0); - this.element.style.zIndex = this.options.zindex; - } - - if(this.options.ghosting) { - this._clone = this.element.cloneNode(true); - this._originallyAbsolute = (this.element.getStyle('position') == 'absolute'); - if (!this._originallyAbsolute) - Position.absolutize(this.element); - this.element.parentNode.insertBefore(this._clone, this.element); - } - - if(this.options.scroll) { - if (this.options.scroll == window) { - var where = this._getWindowScroll(this.options.scroll); - this.originalScrollLeft = where.left; - this.originalScrollTop = where.top; - } else { - this.originalScrollLeft = this.options.scroll.scrollLeft; - this.originalScrollTop = this.options.scroll.scrollTop; - } - } - - Draggables.notify('onStart', this, event); - - if(this.options.starteffect) this.options.starteffect(this.element); - }, - - updateDrag: function(event, pointer) { - if(!this.dragging) this.startDrag(event); - - if(!this.options.quiet){ - Position.prepare(); - Droppables.show(pointer, this.element); - } - - Draggables.notify('onDrag', this, event); - - this.draw(pointer); - if(this.options.change) this.options.change(this); - - if(this.options.scroll) { - this.stopScrolling(); - - var p; - if (this.options.scroll == window) { - with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; } - } else { - p = Position.page(this.options.scroll); - p[0] += this.options.scroll.scrollLeft + Position.deltaX; - p[1] += this.options.scroll.scrollTop + Position.deltaY; - p.push(p[0]+this.options.scroll.offsetWidth); - p.push(p[1]+this.options.scroll.offsetHeight); - } - var speed = [0,0]; - if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity); - if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity); - if(pointer[0] > (p[2]-this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[2]-this.options.scrollSensitivity); - if(pointer[1] > (p[3]-this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[3]-this.options.scrollSensitivity); - this.startScrolling(speed); - } - - // fix AppleWebKit rendering - if(Prototype.Browser.WebKit) window.scrollBy(0,0); - - Event.stop(event); - }, - - finishDrag: function(event, success) { - this.dragging = false; - - if(this.options.quiet){ - Position.prepare(); - var pointer = [Event.pointerX(event), Event.pointerY(event)]; - Droppables.show(pointer, this.element); - } - - if(this.options.ghosting) { - if (!this._originallyAbsolute) - Position.relativize(this.element); - delete this._originallyAbsolute; - Element.remove(this._clone); - this._clone = null; - } - - var dropped = false; - if(success) { - dropped = Droppables.fire(event, this.element); - if (!dropped) dropped = false; - } - if(dropped && this.options.onDropped) this.options.onDropped(this.element); - Draggables.notify('onEnd', this, event); - - var revert = this.options.revert; - if(revert && Object.isFunction(revert)) revert = revert(this.element); - - var d = this.currentDelta(); - if(revert && this.options.reverteffect) { - if (dropped == 0 || revert != 'failure') - this.options.reverteffect(this.element, - d[1]-this.delta[1], d[0]-this.delta[0]); - } else { - this.delta = d; - } - - if(this.options.zindex) - this.element.style.zIndex = this.originalZ; - - if(this.options.endeffect) - this.options.endeffect(this.element); - - Draggables.deactivate(this); - Droppables.reset(); - }, - - keyPress: function(event) { - if(event.keyCode!=Event.KEY_ESC) return; - this.finishDrag(event, false); - Event.stop(event); - }, - - endDrag: function(event) { - if(!this.dragging) return; - this.stopScrolling(); - this.finishDrag(event, true); - Event.stop(event); - }, - - draw: function(point) { - var pos = this.element.cumulativeOffset(); - if(this.options.ghosting) { - var r = Position.realOffset(this.element); - pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY; - } - - var d = this.currentDelta(); - pos[0] -= d[0]; pos[1] -= d[1]; - - if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) { - pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft; - pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop; - } - - var p = [0,1].map(function(i){ - return (point[i]-pos[i]-this.offset[i]) - }.bind(this)); - - if(this.options.snap) { - if(Object.isFunction(this.options.snap)) { - p = this.options.snap(p[0],p[1],this); - } else { - if(Object.isArray(this.options.snap)) { - p = p.map( function(v, i) { - return (v/this.options.snap[i]).round()*this.options.snap[i] }.bind(this)); - } else { - p = p.map( function(v) { - return (v/this.options.snap).round()*this.options.snap }.bind(this)); - } - }} - - var style = this.element.style; - if((!this.options.constraint) || (this.options.constraint=='horizontal')) - style.left = p[0] + "px"; - if((!this.options.constraint) || (this.options.constraint=='vertical')) - style.top = p[1] + "px"; - - if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering - }, - - stopScrolling: function() { - if(this.scrollInterval) { - clearInterval(this.scrollInterval); - this.scrollInterval = null; - Draggables._lastScrollPointer = null; - } - }, - - startScrolling: function(speed) { - if(!(speed[0] || speed[1])) return; - this.scrollSpeed = [speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed]; - this.lastScrolled = new Date(); - this.scrollInterval = setInterval(this.scroll.bind(this), 10); - }, - - scroll: function() { - var current = new Date(); - var delta = current - this.lastScrolled; - this.lastScrolled = current; - if(this.options.scroll == window) { - with (this._getWindowScroll(this.options.scroll)) { - if (this.scrollSpeed[0] || this.scrollSpeed[1]) { - var d = delta / 1000; - this.options.scroll.scrollTo( left + d*this.scrollSpeed[0], top + d*this.scrollSpeed[1] ); - } - } - } else { - this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000; - this.options.scroll.scrollTop += this.scrollSpeed[1] * delta / 1000; - } - - Position.prepare(); - Droppables.show(Draggables._lastPointer, this.element); - Draggables.notify('onDrag', this); - if (this._isScrollChild) { - Draggables._lastScrollPointer = Draggables._lastScrollPointer || $A(Draggables._lastPointer); - Draggables._lastScrollPointer[0] += this.scrollSpeed[0] * delta / 1000; - Draggables._lastScrollPointer[1] += this.scrollSpeed[1] * delta / 1000; - if (Draggables._lastScrollPointer[0] < 0) - Draggables._lastScrollPointer[0] = 0; - if (Draggables._lastScrollPointer[1] < 0) - Draggables._lastScrollPointer[1] = 0; - this.draw(Draggables._lastScrollPointer); - } - - if(this.options.change) this.options.change(this); - }, - - _getWindowScroll: function(w) { - var T, L, W, H; - with (w.document) { - if (w.document.documentElement && documentElement.scrollTop) { - T = documentElement.scrollTop; - L = documentElement.scrollLeft; - } else if (w.document.body) { - T = body.scrollTop; - L = body.scrollLeft; - } - if (w.innerWidth) { - W = w.innerWidth; - H = w.innerHeight; - } else if (w.document.documentElement && documentElement.clientWidth) { - W = documentElement.clientWidth; - H = documentElement.clientHeight; - } else { - W = body.offsetWidth; - H = body.offsetHeight; - } - } - return { top: T, left: L, width: W, height: H }; - } -}); - -Draggable._dragging = { }; - -/*--------------------------------------------------------------------------*/ - -var SortableObserver = Class.create({ - initialize: function(element, observer) { - this.element = $(element); - this.observer = observer; - this.lastValue = Sortable.serialize(this.element); - }, - - onStart: function() { - this.lastValue = Sortable.serialize(this.element); - }, - - onEnd: function() { - Sortable.unmark(); - if(this.lastValue != Sortable.serialize(this.element)) - this.observer(this.element) - } -}); - -var Sortable = { - SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/, - - sortables: { }, - - _findRootElement: function(element) { - while (element.tagName.toUpperCase() != "BODY") { - if(element.id && Sortable.sortables[element.id]) return element; - element = element.parentNode; - } - }, - - options: function(element) { - element = Sortable._findRootElement($(element)); - if(!element) return; - return Sortable.sortables[element.id]; - }, - - destroy: function(element){ - element = $(element); - var s = Sortable.sortables[element.id]; - - if(s) { - Draggables.removeObserver(s.element); - s.droppables.each(function(d){ Droppables.remove(d) }); - s.draggables.invoke('destroy'); - - delete Sortable.sortables[s.element.id]; - } - }, - - create: function(element) { - element = $(element); - var options = Object.extend({ - element: element, - tag: 'li', // assumes li children, override with tag: 'tagname' - dropOnEmpty: false, - tree: false, - treeTag: 'ul', - overlap: 'vertical', // one of 'vertical', 'horizontal' - constraint: 'vertical', // one of 'vertical', 'horizontal', false - containment: element, // also takes array of elements (or id's); or false - handle: false, // or a CSS class - only: false, - delay: 0, - hoverclass: null, - ghosting: false, - quiet: false, - scroll: false, - scrollSensitivity: 20, - scrollSpeed: 15, - format: this.SERIALIZE_RULE, - - // these take arrays of elements or ids and can be - // used for better initialization performance - elements: false, - handles: false, - - onChange: Prototype.emptyFunction, - onUpdate: Prototype.emptyFunction - }, arguments[1] || { }); - - // clear any old sortable with same element - this.destroy(element); - - // build options for the draggables - var options_for_draggable = { - revert: true, - quiet: options.quiet, - scroll: options.scroll, - scrollSpeed: options.scrollSpeed, - scrollSensitivity: options.scrollSensitivity, - delay: options.delay, - ghosting: options.ghosting, - constraint: options.constraint, - handle: options.handle }; - - if(options.starteffect) - options_for_draggable.starteffect = options.starteffect; - - if(options.reverteffect) - options_for_draggable.reverteffect = options.reverteffect; - else - if(options.ghosting) options_for_draggable.reverteffect = function(element) { - element.style.top = 0; - element.style.left = 0; - }; - - if(options.endeffect) - options_for_draggable.endeffect = options.endeffect; - - if(options.zindex) - options_for_draggable.zindex = options.zindex; - - // build options for the droppables - var options_for_droppable = { - overlap: options.overlap, - containment: options.containment, - tree: options.tree, - hoverclass: options.hoverclass, - onHover: Sortable.onHover - }; - - var options_for_tree = { - onHover: Sortable.onEmptyHover, - overlap: options.overlap, - containment: options.containment, - hoverclass: options.hoverclass - }; - - // fix for gecko engine - Element.cleanWhitespace(element); - - options.draggables = []; - options.droppables = []; - - // drop on empty handling - if(options.dropOnEmpty || options.tree) { - Droppables.add(element, options_for_tree); - options.droppables.push(element); - } - - (options.elements || this.findElements(element, options) || []).each( function(e,i) { - var handle = options.handles ? $(options.handles[i]) : - (options.handle ? $(e).select('.' + options.handle)[0] : e); - options.draggables.push( - new Draggable(e, Object.extend(options_for_draggable, { handle: handle }))); - Droppables.add(e, options_for_droppable); - if(options.tree) e.treeNode = element; - options.droppables.push(e); - }); - - if(options.tree) { - (Sortable.findTreeElements(element, options) || []).each( function(e) { - Droppables.add(e, options_for_tree); - e.treeNode = element; - options.droppables.push(e); - }); - } - - // keep reference - this.sortables[element.identify()] = options; - - // for onupdate - Draggables.addObserver(new SortableObserver(element, options.onUpdate)); - - }, - - // return all suitable-for-sortable elements in a guaranteed order - findElements: function(element, options) { - return Element.findChildren( - element, options.only, options.tree ? true : false, options.tag); - }, - - findTreeElements: function(element, options) { - return Element.findChildren( - element, options.only, options.tree ? true : false, options.treeTag); - }, - - onHover: function(element, dropon, overlap) { - if(Element.isParent(dropon, element)) return; - - if(overlap > .33 && overlap < .66 && Sortable.options(dropon).tree) { - return; - } else if(overlap>0.5) { - Sortable.mark(dropon, 'before'); - if(dropon.previousSibling != element) { - var oldParentNode = element.parentNode; - element.style.visibility = "hidden"; // fix gecko rendering - dropon.parentNode.insertBefore(element, dropon); - if(dropon.parentNode!=oldParentNode) - Sortable.options(oldParentNode).onChange(element); - Sortable.options(dropon.parentNode).onChange(element); - } - } else { - Sortable.mark(dropon, 'after'); - var nextElement = dropon.nextSibling || null; - if(nextElement != element) { - var oldParentNode = element.parentNode; - element.style.visibility = "hidden"; // fix gecko rendering - dropon.parentNode.insertBefore(element, nextElement); - if(dropon.parentNode!=oldParentNode) - Sortable.options(oldParentNode).onChange(element); - Sortable.options(dropon.parentNode).onChange(element); - } - } - }, - - onEmptyHover: function(element, dropon, overlap) { - var oldParentNode = element.parentNode; - var droponOptions = Sortable.options(dropon); - - if(!Element.isParent(dropon, element)) { - var index; - - var children = Sortable.findElements(dropon, {tag: droponOptions.tag, only: droponOptions.only}); - var child = null; - - if(children) { - var offset = Element.offsetSize(dropon, droponOptions.overlap) * (1.0 - overlap); - - for (index = 0; index < children.length; index += 1) { - if (offset - Element.offsetSize (children[index], droponOptions.overlap) >= 0) { - offset -= Element.offsetSize (children[index], droponOptions.overlap); - } else if (offset - (Element.offsetSize (children[index], droponOptions.overlap) / 2) >= 0) { - child = index + 1 < children.length ? children[index + 1] : null; - break; - } else { - child = children[index]; - break; - } - } - } - - dropon.insertBefore(element, child); - - Sortable.options(oldParentNode).onChange(element); - droponOptions.onChange(element); - } - }, - - unmark: function() { - if(Sortable._marker) Sortable._marker.hide(); - }, - - mark: function(dropon, position) { - // mark on ghosting only - var sortable = Sortable.options(dropon.parentNode); - if(sortable && !sortable.ghosting) return; - - if(!Sortable._marker) { - Sortable._marker = - ($('dropmarker') || Element.extend(document.createElement('DIV'))). - hide().addClassName('dropmarker').setStyle({position:'absolute'}); - document.getElementsByTagName("body").item(0).appendChild(Sortable._marker); - } - var offsets = dropon.cumulativeOffset(); - Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'}); - - if(position=='after') - if(sortable.overlap == 'horizontal') - Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + 'px'}); - else - Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + 'px'}); - - Sortable._marker.show(); - }, - - _tree: function(element, options, parent) { - var children = Sortable.findElements(element, options) || []; - - for (var i = 0; i < children.length; ++i) { - var match = children[i].id.match(options.format); - - if (!match) continue; - - var child = { - id: encodeURIComponent(match ? match[1] : null), - element: element, - parent: parent, - children: [], - position: parent.children.length, - container: $(children[i]).down(options.treeTag) - }; - - /* Get the element containing the children and recurse over it */ - if (child.container) - this._tree(child.container, options, child); - - parent.children.push (child); - } - - return parent; - }, - - tree: function(element) { - element = $(element); - var sortableOptions = this.options(element); - var options = Object.extend({ - tag: sortableOptions.tag, - treeTag: sortableOptions.treeTag, - only: sortableOptions.only, - name: element.id, - format: sortableOptions.format - }, arguments[1] || { }); - - var root = { - id: null, - parent: null, - children: [], - container: element, - position: 0 - }; - - return Sortable._tree(element, options, root); - }, - - /* Construct a [i] index for a particular node */ - _constructIndex: function(node) { - var index = ''; - do { - if (node.id) index = '[' + node.position + ']' + index; - } while ((node = node.parent) != null); - return index; - }, - - sequence: function(element) { - element = $(element); - var options = Object.extend(this.options(element), arguments[1] || { }); - - return $(this.findElements(element, options) || []).map( function(item) { - return item.id.match(options.format) ? item.id.match(options.format)[1] : ''; - }); - }, - - setSequence: function(element, new_sequence) { - element = $(element); - var options = Object.extend(this.options(element), arguments[2] || { }); - - var nodeMap = { }; - this.findElements(element, options).each( function(n) { - if (n.id.match(options.format)) - nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; - n.parentNode.removeChild(n); - }); - - new_sequence.each(function(ident) { - var n = nodeMap[ident]; - if (n) { - n[1].appendChild(n[0]); - delete nodeMap[ident]; - } - }); - }, - - serialize: function(element) { - element = $(element); - var options = Object.extend(Sortable.options(element), arguments[1] || { }); - var name = encodeURIComponent( - (arguments[1] && arguments[1].name) ? arguments[1].name : element.id); - - if (options.tree) { - return Sortable.tree(element, arguments[1]).children.map( function (item) { - return [name + Sortable._constructIndex(item) + "[id]=" + - encodeURIComponent(item.id)].concat(item.children.map(arguments.callee)); - }).flatten().join('&'); - } else { - return Sortable.sequence(element, arguments[1]).map( function(item) { - return name + "[]=" + encodeURIComponent(item); - }).join('&'); - } - } -}; - -// Returns true if child is contained within element -Element.isParent = function(child, element) { - if (!child.parentNode || child == element) return false; - if (child.parentNode == element) return true; - return Element.isParent(child.parentNode, element); -}; - -Element.findChildren = function(element, only, recursive, tagName) { - if(!element.hasChildNodes()) return null; - tagName = tagName.toUpperCase(); - if(only) only = [only].flatten(); - var elements = []; - $A(element.childNodes).each( function(e) { - if(e.tagName && e.tagName.toUpperCase()==tagName && - (!only || (Element.classNames(e).detect(function(v) { return only.include(v) })))) - elements.push(e); - if(recursive) { - var grandchildren = Element.findChildren(e, only, recursive, tagName); - if(grandchildren) elements.push(grandchildren); - } - }); - - return (elements.length>0 ? elements.flatten() : []); -}; - -Element.offsetSize = function (element, type) { - return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')]; -}; \ No newline at end of file diff --git a/scorecard_tool/web-app/js/prototype/effects.js b/scorecard_tool/web-app/js/prototype/effects.js deleted file mode 100644 index 066ee5909..000000000 --- a/scorecard_tool/web-app/js/prototype/effects.js +++ /dev/null @@ -1,1123 +0,0 @@ -// script.aculo.us effects.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 - -// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// Contributors: -// Justin Palmer (http://encytemedia.com/) -// Mark Pilgrim (http://diveintomark.org/) -// Martin Bialasinki -// -// script.aculo.us is freely distributable under the terms of an MIT-style license. -// For details, see the script.aculo.us web site: http://script.aculo.us/ - -// converts rgb() and #xxx to #xxxxxx format, -// returns self (or first argument) if not convertable -String.prototype.parseColor = function() { - var color = '#'; - if (this.slice(0,4) == 'rgb(') { - var cols = this.slice(4,this.length-1).split(','); - var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3); - } else { - if (this.slice(0,1) == '#') { - if (this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase(); - if (this.length==7) color = this.toLowerCase(); - } - } - return (color.length==7 ? color : (arguments[0] || this)); -}; - -/*--------------------------------------------------------------------------*/ - -Element.collectTextNodes = function(element) { - return $A($(element).childNodes).collect( function(node) { - return (node.nodeType==3 ? node.nodeValue : - (node.hasChildNodes() ? Element.collectTextNodes(node) : '')); - }).flatten().join(''); -}; - -Element.collectTextNodesIgnoreClass = function(element, className) { - return $A($(element).childNodes).collect( function(node) { - return (node.nodeType==3 ? node.nodeValue : - ((node.hasChildNodes() && !Element.hasClassName(node,className)) ? - Element.collectTextNodesIgnoreClass(node, className) : '')); - }).flatten().join(''); -}; - -Element.setContentZoom = function(element, percent) { - element = $(element); - element.setStyle({fontSize: (percent/100) + 'em'}); - if (Prototype.Browser.WebKit) window.scrollBy(0,0); - return element; -}; - -Element.getInlineOpacity = function(element){ - return $(element).style.opacity || ''; -}; - -Element.forceRerendering = function(element) { - try { - element = $(element); - var n = document.createTextNode(' '); - element.appendChild(n); - element.removeChild(n); - } catch(e) { } -}; - -/*--------------------------------------------------------------------------*/ - -var Effect = { - _elementDoesNotExistError: { - name: 'ElementDoesNotExistError', - message: 'The specified DOM element does not exist, but is required for this effect to operate' - }, - Transitions: { - linear: Prototype.K, - sinoidal: function(pos) { - return (-Math.cos(pos*Math.PI)/2) + .5; - }, - reverse: function(pos) { - return 1-pos; - }, - flicker: function(pos) { - var pos = ((-Math.cos(pos*Math.PI)/4) + .75) + Math.random()/4; - return pos > 1 ? 1 : pos; - }, - wobble: function(pos) { - return (-Math.cos(pos*Math.PI*(9*pos))/2) + .5; - }, - pulse: function(pos, pulses) { - return (-Math.cos((pos*((pulses||5)-.5)*2)*Math.PI)/2) + .5; - }, - spring: function(pos) { - return 1 - (Math.cos(pos * 4.5 * Math.PI) * Math.exp(-pos * 6)); - }, - none: function(pos) { - return 0; - }, - full: function(pos) { - return 1; - } - }, - DefaultOptions: { - duration: 1.0, // seconds - fps: 100, // 100= assume 66fps max. - sync: false, // true for combining - from: 0.0, - to: 1.0, - delay: 0.0, - queue: 'parallel' - }, - tagifyText: function(element) { - var tagifyStyle = 'position:relative'; - if (Prototype.Browser.IE) tagifyStyle += ';zoom:1'; - - element = $(element); - $A(element.childNodes).each( function(child) { - if (child.nodeType==3) { - child.nodeValue.toArray().each( function(character) { - element.insertBefore( - new Element('span', {style: tagifyStyle}).update( - character == ' ' ? String.fromCharCode(160) : character), - child); - }); - Element.remove(child); - } - }); - }, - multiple: function(element, effect) { - var elements; - if (((typeof element == 'object') || - Object.isFunction(element)) && - (element.length)) - elements = element; - else - elements = $(element).childNodes; - - var options = Object.extend({ - speed: 0.1, - delay: 0.0 - }, arguments[2] || { }); - var masterDelay = options.delay; - - $A(elements).each( function(element, index) { - new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay })); - }); - }, - PAIRS: { - 'slide': ['SlideDown','SlideUp'], - 'blind': ['BlindDown','BlindUp'], - 'appear': ['Appear','Fade'] - }, - toggle: function(element, effect, options) { - element = $(element); - effect = (effect || 'appear').toLowerCase(); - - return Effect[ Effect.PAIRS[ effect ][ element.visible() ? 1 : 0 ] ](element, Object.extend({ - queue: { position:'end', scope:(element.id || 'global'), limit: 1 } - }, options || {})); - } -}; - -Effect.DefaultOptions.transition = Effect.Transitions.sinoidal; - -/* ------------- core effects ------------- */ - -Effect.ScopedQueue = Class.create(Enumerable, { - initialize: function() { - this.effects = []; - this.interval = null; - }, - _each: function(iterator) { - this.effects._each(iterator); - }, - add: function(effect) { - var timestamp = new Date().getTime(); - - var position = Object.isString(effect.options.queue) ? - effect.options.queue : effect.options.queue.position; - - switch(position) { - case 'front': - // move unstarted effects after this effect - this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) { - e.startOn += effect.finishOn; - e.finishOn += effect.finishOn; - }); - break; - case 'with-last': - timestamp = this.effects.pluck('startOn').max() || timestamp; - break; - case 'end': - // start effect after last queued effect has finished - timestamp = this.effects.pluck('finishOn').max() || timestamp; - break; - } - - effect.startOn += timestamp; - effect.finishOn += timestamp; - - if (!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit)) - this.effects.push(effect); - - if (!this.interval) - this.interval = setInterval(this.loop.bind(this), 15); - }, - remove: function(effect) { - this.effects = this.effects.reject(function(e) { return e==effect }); - if (this.effects.length == 0) { - clearInterval(this.interval); - this.interval = null; - } - }, - loop: function() { - var timePos = new Date().getTime(); - for(var i=0, len=this.effects.length;i= this.startOn) { - if (timePos >= this.finishOn) { - this.render(1.0); - this.cancel(); - this.event('beforeFinish'); - if (this.finish) this.finish(); - this.event('afterFinish'); - return; - } - var pos = (timePos - this.startOn) / this.totalTime, - frame = (pos * this.totalFrames).round(); - if (frame > this.currentFrame) { - this.render(pos); - this.currentFrame = frame; - } - } - }, - cancel: function() { - if (!this.options.sync) - Effect.Queues.get(Object.isString(this.options.queue) ? - 'global' : this.options.queue.scope).remove(this); - this.state = 'finished'; - }, - event: function(eventName) { - if (this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this); - if (this.options[eventName]) this.options[eventName](this); - }, - inspect: function() { - var data = $H(); - for(property in this) - if (!Object.isFunction(this[property])) data.set(property, this[property]); - return '#'; - } -}); - -Effect.Parallel = Class.create(Effect.Base, { - initialize: function(effects) { - this.effects = effects || []; - this.start(arguments[1]); - }, - update: function(position) { - this.effects.invoke('render', position); - }, - finish: function(position) { - this.effects.each( function(effect) { - effect.render(1.0); - effect.cancel(); - effect.event('beforeFinish'); - if (effect.finish) effect.finish(position); - effect.event('afterFinish'); - }); - } -}); - -Effect.Tween = Class.create(Effect.Base, { - initialize: function(object, from, to) { - object = Object.isString(object) ? $(object) : object; - var args = $A(arguments), method = args.last(), - options = args.length == 5 ? args[3] : null; - this.method = Object.isFunction(method) ? method.bind(object) : - Object.isFunction(object[method]) ? object[method].bind(object) : - function(value) { object[method] = value }; - this.start(Object.extend({ from: from, to: to }, options || { })); - }, - update: function(position) { - this.method(position); - } -}); - -Effect.Event = Class.create(Effect.Base, { - initialize: function() { - this.start(Object.extend({ duration: 0 }, arguments[0] || { })); - }, - update: Prototype.emptyFunction -}); - -Effect.Opacity = Class.create(Effect.Base, { - initialize: function(element) { - this.element = $(element); - if (!this.element) throw(Effect._elementDoesNotExistError); - // make this work on IE on elements without 'layout' - if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout)) - this.element.setStyle({zoom: 1}); - var options = Object.extend({ - from: this.element.getOpacity() || 0.0, - to: 1.0 - }, arguments[1] || { }); - this.start(options); - }, - update: function(position) { - this.element.setOpacity(position); - } -}); - -Effect.Move = Class.create(Effect.Base, { - initialize: function(element) { - this.element = $(element); - if (!this.element) throw(Effect._elementDoesNotExistError); - var options = Object.extend({ - x: 0, - y: 0, - mode: 'relative' - }, arguments[1] || { }); - this.start(options); - }, - setup: function() { - this.element.makePositioned(); - this.originalLeft = parseFloat(this.element.getStyle('left') || '0'); - this.originalTop = parseFloat(this.element.getStyle('top') || '0'); - if (this.options.mode == 'absolute') { - this.options.x = this.options.x - this.originalLeft; - this.options.y = this.options.y - this.originalTop; - } - }, - update: function(position) { - this.element.setStyle({ - left: (this.options.x * position + this.originalLeft).round() + 'px', - top: (this.options.y * position + this.originalTop).round() + 'px' - }); - } -}); - -// for backwards compatibility -Effect.MoveBy = function(element, toTop, toLeft) { - return new Effect.Move(element, - Object.extend({ x: toLeft, y: toTop }, arguments[3] || { })); -}; - -Effect.Scale = Class.create(Effect.Base, { - initialize: function(element, percent) { - this.element = $(element); - if (!this.element) throw(Effect._elementDoesNotExistError); - var options = Object.extend({ - scaleX: true, - scaleY: true, - scaleContent: true, - scaleFromCenter: false, - scaleMode: 'box', // 'box' or 'contents' or { } with provided values - scaleFrom: 100.0, - scaleTo: percent - }, arguments[2] || { }); - this.start(options); - }, - setup: function() { - this.restoreAfterFinish = this.options.restoreAfterFinish || false; - this.elementPositioning = this.element.getStyle('position'); - - this.originalStyle = { }; - ['top','left','width','height','fontSize'].each( function(k) { - this.originalStyle[k] = this.element.style[k]; - }.bind(this)); - - this.originalTop = this.element.offsetTop; - this.originalLeft = this.element.offsetLeft; - - var fontSize = this.element.getStyle('font-size') || '100%'; - ['em','px','%','pt'].each( function(fontSizeType) { - if (fontSize.indexOf(fontSizeType)>0) { - this.fontSize = parseFloat(fontSize); - this.fontSizeType = fontSizeType; - } - }.bind(this)); - - this.factor = (this.options.scaleTo - this.options.scaleFrom)/100; - - this.dims = null; - if (this.options.scaleMode=='box') - this.dims = [this.element.offsetHeight, this.element.offsetWidth]; - if (/^content/.test(this.options.scaleMode)) - this.dims = [this.element.scrollHeight, this.element.scrollWidth]; - if (!this.dims) - this.dims = [this.options.scaleMode.originalHeight, - this.options.scaleMode.originalWidth]; - }, - update: function(position) { - var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position); - if (this.options.scaleContent && this.fontSize) - this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType }); - this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale); - }, - finish: function(position) { - if (this.restoreAfterFinish) this.element.setStyle(this.originalStyle); - }, - setDimensions: function(height, width) { - var d = { }; - if (this.options.scaleX) d.width = width.round() + 'px'; - if (this.options.scaleY) d.height = height.round() + 'px'; - if (this.options.scaleFromCenter) { - var topd = (height - this.dims[0])/2; - var leftd = (width - this.dims[1])/2; - if (this.elementPositioning == 'absolute') { - if (this.options.scaleY) d.top = this.originalTop-topd + 'px'; - if (this.options.scaleX) d.left = this.originalLeft-leftd + 'px'; - } else { - if (this.options.scaleY) d.top = -topd + 'px'; - if (this.options.scaleX) d.left = -leftd + 'px'; - } - } - this.element.setStyle(d); - } -}); - -Effect.Highlight = Class.create(Effect.Base, { - initialize: function(element) { - this.element = $(element); - if (!this.element) throw(Effect._elementDoesNotExistError); - var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || { }); - this.start(options); - }, - setup: function() { - // Prevent executing on elements not in the layout flow - if (this.element.getStyle('display')=='none') { this.cancel(); return; } - // Disable background image during the effect - this.oldStyle = { }; - if (!this.options.keepBackgroundImage) { - this.oldStyle.backgroundImage = this.element.getStyle('background-image'); - this.element.setStyle({backgroundImage: 'none'}); - } - if (!this.options.endcolor) - this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff'); - if (!this.options.restorecolor) - this.options.restorecolor = this.element.getStyle('background-color'); - // init color calculations - this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this)); - this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this)); - }, - update: function(position) { - this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){ - return m+((this._base[i]+(this._delta[i]*position)).round().toColorPart()); }.bind(this)) }); - }, - finish: function() { - this.element.setStyle(Object.extend(this.oldStyle, { - backgroundColor: this.options.restorecolor - })); - } -}); - -Effect.ScrollTo = function(element) { - var options = arguments[1] || { }, - scrollOffsets = document.viewport.getScrollOffsets(), - elementOffsets = $(element).cumulativeOffset(); - - if (options.offset) elementOffsets[1] += options.offset; - - return new Effect.Tween(null, - scrollOffsets.top, - elementOffsets[1], - options, - function(p){ scrollTo(scrollOffsets.left, p.round()); } - ); -}; - -/* ------------- combination effects ------------- */ - -Effect.Fade = function(element) { - element = $(element); - var oldOpacity = element.getInlineOpacity(); - var options = Object.extend({ - from: element.getOpacity() || 1.0, - to: 0.0, - afterFinishInternal: function(effect) { - if (effect.options.to!=0) return; - effect.element.hide().setStyle({opacity: oldOpacity}); - } - }, arguments[1] || { }); - return new Effect.Opacity(element,options); -}; - -Effect.Appear = function(element) { - element = $(element); - var options = Object.extend({ - from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0), - to: 1.0, - // force Safari to render floated elements properly - afterFinishInternal: function(effect) { - effect.element.forceRerendering(); - }, - beforeSetup: function(effect) { - effect.element.setOpacity(effect.options.from).show(); - }}, arguments[1] || { }); - return new Effect.Opacity(element,options); -}; - -Effect.Puff = function(element) { - element = $(element); - var oldStyle = { - opacity: element.getInlineOpacity(), - position: element.getStyle('position'), - top: element.style.top, - left: element.style.left, - width: element.style.width, - height: element.style.height - }; - return new Effect.Parallel( - [ new Effect.Scale(element, 200, - { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), - new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], - Object.extend({ duration: 1.0, - beforeSetupInternal: function(effect) { - Position.absolutize(effect.effects[0].element); - }, - afterFinishInternal: function(effect) { - effect.effects[0].element.hide().setStyle(oldStyle); } - }, arguments[1] || { }) - ); -}; - -Effect.BlindUp = function(element) { - element = $(element); - element.makeClipping(); - return new Effect.Scale(element, 0, - Object.extend({ scaleContent: false, - scaleX: false, - restoreAfterFinish: true, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping(); - } - }, arguments[1] || { }) - ); -}; - -Effect.BlindDown = function(element) { - element = $(element); - var elementDimensions = element.getDimensions(); - return new Effect.Scale(element, 100, Object.extend({ - scaleContent: false, - scaleX: false, - scaleFrom: 0, - scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, - restoreAfterFinish: true, - afterSetup: function(effect) { - effect.element.makeClipping().setStyle({height: '0px'}).show(); - }, - afterFinishInternal: function(effect) { - effect.element.undoClipping(); - } - }, arguments[1] || { })); -}; - -Effect.SwitchOff = function(element) { - element = $(element); - var oldOpacity = element.getInlineOpacity(); - return new Effect.Appear(element, Object.extend({ - duration: 0.4, - from: 0, - transition: Effect.Transitions.flicker, - afterFinishInternal: function(effect) { - new Effect.Scale(effect.element, 1, { - duration: 0.3, scaleFromCenter: true, - scaleX: false, scaleContent: false, restoreAfterFinish: true, - beforeSetup: function(effect) { - effect.element.makePositioned().makeClipping(); - }, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity}); - } - }); - } - }, arguments[1] || { })); -}; - -Effect.DropOut = function(element) { - element = $(element); - var oldStyle = { - top: element.getStyle('top'), - left: element.getStyle('left'), - opacity: element.getInlineOpacity() }; - return new Effect.Parallel( - [ new Effect.Move(element, {x: 0, y: 100, sync: true }), - new Effect.Opacity(element, { sync: true, to: 0.0 }) ], - Object.extend( - { duration: 0.5, - beforeSetup: function(effect) { - effect.effects[0].element.makePositioned(); - }, - afterFinishInternal: function(effect) { - effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle); - } - }, arguments[1] || { })); -}; - -Effect.Shake = function(element) { - element = $(element); - var options = Object.extend({ - distance: 20, - duration: 0.5 - }, arguments[1] || {}); - var distance = parseFloat(options.distance); - var split = parseFloat(options.duration) / 10.0; - var oldStyle = { - top: element.getStyle('top'), - left: element.getStyle('left') }; - return new Effect.Move(element, - { x: distance, y: 0, duration: split, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: -distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: -distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: -distance, y: 0, duration: split, afterFinishInternal: function(effect) { - effect.element.undoPositioned().setStyle(oldStyle); - }}); }}); }}); }}); }}); }}); -}; - -Effect.SlideDown = function(element) { - element = $(element).cleanWhitespace(); - // SlideDown need to have the content of the element wrapped in a container element with fixed height! - var oldInnerBottom = element.down().getStyle('bottom'); - var elementDimensions = element.getDimensions(); - return new Effect.Scale(element, 100, Object.extend({ - scaleContent: false, - scaleX: false, - scaleFrom: window.opera ? 0 : 1, - scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, - restoreAfterFinish: true, - afterSetup: function(effect) { - effect.element.makePositioned(); - effect.element.down().makePositioned(); - if (window.opera) effect.element.setStyle({top: ''}); - effect.element.makeClipping().setStyle({height: '0px'}).show(); - }, - afterUpdateInternal: function(effect) { - effect.element.down().setStyle({bottom: - (effect.dims[0] - effect.element.clientHeight) + 'px' }); - }, - afterFinishInternal: function(effect) { - effect.element.undoClipping().undoPositioned(); - effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); } - }, arguments[1] || { }) - ); -}; - -Effect.SlideUp = function(element) { - element = $(element).cleanWhitespace(); - var oldInnerBottom = element.down().getStyle('bottom'); - var elementDimensions = element.getDimensions(); - return new Effect.Scale(element, window.opera ? 0 : 1, - Object.extend({ scaleContent: false, - scaleX: false, - scaleMode: 'box', - scaleFrom: 100, - scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, - restoreAfterFinish: true, - afterSetup: function(effect) { - effect.element.makePositioned(); - effect.element.down().makePositioned(); - if (window.opera) effect.element.setStyle({top: ''}); - effect.element.makeClipping().show(); - }, - afterUpdateInternal: function(effect) { - effect.element.down().setStyle({bottom: - (effect.dims[0] - effect.element.clientHeight) + 'px' }); - }, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping().undoPositioned(); - effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); - } - }, arguments[1] || { }) - ); -}; - -// Bug in opera makes the TD containing this element expand for a instance after finish -Effect.Squish = function(element) { - return new Effect.Scale(element, window.opera ? 1 : 0, { - restoreAfterFinish: true, - beforeSetup: function(effect) { - effect.element.makeClipping(); - }, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping(); - } - }); -}; - -Effect.Grow = function(element) { - element = $(element); - var options = Object.extend({ - direction: 'center', - moveTransition: Effect.Transitions.sinoidal, - scaleTransition: Effect.Transitions.sinoidal, - opacityTransition: Effect.Transitions.full - }, arguments[1] || { }); - var oldStyle = { - top: element.style.top, - left: element.style.left, - height: element.style.height, - width: element.style.width, - opacity: element.getInlineOpacity() }; - - var dims = element.getDimensions(); - var initialMoveX, initialMoveY; - var moveX, moveY; - - switch (options.direction) { - case 'top-left': - initialMoveX = initialMoveY = moveX = moveY = 0; - break; - case 'top-right': - initialMoveX = dims.width; - initialMoveY = moveY = 0; - moveX = -dims.width; - break; - case 'bottom-left': - initialMoveX = moveX = 0; - initialMoveY = dims.height; - moveY = -dims.height; - break; - case 'bottom-right': - initialMoveX = dims.width; - initialMoveY = dims.height; - moveX = -dims.width; - moveY = -dims.height; - break; - case 'center': - initialMoveX = dims.width / 2; - initialMoveY = dims.height / 2; - moveX = -dims.width / 2; - moveY = -dims.height / 2; - break; - } - - return new Effect.Move(element, { - x: initialMoveX, - y: initialMoveY, - duration: 0.01, - beforeSetup: function(effect) { - effect.element.hide().makeClipping().makePositioned(); - }, - afterFinishInternal: function(effect) { - new Effect.Parallel( - [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }), - new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }), - new Effect.Scale(effect.element, 100, { - scaleMode: { originalHeight: dims.height, originalWidth: dims.width }, - sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true}) - ], Object.extend({ - beforeSetup: function(effect) { - effect.effects[0].element.setStyle({height: '0px'}).show(); - }, - afterFinishInternal: function(effect) { - effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle); - } - }, options) - ); - } - }); -}; - -Effect.Shrink = function(element) { - element = $(element); - var options = Object.extend({ - direction: 'center', - moveTransition: Effect.Transitions.sinoidal, - scaleTransition: Effect.Transitions.sinoidal, - opacityTransition: Effect.Transitions.none - }, arguments[1] || { }); - var oldStyle = { - top: element.style.top, - left: element.style.left, - height: element.style.height, - width: element.style.width, - opacity: element.getInlineOpacity() }; - - var dims = element.getDimensions(); - var moveX, moveY; - - switch (options.direction) { - case 'top-left': - moveX = moveY = 0; - break; - case 'top-right': - moveX = dims.width; - moveY = 0; - break; - case 'bottom-left': - moveX = 0; - moveY = dims.height; - break; - case 'bottom-right': - moveX = dims.width; - moveY = dims.height; - break; - case 'center': - moveX = dims.width / 2; - moveY = dims.height / 2; - break; - } - - return new Effect.Parallel( - [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }), - new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}), - new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }) - ], Object.extend({ - beforeStartInternal: function(effect) { - effect.effects[0].element.makePositioned().makeClipping(); - }, - afterFinishInternal: function(effect) { - effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); } - }, options) - ); -}; - -Effect.Pulsate = function(element) { - element = $(element); - var options = arguments[1] || { }, - oldOpacity = element.getInlineOpacity(), - transition = options.transition || Effect.Transitions.linear, - reverser = function(pos){ - return 1 - transition((-Math.cos((pos*(options.pulses||5)*2)*Math.PI)/2) + .5); - }; - - return new Effect.Opacity(element, - Object.extend(Object.extend({ duration: 2.0, from: 0, - afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); } - }, options), {transition: reverser})); -}; - -Effect.Fold = function(element) { - element = $(element); - var oldStyle = { - top: element.style.top, - left: element.style.left, - width: element.style.width, - height: element.style.height }; - element.makeClipping(); - return new Effect.Scale(element, 5, Object.extend({ - scaleContent: false, - scaleX: false, - afterFinishInternal: function(effect) { - new Effect.Scale(element, 1, { - scaleContent: false, - scaleY: false, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping().setStyle(oldStyle); - } }); - }}, arguments[1] || { })); -}; - -Effect.Morph = Class.create(Effect.Base, { - initialize: function(element) { - this.element = $(element); - if (!this.element) throw(Effect._elementDoesNotExistError); - var options = Object.extend({ - style: { } - }, arguments[1] || { }); - - if (!Object.isString(options.style)) this.style = $H(options.style); - else { - if (options.style.include(':')) - this.style = options.style.parseStyle(); - else { - this.element.addClassName(options.style); - this.style = $H(this.element.getStyles()); - this.element.removeClassName(options.style); - var css = this.element.getStyles(); - this.style = this.style.reject(function(style) { - return style.value == css[style.key]; - }); - options.afterFinishInternal = function(effect) { - effect.element.addClassName(effect.options.style); - effect.transforms.each(function(transform) { - effect.element.style[transform.style] = ''; - }); - }; - } - } - this.start(options); - }, - - setup: function(){ - function parseColor(color){ - if (!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff'; - color = color.parseColor(); - return $R(0,2).map(function(i){ - return parseInt( color.slice(i*2+1,i*2+3), 16 ); - }); - } - this.transforms = this.style.map(function(pair){ - var property = pair[0], value = pair[1], unit = null; - - if (value.parseColor('#zzzzzz') != '#zzzzzz') { - value = value.parseColor(); - unit = 'color'; - } else if (property == 'opacity') { - value = parseFloat(value); - if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout)) - this.element.setStyle({zoom: 1}); - } else if (Element.CSS_LENGTH.test(value)) { - var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/); - value = parseFloat(components[1]); - unit = (components.length == 3) ? components[2] : null; - } - - var originalValue = this.element.getStyle(property); - return { - style: property.camelize(), - originalValue: unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0), - targetValue: unit=='color' ? parseColor(value) : value, - unit: unit - }; - }.bind(this)).reject(function(transform){ - return ( - (transform.originalValue == transform.targetValue) || - ( - transform.unit != 'color' && - (isNaN(transform.originalValue) || isNaN(transform.targetValue)) - ) - ); - }); - }, - update: function(position) { - var style = { }, transform, i = this.transforms.length; - while(i--) - style[(transform = this.transforms[i]).style] = - transform.unit=='color' ? '#'+ - (Math.round(transform.originalValue[0]+ - (transform.targetValue[0]-transform.originalValue[0])*position)).toColorPart() + - (Math.round(transform.originalValue[1]+ - (transform.targetValue[1]-transform.originalValue[1])*position)).toColorPart() + - (Math.round(transform.originalValue[2]+ - (transform.targetValue[2]-transform.originalValue[2])*position)).toColorPart() : - (transform.originalValue + - (transform.targetValue - transform.originalValue) * position).toFixed(3) + - (transform.unit === null ? '' : transform.unit); - this.element.setStyle(style, true); - } -}); - -Effect.Transform = Class.create({ - initialize: function(tracks){ - this.tracks = []; - this.options = arguments[1] || { }; - this.addTracks(tracks); - }, - addTracks: function(tracks){ - tracks.each(function(track){ - track = $H(track); - var data = track.values().first(); - this.tracks.push($H({ - ids: track.keys().first(), - effect: Effect.Morph, - options: { style: data } - })); - }.bind(this)); - return this; - }, - play: function(){ - return new Effect.Parallel( - this.tracks.map(function(track){ - var ids = track.get('ids'), effect = track.get('effect'), options = track.get('options'); - var elements = [$(ids) || $$(ids)].flatten(); - return elements.map(function(e){ return new effect(e, Object.extend({ sync:true }, options)) }); - }).flatten(), - this.options - ); - } -}); - -Element.CSS_PROPERTIES = $w( - 'backgroundColor backgroundPosition borderBottomColor borderBottomStyle ' + - 'borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth ' + - 'borderRightColor borderRightStyle borderRightWidth borderSpacing ' + - 'borderTopColor borderTopStyle borderTopWidth bottom clip color ' + - 'fontSize fontWeight height left letterSpacing lineHeight ' + - 'marginBottom marginLeft marginRight marginTop markerOffset maxHeight '+ - 'maxWidth minHeight minWidth opacity outlineColor outlineOffset ' + - 'outlineWidth paddingBottom paddingLeft paddingRight paddingTop ' + - 'right textIndent top width wordSpacing zIndex'); - -Element.CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/; - -String.__parseStyleElement = document.createElement('div'); -String.prototype.parseStyle = function(){ - var style, styleRules = $H(); - if (Prototype.Browser.WebKit) - style = new Element('div',{style:this}).style; - else { - String.__parseStyleElement.innerHTML = '
    '; - style = String.__parseStyleElement.childNodes[0].style; - } - - Element.CSS_PROPERTIES.each(function(property){ - if (style[property]) styleRules.set(property, style[property]); - }); - - if (Prototype.Browser.IE && this.include('opacity')) - styleRules.set('opacity', this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]); - - return styleRules; -}; - -if (document.defaultView && document.defaultView.getComputedStyle) { - Element.getStyles = function(element) { - var css = document.defaultView.getComputedStyle($(element), null); - return Element.CSS_PROPERTIES.inject({ }, function(styles, property) { - styles[property] = css[property]; - return styles; - }); - }; -} else { - Element.getStyles = function(element) { - element = $(element); - var css = element.currentStyle, styles; - styles = Element.CSS_PROPERTIES.inject({ }, function(results, property) { - results[property] = css[property]; - return results; - }); - if (!styles.opacity) styles.opacity = element.getOpacity(); - return styles; - }; -} - -Effect.Methods = { - morph: function(element, style) { - element = $(element); - new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || { })); - return element; - }, - visualEffect: function(element, effect, options) { - element = $(element); - var s = effect.dasherize().camelize(), klass = s.charAt(0).toUpperCase() + s.substring(1); - new Effect[klass](element, options); - return element; - }, - highlight: function(element, options) { - element = $(element); - new Effect.Highlight(element, options); - return element; - } -}; - -$w('fade appear grow shrink fold blindUp blindDown slideUp slideDown '+ - 'pulsate shake puff squish switchOff dropOut').each( - function(effect) { - Effect.Methods[effect] = function(element, options){ - element = $(element); - Effect[effect.charAt(0).toUpperCase() + effect.substring(1)](element, options); - return element; - }; - } -); - -$w('getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles').each( - function(f) { Effect.Methods[f] = Element[f]; } -); - -Element.addMethods(Effect.Methods); \ No newline at end of file diff --git a/scorecard_tool/web-app/js/prototype/prototype.js b/scorecard_tool/web-app/js/prototype/prototype.js deleted file mode 100644 index 9fe6e1243..000000000 --- a/scorecard_tool/web-app/js/prototype/prototype.js +++ /dev/null @@ -1,4874 +0,0 @@ -/* Prototype JavaScript framework, version 1.6.1 - * (c) 2005-2009 Sam Stephenson - * - * Prototype is freely distributable under the terms of an MIT-style license. - * For details, see the Prototype web site: http://www.prototypejs.org/ - * - *--------------------------------------------------------------------------*/ - -var Prototype = { - Version: '1.6.1', - - Browser: (function(){ - var ua = navigator.userAgent; - var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]'; - return { - IE: !!window.attachEvent && !isOpera, - Opera: isOpera, - WebKit: ua.indexOf('AppleWebKit/') > -1, - Gecko: ua.indexOf('Gecko') > -1 && ua.indexOf('KHTML') === -1, - MobileSafari: /Apple.*Mobile.*Safari/.test(ua) - } - })(), - - BrowserFeatures: { - XPath: !!document.evaluate, - SelectorsAPI: !!document.querySelector, - ElementExtensions: (function() { - var constructor = window.Element || window.HTMLElement; - return !!(constructor && constructor.prototype); - })(), - SpecificElementExtensions: (function() { - if (typeof window.HTMLDivElement !== 'undefined') - return true; - - var div = document.createElement('div'); - var form = document.createElement('form'); - var isSupported = false; - - if (div['__proto__'] && (div['__proto__'] !== form['__proto__'])) { - isSupported = true; - } - - div = form = null; - - return isSupported; - })() - }, - - ScriptFragment: ']*>([\\S\\s]*?)<\/script>', - JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/, - - emptyFunction: function() { }, - K: function(x) { return x } -}; - -if (Prototype.Browser.MobileSafari) - Prototype.BrowserFeatures.SpecificElementExtensions = false; - - -var Abstract = { }; - - -var Try = { - these: function() { - var returnValue; - - for (var i = 0, length = arguments.length; i < length; i++) { - var lambda = arguments[i]; - try { - returnValue = lambda(); - break; - } catch (e) { } - } - - return returnValue; - } -}; - -/* Based on Alex Arnell's inheritance implementation. */ - -var Class = (function() { - function subclass() {}; - function create() { - var parent = null, properties = $A(arguments); - if (Object.isFunction(properties[0])) - parent = properties.shift(); - - function klass() { - this.initialize.apply(this, arguments); - } - - Object.extend(klass, Class.Methods); - klass.superclass = parent; - klass.subclasses = []; - - if (parent) { - subclass.prototype = parent.prototype; - klass.prototype = new subclass; - parent.subclasses.push(klass); - } - - for (var i = 0; i < properties.length; i++) - klass.addMethods(properties[i]); - - if (!klass.prototype.initialize) - klass.prototype.initialize = Prototype.emptyFunction; - - klass.prototype.constructor = klass; - return klass; - } - - function addMethods(source) { - var ancestor = this.superclass && this.superclass.prototype; - var properties = Object.keys(source); - - if (!Object.keys({ toString: true }).length) { - if (source.toString != Object.prototype.toString) - properties.push("toString"); - if (source.valueOf != Object.prototype.valueOf) - properties.push("valueOf"); - } - - for (var i = 0, length = properties.length; i < length; i++) { - var property = properties[i], value = source[property]; - if (ancestor && Object.isFunction(value) && - value.argumentNames().first() == "$super") { - var method = value; - value = (function(m) { - return function() { return ancestor[m].apply(this, arguments); }; - })(property).wrap(method); - - value.valueOf = method.valueOf.bind(method); - value.toString = method.toString.bind(method); - } - this.prototype[property] = value; - } - - return this; - } - - return { - create: create, - Methods: { - addMethods: addMethods - } - }; -})(); -(function() { - - var _toString = Object.prototype.toString; - - function extend(destination, source) { - for (var property in source) - destination[property] = source[property]; - return destination; - } - - function inspect(object) { - try { - if (isUndefined(object)) return 'undefined'; - if (object === null) return 'null'; - return object.inspect ? object.inspect() : String(object); - } catch (e) { - if (e instanceof RangeError) return '...'; - throw e; - } - } - - function toJSON(object) { - var type = typeof object; - switch (type) { - case 'undefined': - case 'function': - case 'unknown': return; - case 'boolean': return object.toString(); - } - - if (object === null) return 'null'; - if (object.toJSON) return object.toJSON(); - if (isElement(object)) return; - - var results = []; - for (var property in object) { - var value = toJSON(object[property]); - if (!isUndefined(value)) - results.push(property.toJSON() + ': ' + value); - } - - return '{' + results.join(', ') + '}'; - } - - function toQueryString(object) { - return $H(object).toQueryString(); - } - - function toHTML(object) { - return object && object.toHTML ? object.toHTML() : String.interpret(object); - } - - function keys(object) { - var results = []; - for (var property in object) - results.push(property); - return results; - } - - function values(object) { - var results = []; - for (var property in object) - results.push(object[property]); - return results; - } - - function clone(object) { - return extend({ }, object); - } - - function isElement(object) { - return !!(object && object.nodeType == 1); - } - - function isArray(object) { - return _toString.call(object) == "[object Array]"; - } - - - function isHash(object) { - return object instanceof Hash; - } - - function isFunction(object) { - return typeof object === "function"; - } - - function isString(object) { - return _toString.call(object) == "[object String]"; - } - - function isNumber(object) { - return _toString.call(object) == "[object Number]"; - } - - function isUndefined(object) { - return typeof object === "undefined"; - } - - extend(Object, { - extend: extend, - inspect: inspect, - toJSON: toJSON, - toQueryString: toQueryString, - toHTML: toHTML, - keys: keys, - values: values, - clone: clone, - isElement: isElement, - isArray: isArray, - isHash: isHash, - isFunction: isFunction, - isString: isString, - isNumber: isNumber, - isUndefined: isUndefined - }); -})(); -Object.extend(Function.prototype, (function() { - var slice = Array.prototype.slice; - - function update(array, args) { - var arrayLength = array.length, length = args.length; - while (length--) array[arrayLength + length] = args[length]; - return array; - } - - function merge(array, args) { - array = slice.call(array, 0); - return update(array, args); - } - - function argumentNames() { - var names = this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1] - .replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g, '') - .replace(/\s+/g, '').split(','); - return names.length == 1 && !names[0] ? [] : names; - } - - function bind(context) { - if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this; - var __method = this, args = slice.call(arguments, 1); - return function() { - var a = merge(args, arguments); - return __method.apply(context, a); - } - } - - function bindAsEventListener(context) { - var __method = this, args = slice.call(arguments, 1); - return function(event) { - var a = update([event || window.event], args); - return __method.apply(context, a); - } - } - - function curry() { - if (!arguments.length) return this; - var __method = this, args = slice.call(arguments, 0); - return function() { - var a = merge(args, arguments); - return __method.apply(this, a); - } - } - - function delay(timeout) { - var __method = this, args = slice.call(arguments, 1); - timeout = timeout * 1000 - return window.setTimeout(function() { - return __method.apply(__method, args); - }, timeout); - } - - function defer() { - var args = update([0.01], arguments); - return this.delay.apply(this, args); - } - - function wrap(wrapper) { - var __method = this; - return function() { - var a = update([__method.bind(this)], arguments); - return wrapper.apply(this, a); - } - } - - function methodize() { - if (this._methodized) return this._methodized; - var __method = this; - return this._methodized = function() { - var a = update([this], arguments); - return __method.apply(null, a); - }; - } - - return { - argumentNames: argumentNames, - bind: bind, - bindAsEventListener: bindAsEventListener, - curry: curry, - delay: delay, - defer: defer, - wrap: wrap, - methodize: methodize - } -})()); - - -Date.prototype.toJSON = function() { - return '"' + this.getUTCFullYear() + '-' + - (this.getUTCMonth() + 1).toPaddedString(2) + '-' + - this.getUTCDate().toPaddedString(2) + 'T' + - this.getUTCHours().toPaddedString(2) + ':' + - this.getUTCMinutes().toPaddedString(2) + ':' + - this.getUTCSeconds().toPaddedString(2) + 'Z"'; -}; - - -RegExp.prototype.match = RegExp.prototype.test; - -RegExp.escape = function(str) { - return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); -}; -var PeriodicalExecuter = Class.create({ - initialize: function(callback, frequency) { - this.callback = callback; - this.frequency = frequency; - this.currentlyExecuting = false; - - this.registerCallback(); - }, - - registerCallback: function() { - this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - execute: function() { - this.callback(this); - }, - - stop: function() { - if (!this.timer) return; - clearInterval(this.timer); - this.timer = null; - }, - - onTimerEvent: function() { - if (!this.currentlyExecuting) { - try { - this.currentlyExecuting = true; - this.execute(); - this.currentlyExecuting = false; - } catch(e) { - this.currentlyExecuting = false; - throw e; - } - } - } -}); -Object.extend(String, { - interpret: function(value) { - return value == null ? '' : String(value); - }, - specialChar: { - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '\\': '\\\\' - } -}); - -Object.extend(String.prototype, (function() { - - function prepareReplacement(replacement) { - if (Object.isFunction(replacement)) return replacement; - var template = new Template(replacement); - return function(match) { return template.evaluate(match) }; - } - - function gsub(pattern, replacement) { - var result = '', source = this, match; - replacement = prepareReplacement(replacement); - - if (Object.isString(pattern)) - pattern = RegExp.escape(pattern); - - if (!(pattern.length || pattern.source)) { - replacement = replacement(''); - return replacement + source.split('').join(replacement) + replacement; - } - - while (source.length > 0) { - if (match = source.match(pattern)) { - result += source.slice(0, match.index); - result += String.interpret(replacement(match)); - source = source.slice(match.index + match[0].length); - } else { - result += source, source = ''; - } - } - return result; - } - - function sub(pattern, replacement, count) { - replacement = prepareReplacement(replacement); - count = Object.isUndefined(count) ? 1 : count; - - return this.gsub(pattern, function(match) { - if (--count < 0) return match[0]; - return replacement(match); - }); - } - - function scan(pattern, iterator) { - this.gsub(pattern, iterator); - return String(this); - } - - function truncate(length, truncation) { - length = length || 30; - truncation = Object.isUndefined(truncation) ? '...' : truncation; - return this.length > length ? - this.slice(0, length - truncation.length) + truncation : String(this); - } - - function strip() { - return this.replace(/^\s+/, '').replace(/\s+$/, ''); - } - - function stripTags() { - return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi, ''); - } - - function stripScripts() { - return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); - } - - function extractScripts() { - var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); - var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); - return (this.match(matchAll) || []).map(function(scriptTag) { - return (scriptTag.match(matchOne) || ['', ''])[1]; - }); - } - - function evalScripts() { - return this.extractScripts().map(function(script) { return eval(script) }); - } - - function escapeHTML() { - return this.replace(/&/g,'&').replace(//g,'>'); - } - - function unescapeHTML() { - return this.stripTags().replace(/</g,'<').replace(/>/g,'>').replace(/&/g,'&'); - } - - - function toQueryParams(separator) { - var match = this.strip().match(/([^?#]*)(#.*)?$/); - if (!match) return { }; - - return match[1].split(separator || '&').inject({ }, function(hash, pair) { - if ((pair = pair.split('='))[0]) { - var key = decodeURIComponent(pair.shift()); - var value = pair.length > 1 ? pair.join('=') : pair[0]; - if (value != undefined) value = decodeURIComponent(value); - - if (key in hash) { - if (!Object.isArray(hash[key])) hash[key] = [hash[key]]; - hash[key].push(value); - } - else hash[key] = value; - } - return hash; - }); - } - - function toArray() { - return this.split(''); - } - - function succ() { - return this.slice(0, this.length - 1) + - String.fromCharCode(this.charCodeAt(this.length - 1) + 1); - } - - function times(count) { - return count < 1 ? '' : new Array(count + 1).join(this); - } - - function camelize() { - var parts = this.split('-'), len = parts.length; - if (len == 1) return parts[0]; - - var camelized = this.charAt(0) == '-' - ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1) - : parts[0]; - - for (var i = 1; i < len; i++) - camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1); - - return camelized; - } - - function capitalize() { - return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); - } - - function underscore() { - return this.replace(/::/g, '/') - .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2') - .replace(/([a-z\d])([A-Z])/g, '$1_$2') - .replace(/-/g, '_') - .toLowerCase(); - } - - function dasherize() { - return this.replace(/_/g, '-'); - } - - function inspect(useDoubleQuotes) { - var escapedString = this.replace(/[\x00-\x1f\\]/g, function(character) { - if (character in String.specialChar) { - return String.specialChar[character]; - } - return '\\u00' + character.charCodeAt().toPaddedString(2, 16); - }); - if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"'; - return "'" + escapedString.replace(/'/g, '\\\'') + "'"; - } - - function toJSON() { - return this.inspect(true); - } - - function unfilterJSON(filter) { - return this.replace(filter || Prototype.JSONFilter, '$1'); - } - - function isJSON() { - var str = this; - if (str.blank()) return false; - str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''); - return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str); - } - - function evalJSON(sanitize) { - var json = this.unfilterJSON(); - try { - if (!sanitize || json.isJSON()) return eval('(' + json + ')'); - } catch (e) { } - throw new SyntaxError('Badly formed JSON string: ' + this.inspect()); - } - - function include(pattern) { - return this.indexOf(pattern) > -1; - } - - function startsWith(pattern) { - return this.indexOf(pattern) === 0; - } - - function endsWith(pattern) { - var d = this.length - pattern.length; - return d >= 0 && this.lastIndexOf(pattern) === d; - } - - function empty() { - return this == ''; - } - - function blank() { - return /^\s*$/.test(this); - } - - function interpolate(object, pattern) { - return new Template(this, pattern).evaluate(object); - } - - return { - gsub: gsub, - sub: sub, - scan: scan, - truncate: truncate, - strip: String.prototype.trim ? String.prototype.trim : strip, - stripTags: stripTags, - stripScripts: stripScripts, - extractScripts: extractScripts, - evalScripts: evalScripts, - escapeHTML: escapeHTML, - unescapeHTML: unescapeHTML, - toQueryParams: toQueryParams, - parseQuery: toQueryParams, - toArray: toArray, - succ: succ, - times: times, - camelize: camelize, - capitalize: capitalize, - underscore: underscore, - dasherize: dasherize, - inspect: inspect, - toJSON: toJSON, - unfilterJSON: unfilterJSON, - isJSON: isJSON, - evalJSON: evalJSON, - include: include, - startsWith: startsWith, - endsWith: endsWith, - empty: empty, - blank: blank, - interpolate: interpolate - }; -})()); - -var Template = Class.create({ - initialize: function(template, pattern) { - this.template = template.toString(); - this.pattern = pattern || Template.Pattern; - }, - - evaluate: function(object) { - if (object && Object.isFunction(object.toTemplateReplacements)) - object = object.toTemplateReplacements(); - - return this.template.gsub(this.pattern, function(match) { - if (object == null) return (match[1] + ''); - - var before = match[1] || ''; - if (before == '\\') return match[2]; - - var ctx = object, expr = match[3]; - var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/; - match = pattern.exec(expr); - if (match == null) return before; - - while (match != null) { - var comp = match[1].startsWith('[') ? match[2].replace(/\\\\]/g, ']') : match[1]; - ctx = ctx[comp]; - if (null == ctx || '' == match[3]) break; - expr = expr.substring('[' == match[3] ? match[1].length : match[0].length); - match = pattern.exec(expr); - } - - return before + String.interpret(ctx); - }); - } -}); -Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/; - -var $break = { }; - -var Enumerable = (function() { - function each(iterator, context) { - var index = 0; - try { - this._each(function(value) { - iterator.call(context, value, index++); - }); - } catch (e) { - if (e != $break) throw e; - } - return this; - } - - function eachSlice(number, iterator, context) { - var index = -number, slices = [], array = this.toArray(); - if (number < 1) return array; - while ((index += number) < array.length) - slices.push(array.slice(index, index+number)); - return slices.collect(iterator, context); - } - - function all(iterator, context) { - iterator = iterator || Prototype.K; - var result = true; - this.each(function(value, index) { - result = result && !!iterator.call(context, value, index); - if (!result) throw $break; - }); - return result; - } - - function any(iterator, context) { - iterator = iterator || Prototype.K; - var result = false; - this.each(function(value, index) { - if (result = !!iterator.call(context, value, index)) - throw $break; - }); - return result; - } - - function collect(iterator, context) { - iterator = iterator || Prototype.K; - var results = []; - this.each(function(value, index) { - results.push(iterator.call(context, value, index)); - }); - return results; - } - - function detect(iterator, context) { - var result; - this.each(function(value, index) { - if (iterator.call(context, value, index)) { - result = value; - throw $break; - } - }); - return result; - } - - function findAll(iterator, context) { - var results = []; - this.each(function(value, index) { - if (iterator.call(context, value, index)) - results.push(value); - }); - return results; - } - - function grep(filter, iterator, context) { - iterator = iterator || Prototype.K; - var results = []; - - if (Object.isString(filter)) - filter = new RegExp(RegExp.escape(filter)); - - this.each(function(value, index) { - if (filter.match(value)) - results.push(iterator.call(context, value, index)); - }); - return results; - } - - function include(object) { - if (Object.isFunction(this.indexOf)) - if (this.indexOf(object) != -1) return true; - - var found = false; - this.each(function(value) { - if (value == object) { - found = true; - throw $break; - } - }); - return found; - } - - function inGroupsOf(number, fillWith) { - fillWith = Object.isUndefined(fillWith) ? null : fillWith; - return this.eachSlice(number, function(slice) { - while(slice.length < number) slice.push(fillWith); - return slice; - }); - } - - function inject(memo, iterator, context) { - this.each(function(value, index) { - memo = iterator.call(context, memo, value, index); - }); - return memo; - } - - function invoke(method) { - var args = $A(arguments).slice(1); - return this.map(function(value) { - return value[method].apply(value, args); - }); - } - - function max(iterator, context) { - iterator = iterator || Prototype.K; - var result; - this.each(function(value, index) { - value = iterator.call(context, value, index); - if (result == null || value >= result) - result = value; - }); - return result; - } - - function min(iterator, context) { - iterator = iterator || Prototype.K; - var result; - this.each(function(value, index) { - value = iterator.call(context, value, index); - if (result == null || value < result) - result = value; - }); - return result; - } - - function partition(iterator, context) { - iterator = iterator || Prototype.K; - var trues = [], falses = []; - this.each(function(value, index) { - (iterator.call(context, value, index) ? - trues : falses).push(value); - }); - return [trues, falses]; - } - - function pluck(property) { - var results = []; - this.each(function(value) { - results.push(value[property]); - }); - return results; - } - - function reject(iterator, context) { - var results = []; - this.each(function(value, index) { - if (!iterator.call(context, value, index)) - results.push(value); - }); - return results; - } - - function sortBy(iterator, context) { - return this.map(function(value, index) { - return { - value: value, - criteria: iterator.call(context, value, index) - }; - }).sort(function(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }).pluck('value'); - } - - function toArray() { - return this.map(); - } - - function zip() { - var iterator = Prototype.K, args = $A(arguments); - if (Object.isFunction(args.last())) - iterator = args.pop(); - - var collections = [this].concat(args).map($A); - return this.map(function(value, index) { - return iterator(collections.pluck(index)); - }); - } - - function size() { - return this.toArray().length; - } - - function inspect() { - return '#'; - } - - - - - - - - - - return { - each: each, - eachSlice: eachSlice, - all: all, - every: all, - any: any, - some: any, - collect: collect, - map: collect, - detect: detect, - findAll: findAll, - select: findAll, - filter: findAll, - grep: grep, - include: include, - member: include, - inGroupsOf: inGroupsOf, - inject: inject, - invoke: invoke, - max: max, - min: min, - partition: partition, - pluck: pluck, - reject: reject, - sortBy: sortBy, - toArray: toArray, - entries: toArray, - zip: zip, - size: size, - inspect: inspect, - find: detect - }; -})(); -function $A(iterable) { - if (!iterable) return []; - if ('toArray' in Object(iterable)) return iterable.toArray(); - var length = iterable.length || 0, results = new Array(length); - while (length--) results[length] = iterable[length]; - return results; -} - -function $w(string) { - if (!Object.isString(string)) return []; - string = string.strip(); - return string ? string.split(/\s+/) : []; -} - -Array.from = $A; - - -(function() { - var arrayProto = Array.prototype, - slice = arrayProto.slice, - _each = arrayProto.forEach; // use native browser JS 1.6 implementation if available - - function each(iterator) { - for (var i = 0, length = this.length; i < length; i++) - iterator(this[i]); - } - if (!_each) _each = each; - - function clear() { - this.length = 0; - return this; - } - - function first() { - return this[0]; - } - - function last() { - return this[this.length - 1]; - } - - function compact() { - return this.select(function(value) { - return value != null; - }); - } - - function flatten() { - return this.inject([], function(array, value) { - if (Object.isArray(value)) - return array.concat(value.flatten()); - array.push(value); - return array; - }); - } - - function without() { - var values = slice.call(arguments, 0); - return this.select(function(value) { - return !values.include(value); - }); - } - - function reverse(inline) { - return (inline !== false ? this : this.toArray())._reverse(); - } - - function uniq(sorted) { - return this.inject([], function(array, value, index) { - if (0 == index || (sorted ? array.last() != value : !array.include(value))) - array.push(value); - return array; - }); - } - - function intersect(array) { - return this.uniq().findAll(function(item) { - return array.detect(function(value) { return item === value }); - }); - } - - - function clone() { - return slice.call(this, 0); - } - - function size() { - return this.length; - } - - function inspect() { - return '[' + this.map(Object.inspect).join(', ') + ']'; - } - - function toJSON() { - var results = []; - this.each(function(object) { - var value = Object.toJSON(object); - if (!Object.isUndefined(value)) results.push(value); - }); - return '[' + results.join(', ') + ']'; - } - - function indexOf(item, i) { - i || (i = 0); - var length = this.length; - if (i < 0) i = length + i; - for (; i < length; i++) - if (this[i] === item) return i; - return -1; - } - - function lastIndexOf(item, i) { - i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1; - var n = this.slice(0, i).reverse().indexOf(item); - return (n < 0) ? n : i - n - 1; - } - - function concat() { - var array = slice.call(this, 0), item; - for (var i = 0, length = arguments.length; i < length; i++) { - item = arguments[i]; - if (Object.isArray(item) && !('callee' in item)) { - for (var j = 0, arrayLength = item.length; j < arrayLength; j++) - array.push(item[j]); - } else { - array.push(item); - } - } - return array; - } - - Object.extend(arrayProto, Enumerable); - - if (!arrayProto._reverse) - arrayProto._reverse = arrayProto.reverse; - - Object.extend(arrayProto, { - _each: _each, - clear: clear, - first: first, - last: last, - compact: compact, - flatten: flatten, - without: without, - reverse: reverse, - uniq: uniq, - intersect: intersect, - clone: clone, - toArray: clone, - size: size, - inspect: inspect, - toJSON: toJSON - }); - - var CONCAT_ARGUMENTS_BUGGY = (function() { - return [].concat(arguments)[0][0] !== 1; - })(1,2) - - if (CONCAT_ARGUMENTS_BUGGY) arrayProto.concat = concat; - - if (!arrayProto.indexOf) arrayProto.indexOf = indexOf; - if (!arrayProto.lastIndexOf) arrayProto.lastIndexOf = lastIndexOf; -})(); -function $H(object) { - return new Hash(object); -}; - -var Hash = Class.create(Enumerable, (function() { - function initialize(object) { - this._object = Object.isHash(object) ? object.toObject() : Object.clone(object); - } - - function _each(iterator) { - for (var key in this._object) { - var value = this._object[key], pair = [key, value]; - pair.key = key; - pair.value = value; - iterator(pair); - } - } - - function set(key, value) { - return this._object[key] = value; - } - - function get(key) { - if (this._object[key] !== Object.prototype[key]) - return this._object[key]; - } - - function unset(key) { - var value = this._object[key]; - delete this._object[key]; - return value; - } - - function toObject() { - return Object.clone(this._object); - } - - function keys() { - return this.pluck('key'); - } - - function values() { - return this.pluck('value'); - } - - function index(value) { - var match = this.detect(function(pair) { - return pair.value === value; - }); - return match && match.key; - } - - function merge(object) { - return this.clone().update(object); - } - - function update(object) { - return new Hash(object).inject(this, function(result, pair) { - result.set(pair.key, pair.value); - return result; - }); - } - - function toQueryPair(key, value) { - if (Object.isUndefined(value)) return key; - return key + '=' + encodeURIComponent(String.interpret(value)); - } - - function toQueryString() { - return this.inject([], function(results, pair) { - var key = encodeURIComponent(pair.key), values = pair.value; - - if (values && typeof values == 'object') { - if (Object.isArray(values)) - return results.concat(values.map(toQueryPair.curry(key))); - } else results.push(toQueryPair(key, values)); - return results; - }).join('&'); - } - - function inspect() { - return '#'; - } - - function toJSON() { - return Object.toJSON(this.toObject()); - } - - function clone() { - return new Hash(this); - } - - return { - initialize: initialize, - _each: _each, - set: set, - get: get, - unset: unset, - toObject: toObject, - toTemplateReplacements: toObject, - keys: keys, - values: values, - index: index, - merge: merge, - update: update, - toQueryString: toQueryString, - inspect: inspect, - toJSON: toJSON, - clone: clone - }; -})()); - -Hash.from = $H; -Object.extend(Number.prototype, (function() { - function toColorPart() { - return this.toPaddedString(2, 16); - } - - function succ() { - return this + 1; - } - - function times(iterator, context) { - $R(0, this, true).each(iterator, context); - return this; - } - - function toPaddedString(length, radix) { - var string = this.toString(radix || 10); - return '0'.times(length - string.length) + string; - } - - function toJSON() { - return isFinite(this) ? this.toString() : 'null'; - } - - function abs() { - return Math.abs(this); - } - - function round() { - return Math.round(this); - } - - function ceil() { - return Math.ceil(this); - } - - function floor() { - return Math.floor(this); - } - - return { - toColorPart: toColorPart, - succ: succ, - times: times, - toPaddedString: toPaddedString, - toJSON: toJSON, - abs: abs, - round: round, - ceil: ceil, - floor: floor - }; -})()); - -function $R(start, end, exclusive) { - return new ObjectRange(start, end, exclusive); -} - -var ObjectRange = Class.create(Enumerable, (function() { - function initialize(start, end, exclusive) { - this.start = start; - this.end = end; - this.exclusive = exclusive; - } - - function _each(iterator) { - var value = this.start; - while (this.include(value)) { - iterator(value); - value = value.succ(); - } - } - - function include(value) { - if (value < this.start) - return false; - if (this.exclusive) - return value < this.end; - return value <= this.end; - } - - return { - initialize: initialize, - _each: _each, - include: include - }; -})()); - - - -var Ajax = { - getTransport: function() { - return Try.these( - function() {return new XMLHttpRequest()}, - function() {return new ActiveXObject('Msxml2.XMLHTTP')}, - function() {return new ActiveXObject('Microsoft.XMLHTTP')} - ) || false; - }, - - activeRequestCount: 0 -}; - -Ajax.Responders = { - responders: [], - - _each: function(iterator) { - this.responders._each(iterator); - }, - - register: function(responder) { - if (!this.include(responder)) - this.responders.push(responder); - }, - - unregister: function(responder) { - this.responders = this.responders.without(responder); - }, - - dispatch: function(callback, request, transport, json) { - this.each(function(responder) { - if (Object.isFunction(responder[callback])) { - try { - responder[callback].apply(responder, [request, transport, json]); - } catch (e) { } - } - }); - } -}; - -Object.extend(Ajax.Responders, Enumerable); - -Ajax.Responders.register({ - onCreate: function() { Ajax.activeRequestCount++ }, - onComplete: function() { Ajax.activeRequestCount-- } -}); -Ajax.Base = Class.create({ - initialize: function(options) { - this.options = { - method: 'post', - asynchronous: true, - contentType: 'application/x-www-form-urlencoded', - encoding: 'UTF-8', - parameters: '', - evalJSON: true, - evalJS: true - }; - Object.extend(this.options, options || { }); - - this.options.method = this.options.method.toLowerCase(); - - if (Object.isString(this.options.parameters)) - this.options.parameters = this.options.parameters.toQueryParams(); - else if (Object.isHash(this.options.parameters)) - this.options.parameters = this.options.parameters.toObject(); - } -}); -Ajax.Request = Class.create(Ajax.Base, { - _complete: false, - - initialize: function($super, url, options) { - $super(options); - this.transport = Ajax.getTransport(); - this.request(url); - }, - - request: function(url) { - this.url = url; - this.method = this.options.method; - var params = Object.clone(this.options.parameters); - - if (!['get', 'post'].include(this.method)) { - params['_method'] = this.method; - this.method = 'post'; - } - - this.parameters = params; - - if (params = Object.toQueryString(params)) { - if (this.method == 'get') - this.url += (this.url.include('?') ? '&' : '?') + params; - else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) - params += '&_='; - } - - try { - var response = new Ajax.Response(this); - if (this.options.onCreate) this.options.onCreate(response); - Ajax.Responders.dispatch('onCreate', this, response); - - this.transport.open(this.method.toUpperCase(), this.url, - this.options.asynchronous); - - if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1); - - this.transport.onreadystatechange = this.onStateChange.bind(this); - this.setRequestHeaders(); - - this.body = this.method == 'post' ? (this.options.postBody || params) : null; - this.transport.send(this.body); - - /* Force Firefox to handle ready state 4 for synchronous requests */ - if (!this.options.asynchronous && this.transport.overrideMimeType) - this.onStateChange(); - - } - catch (e) { - this.dispatchException(e); - } - }, - - onStateChange: function() { - var readyState = this.transport.readyState; - if (readyState > 1 && !((readyState == 4) && this._complete)) - this.respondToReadyState(this.transport.readyState); - }, - - setRequestHeaders: function() { - var headers = { - 'X-Requested-With': 'XMLHttpRequest', - 'X-Prototype-Version': Prototype.Version, - 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' - }; - - if (this.method == 'post') { - headers['Content-type'] = this.options.contentType + - (this.options.encoding ? '; charset=' + this.options.encoding : ''); - - /* Force "Connection: close" for older Mozilla browsers to work - * around a bug where XMLHttpRequest sends an incorrect - * Content-length header. See Mozilla Bugzilla #246651. - */ - if (this.transport.overrideMimeType && - (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) - headers['Connection'] = 'close'; - } - - if (typeof this.options.requestHeaders == 'object') { - var extras = this.options.requestHeaders; - - if (Object.isFunction(extras.push)) - for (var i = 0, length = extras.length; i < length; i += 2) - headers[extras[i]] = extras[i+1]; - else - $H(extras).each(function(pair) { headers[pair.key] = pair.value }); - } - - for (var name in headers) - this.transport.setRequestHeader(name, headers[name]); - }, - - success: function() { - var status = this.getStatus(); - return !status || (status >= 200 && status < 300); - }, - - getStatus: function() { - try { - return this.transport.status || 0; - } catch (e) { return 0 } - }, - - respondToReadyState: function(readyState) { - var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this); - - if (state == 'Complete') { - try { - this._complete = true; - (this.options['on' + response.status] - || this.options['on' + (this.success() ? 'Success' : 'Failure')] - || Prototype.emptyFunction)(response, response.headerJSON); - } catch (e) { - this.dispatchException(e); - } - - var contentType = response.getHeader('Content-type'); - if (this.options.evalJS == 'force' - || (this.options.evalJS && this.isSameOrigin() && contentType - && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))) - this.evalResponse(); - } - - try { - (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON); - Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON); - } catch (e) { - this.dispatchException(e); - } - - if (state == 'Complete') { - this.transport.onreadystatechange = Prototype.emptyFunction; - } - }, - - isSameOrigin: function() { - var m = this.url.match(/^\s*https?:\/\/[^\/]*/); - return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({ - protocol: location.protocol, - domain: document.domain, - port: location.port ? ':' + location.port : '' - })); - }, - - getHeader: function(name) { - try { - return this.transport.getResponseHeader(name) || null; - } catch (e) { return null; } - }, - - evalResponse: function() { - try { - return eval((this.transport.responseText || '').unfilterJSON()); - } catch (e) { - this.dispatchException(e); - } - }, - - dispatchException: function(exception) { - (this.options.onException || Prototype.emptyFunction)(this, exception); - Ajax.Responders.dispatch('onException', this, exception); - } -}); - -Ajax.Request.Events = - ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; - - - - - - - - -Ajax.Response = Class.create({ - initialize: function(request){ - this.request = request; - var transport = this.transport = request.transport, - readyState = this.readyState = transport.readyState; - - if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) { - this.status = this.getStatus(); - this.statusText = this.getStatusText(); - this.responseText = String.interpret(transport.responseText); - this.headerJSON = this._getHeaderJSON(); - } - - if(readyState == 4) { - var xml = transport.responseXML; - this.responseXML = Object.isUndefined(xml) ? null : xml; - this.responseJSON = this._getResponseJSON(); - } - }, - - status: 0, - - statusText: '', - - getStatus: Ajax.Request.prototype.getStatus, - - getStatusText: function() { - try { - return this.transport.statusText || ''; - } catch (e) { return '' } - }, - - getHeader: Ajax.Request.prototype.getHeader, - - getAllHeaders: function() { - try { - return this.getAllResponseHeaders(); - } catch (e) { return null } - }, - - getResponseHeader: function(name) { - return this.transport.getResponseHeader(name); - }, - - getAllResponseHeaders: function() { - return this.transport.getAllResponseHeaders(); - }, - - _getHeaderJSON: function() { - var json = this.getHeader('X-JSON'); - if (!json) return null; - json = decodeURIComponent(escape(json)); - try { - return json.evalJSON(this.request.options.sanitizeJSON || - !this.request.isSameOrigin()); - } catch (e) { - this.request.dispatchException(e); - } - }, - - _getResponseJSON: function() { - var options = this.request.options; - if (!options.evalJSON || (options.evalJSON != 'force' && - !(this.getHeader('Content-type') || '').include('application/json')) || - this.responseText.blank()) - return null; - try { - return this.responseText.evalJSON(options.sanitizeJSON || - !this.request.isSameOrigin()); - } catch (e) { - this.request.dispatchException(e); - } - } -}); - -Ajax.Updater = Class.create(Ajax.Request, { - initialize: function($super, container, url, options) { - this.container = { - success: (container.success || container), - failure: (container.failure || (container.success ? null : container)) - }; - - options = Object.clone(options); - var onComplete = options.onComplete; - options.onComplete = (function(response, json) { - this.updateContent(response.responseText); - if (Object.isFunction(onComplete)) onComplete(response, json); - }).bind(this); - - $super(url, options); - }, - - updateContent: function(responseText) { - var receiver = this.container[this.success() ? 'success' : 'failure'], - options = this.options; - - if (!options.evalScripts) responseText = responseText.stripScripts(); - - if (receiver = $(receiver)) { - if (options.insertion) { - if (Object.isString(options.insertion)) { - var insertion = { }; insertion[options.insertion] = responseText; - receiver.insert(insertion); - } - else options.insertion(receiver, responseText); - } - else receiver.update(responseText); - } - } -}); - -Ajax.PeriodicalUpdater = Class.create(Ajax.Base, { - initialize: function($super, container, url, options) { - $super(options); - this.onComplete = this.options.onComplete; - - this.frequency = (this.options.frequency || 2); - this.decay = (this.options.decay || 1); - - this.updater = { }; - this.container = container; - this.url = url; - - this.start(); - }, - - start: function() { - this.options.onComplete = this.updateComplete.bind(this); - this.onTimerEvent(); - }, - - stop: function() { - this.updater.options.onComplete = undefined; - clearTimeout(this.timer); - (this.onComplete || Prototype.emptyFunction).apply(this, arguments); - }, - - updateComplete: function(response) { - if (this.options.decay) { - this.decay = (response.responseText == this.lastText ? - this.decay * this.options.decay : 1); - - this.lastText = response.responseText; - } - this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency); - }, - - onTimerEvent: function() { - this.updater = new Ajax.Updater(this.container, this.url, this.options); - } -}); - - - -function $(element) { - if (arguments.length > 1) { - for (var i = 0, elements = [], length = arguments.length; i < length; i++) - elements.push($(arguments[i])); - return elements; - } - if (Object.isString(element)) - element = document.getElementById(element); - return Element.extend(element); -} - -if (Prototype.BrowserFeatures.XPath) { - document._getElementsByXPath = function(expression, parentElement) { - var results = []; - var query = document.evaluate(expression, $(parentElement) || document, - null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); - for (var i = 0, length = query.snapshotLength; i < length; i++) - results.push(Element.extend(query.snapshotItem(i))); - return results; - }; -} - -/*--------------------------------------------------------------------------*/ - -if (!window.Node) var Node = { }; - -if (!Node.ELEMENT_NODE) { - Object.extend(Node, { - ELEMENT_NODE: 1, - ATTRIBUTE_NODE: 2, - TEXT_NODE: 3, - CDATA_SECTION_NODE: 4, - ENTITY_REFERENCE_NODE: 5, - ENTITY_NODE: 6, - PROCESSING_INSTRUCTION_NODE: 7, - COMMENT_NODE: 8, - DOCUMENT_NODE: 9, - DOCUMENT_TYPE_NODE: 10, - DOCUMENT_FRAGMENT_NODE: 11, - NOTATION_NODE: 12 - }); -} - - -(function(global) { - - var SETATTRIBUTE_IGNORES_NAME = (function(){ - var elForm = document.createElement("form"); - var elInput = document.createElement("input"); - var root = document.documentElement; - elInput.setAttribute("name", "test"); - elForm.appendChild(elInput); - root.appendChild(elForm); - var isBuggy = elForm.elements - ? (typeof elForm.elements.test == "undefined") - : null; - root.removeChild(elForm); - elForm = elInput = null; - return isBuggy; - })(); - - var element = global.Element; - global.Element = function(tagName, attributes) { - attributes = attributes || { }; - tagName = tagName.toLowerCase(); - var cache = Element.cache; - if (SETATTRIBUTE_IGNORES_NAME && attributes.name) { - tagName = '<' + tagName + ' name="' + attributes.name + '">'; - delete attributes.name; - return Element.writeAttribute(document.createElement(tagName), attributes); - } - if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName)); - return Element.writeAttribute(cache[tagName].cloneNode(false), attributes); - }; - Object.extend(global.Element, element || { }); - if (element) global.Element.prototype = element.prototype; -})(this); - -Element.cache = { }; -Element.idCounter = 1; - -Element.Methods = { - visible: function(element) { - return $(element).style.display != 'none'; - }, - - toggle: function(element) { - element = $(element); - Element[Element.visible(element) ? 'hide' : 'show'](element); - return element; - }, - - - hide: function(element) { - element = $(element); - element.style.display = 'none'; - return element; - }, - - show: function(element) { - element = $(element); - element.style.display = ''; - return element; - }, - - remove: function(element) { - element = $(element); - element.parentNode.removeChild(element); - return element; - }, - - update: (function(){ - - var SELECT_ELEMENT_INNERHTML_BUGGY = (function(){ - var el = document.createElement("select"), - isBuggy = true; - el.innerHTML = ""; - if (el.options && el.options[0]) { - isBuggy = el.options[0].nodeName.toUpperCase() !== "OPTION"; - } - el = null; - return isBuggy; - })(); - - var TABLE_ELEMENT_INNERHTML_BUGGY = (function(){ - try { - var el = document.createElement("table"); - if (el && el.tBodies) { - el.innerHTML = "test"; - var isBuggy = typeof el.tBodies[0] == "undefined"; - el = null; - return isBuggy; - } - } catch (e) { - return true; - } - })(); - - var SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING = (function () { - var s = document.createElement("script"), - isBuggy = false; - try { - s.appendChild(document.createTextNode("")); - isBuggy = !s.firstChild || - s.firstChild && s.firstChild.nodeType !== 3; - } catch (e) { - isBuggy = true; - } - s = null; - return isBuggy; - })(); - - function update(element, content) { - element = $(element); - - if (content && content.toElement) - content = content.toElement(); - - if (Object.isElement(content)) - return element.update().insert(content); - - content = Object.toHTML(content); - - var tagName = element.tagName.toUpperCase(); - - if (tagName === 'SCRIPT' && SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING) { - element.text = content; - return element; - } - - if (SELECT_ELEMENT_INNERHTML_BUGGY || TABLE_ELEMENT_INNERHTML_BUGGY) { - if (tagName in Element._insertionTranslations.tags) { - while (element.firstChild) { - element.removeChild(element.firstChild); - } - Element._getContentFromAnonymousElement(tagName, content.stripScripts()) - .each(function(node) { - element.appendChild(node) - }); - } - else { - element.innerHTML = content.stripScripts(); - } - } - else { - element.innerHTML = content.stripScripts(); - } - - content.evalScripts.bind(content).defer(); - return element; - } - - return update; - })(), - - replace: function(element, content) { - element = $(element); - if (content && content.toElement) content = content.toElement(); - else if (!Object.isElement(content)) { - content = Object.toHTML(content); - var range = element.ownerDocument.createRange(); - range.selectNode(element); - content.evalScripts.bind(content).defer(); - content = range.createContextualFragment(content.stripScripts()); - } - element.parentNode.replaceChild(content, element); - return element; - }, - - insert: function(element, insertions) { - element = $(element); - - if (Object.isString(insertions) || Object.isNumber(insertions) || - Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML))) - insertions = {bottom:insertions}; - - var content, insert, tagName, childNodes; - - for (var position in insertions) { - content = insertions[position]; - position = position.toLowerCase(); - insert = Element._insertionTranslations[position]; - - if (content && content.toElement) content = content.toElement(); - if (Object.isElement(content)) { - insert(element, content); - continue; - } - - content = Object.toHTML(content); - - tagName = ((position == 'before' || position == 'after') - ? element.parentNode : element).tagName.toUpperCase(); - - childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts()); - - if (position == 'top' || position == 'after') childNodes.reverse(); - childNodes.each(insert.curry(element)); - - content.evalScripts.bind(content).defer(); - } - - return element; - }, - - wrap: function(element, wrapper, attributes) { - element = $(element); - if (Object.isElement(wrapper)) - $(wrapper).writeAttribute(attributes || { }); - else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes); - else wrapper = new Element('div', wrapper); - if (element.parentNode) - element.parentNode.replaceChild(wrapper, element); - wrapper.appendChild(element); - return wrapper; - }, - - inspect: function(element) { - element = $(element); - var result = '<' + element.tagName.toLowerCase(); - $H({'id': 'id', 'className': 'class'}).each(function(pair) { - var property = pair.first(), attribute = pair.last(); - var value = (element[property] || '').toString(); - if (value) result += ' ' + attribute + '=' + value.inspect(true); - }); - return result + '>'; - }, - - recursivelyCollect: function(element, property) { - element = $(element); - var elements = []; - while (element = element[property]) - if (element.nodeType == 1) - elements.push(Element.extend(element)); - return elements; - }, - - ancestors: function(element) { - return Element.recursivelyCollect(element, 'parentNode'); - }, - - descendants: function(element) { - return Element.select(element, "*"); - }, - - firstDescendant: function(element) { - element = $(element).firstChild; - while (element && element.nodeType != 1) element = element.nextSibling; - return $(element); - }, - - immediateDescendants: function(element) { - if (!(element = $(element).firstChild)) return []; - while (element && element.nodeType != 1) element = element.nextSibling; - if (element) return [element].concat($(element).nextSiblings()); - return []; - }, - - previousSiblings: function(element) { - return Element.recursivelyCollect(element, 'previousSibling'); - }, - - nextSiblings: function(element) { - return Element.recursivelyCollect(element, 'nextSibling'); - }, - - siblings: function(element) { - element = $(element); - return Element.previousSiblings(element).reverse() - .concat(Element.nextSiblings(element)); - }, - - match: function(element, selector) { - if (Object.isString(selector)) - selector = new Selector(selector); - return selector.match($(element)); - }, - - up: function(element, expression, index) { - element = $(element); - if (arguments.length == 1) return $(element.parentNode); - var ancestors = Element.ancestors(element); - return Object.isNumber(expression) ? ancestors[expression] : - Selector.findElement(ancestors, expression, index); - }, - - down: function(element, expression, index) { - element = $(element); - if (arguments.length == 1) return Element.firstDescendant(element); - return Object.isNumber(expression) ? Element.descendants(element)[expression] : - Element.select(element, expression)[index || 0]; - }, - - previous: function(element, expression, index) { - element = $(element); - if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element)); - var previousSiblings = Element.previousSiblings(element); - return Object.isNumber(expression) ? previousSiblings[expression] : - Selector.findElement(previousSiblings, expression, index); - }, - - next: function(element, expression, index) { - element = $(element); - if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element)); - var nextSiblings = Element.nextSiblings(element); - return Object.isNumber(expression) ? nextSiblings[expression] : - Selector.findElement(nextSiblings, expression, index); - }, - - - select: function(element) { - var args = Array.prototype.slice.call(arguments, 1); - return Selector.findChildElements(element, args); - }, - - adjacent: function(element) { - var args = Array.prototype.slice.call(arguments, 1); - return Selector.findChildElements(element.parentNode, args).without(element); - }, - - identify: function(element) { - element = $(element); - var id = Element.readAttribute(element, 'id'); - if (id) return id; - do { id = 'anonymous_element_' + Element.idCounter++ } while ($(id)); - Element.writeAttribute(element, 'id', id); - return id; - }, - - readAttribute: function(element, name) { - element = $(element); - if (Prototype.Browser.IE) { - var t = Element._attributeTranslations.read; - if (t.values[name]) return t.values[name](element, name); - if (t.names[name]) name = t.names[name]; - if (name.include(':')) { - return (!element.attributes || !element.attributes[name]) ? null : - element.attributes[name].value; - } - } - return element.getAttribute(name); - }, - - writeAttribute: function(element, name, value) { - element = $(element); - var attributes = { }, t = Element._attributeTranslations.write; - - if (typeof name == 'object') attributes = name; - else attributes[name] = Object.isUndefined(value) ? true : value; - - for (var attr in attributes) { - name = t.names[attr] || attr; - value = attributes[attr]; - if (t.values[attr]) name = t.values[attr](element, value); - if (value === false || value === null) - element.removeAttribute(name); - else if (value === true) - element.setAttribute(name, name); - else element.setAttribute(name, value); - } - return element; - }, - - getHeight: function(element) { - return Element.getDimensions(element).height; - }, - - getWidth: function(element) { - return Element.getDimensions(element).width; - }, - - classNames: function(element) { - return new Element.ClassNames(element); - }, - - hasClassName: function(element, className) { - if (!(element = $(element))) return; - var elementClassName = element.className; - return (elementClassName.length > 0 && (elementClassName == className || - new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName))); - }, - - addClassName: function(element, className) { - if (!(element = $(element))) return; - if (!Element.hasClassName(element, className)) - element.className += (element.className ? ' ' : '') + className; - return element; - }, - - removeClassName: function(element, className) { - if (!(element = $(element))) return; - element.className = element.className.replace( - new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip(); - return element; - }, - - toggleClassName: function(element, className) { - if (!(element = $(element))) return; - return Element[Element.hasClassName(element, className) ? - 'removeClassName' : 'addClassName'](element, className); - }, - - cleanWhitespace: function(element) { - element = $(element); - var node = element.firstChild; - while (node) { - var nextNode = node.nextSibling; - if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) - element.removeChild(node); - node = nextNode; - } - return element; - }, - - empty: function(element) { - return $(element).innerHTML.blank(); - }, - - descendantOf: function(element, ancestor) { - element = $(element), ancestor = $(ancestor); - - if (element.compareDocumentPosition) - return (element.compareDocumentPosition(ancestor) & 8) === 8; - - if (ancestor.contains) - return ancestor.contains(element) && ancestor !== element; - - while (element = element.parentNode) - if (element == ancestor) return true; - - return false; - }, - - scrollTo: function(element) { - element = $(element); - var pos = Element.cumulativeOffset(element); - window.scrollTo(pos[0], pos[1]); - return element; - }, - - getStyle: function(element, style) { - element = $(element); - style = style == 'float' ? 'cssFloat' : style.camelize(); - var value = element.style[style]; - if (!value || value == 'auto') { - var css = document.defaultView.getComputedStyle(element, null); - value = css ? css[style] : null; - } - if (style == 'opacity') return value ? parseFloat(value) : 1.0; - return value == 'auto' ? null : value; - }, - - getOpacity: function(element) { - return $(element).getStyle('opacity'); - }, - - setStyle: function(element, styles) { - element = $(element); - var elementStyle = element.style, match; - if (Object.isString(styles)) { - element.style.cssText += ';' + styles; - return styles.include('opacity') ? - element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element; - } - for (var property in styles) - if (property == 'opacity') element.setOpacity(styles[property]); - else - elementStyle[(property == 'float' || property == 'cssFloat') ? - (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') : - property] = styles[property]; - - return element; - }, - - setOpacity: function(element, value) { - element = $(element); - element.style.opacity = (value == 1 || value === '') ? '' : - (value < 0.00001) ? 0 : value; - return element; - }, - - getDimensions: function(element) { - element = $(element); - var display = Element.getStyle(element, 'display'); - if (display != 'none' && display != null) // Safari bug - return {width: element.offsetWidth, height: element.offsetHeight}; - - var els = element.style; - var originalVisibility = els.visibility; - var originalPosition = els.position; - var originalDisplay = els.display; - els.visibility = 'hidden'; - if (originalPosition != 'fixed') // Switching fixed to absolute causes issues in Safari - els.position = 'absolute'; - els.display = 'block'; - var originalWidth = element.clientWidth; - var originalHeight = element.clientHeight; - els.display = originalDisplay; - els.position = originalPosition; - els.visibility = originalVisibility; - return {width: originalWidth, height: originalHeight}; - }, - - makePositioned: function(element) { - element = $(element); - var pos = Element.getStyle(element, 'position'); - if (pos == 'static' || !pos) { - element._madePositioned = true; - element.style.position = 'relative'; - if (Prototype.Browser.Opera) { - element.style.top = 0; - element.style.left = 0; - } - } - return element; - }, - - undoPositioned: function(element) { - element = $(element); - if (element._madePositioned) { - element._madePositioned = undefined; - element.style.position = - element.style.top = - element.style.left = - element.style.bottom = - element.style.right = ''; - } - return element; - }, - - makeClipping: function(element) { - element = $(element); - if (element._overflow) return element; - element._overflow = Element.getStyle(element, 'overflow') || 'auto'; - if (element._overflow !== 'hidden') - element.style.overflow = 'hidden'; - return element; - }, - - undoClipping: function(element) { - element = $(element); - if (!element._overflow) return element; - element.style.overflow = element._overflow == 'auto' ? '' : element._overflow; - element._overflow = null; - return element; - }, - - cumulativeOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - } while (element); - return Element._returnOffset(valueL, valueT); - }, - - positionedOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - if (element) { - if (element.tagName.toUpperCase() == 'BODY') break; - var p = Element.getStyle(element, 'position'); - if (p !== 'static') break; - } - } while (element); - return Element._returnOffset(valueL, valueT); - }, - - absolutize: function(element) { - element = $(element); - if (Element.getStyle(element, 'position') == 'absolute') return element; - - var offsets = Element.positionedOffset(element); - var top = offsets[1]; - var left = offsets[0]; - var width = element.clientWidth; - var height = element.clientHeight; - - element._originalLeft = left - parseFloat(element.style.left || 0); - element._originalTop = top - parseFloat(element.style.top || 0); - element._originalWidth = element.style.width; - element._originalHeight = element.style.height; - - element.style.position = 'absolute'; - element.style.top = top + 'px'; - element.style.left = left + 'px'; - element.style.width = width + 'px'; - element.style.height = height + 'px'; - return element; - }, - - relativize: function(element) { - element = $(element); - if (Element.getStyle(element, 'position') == 'relative') return element; - - element.style.position = 'relative'; - var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); - var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); - - element.style.top = top + 'px'; - element.style.left = left + 'px'; - element.style.height = element._originalHeight; - element.style.width = element._originalWidth; - return element; - }, - - cumulativeScrollOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.scrollTop || 0; - valueL += element.scrollLeft || 0; - element = element.parentNode; - } while (element); - return Element._returnOffset(valueL, valueT); - }, - - getOffsetParent: function(element) { - if (element.offsetParent) return $(element.offsetParent); - if (element == document.body) return $(element); - - while ((element = element.parentNode) && element != document.body) - if (Element.getStyle(element, 'position') != 'static') - return $(element); - - return $(document.body); - }, - - viewportOffset: function(forElement) { - var valueT = 0, valueL = 0; - - var element = forElement; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - - if (element.offsetParent == document.body && - Element.getStyle(element, 'position') == 'absolute') break; - - } while (element = element.offsetParent); - - element = forElement; - do { - if (!Prototype.Browser.Opera || (element.tagName && (element.tagName.toUpperCase() == 'BODY'))) { - valueT -= element.scrollTop || 0; - valueL -= element.scrollLeft || 0; - } - } while (element = element.parentNode); - - return Element._returnOffset(valueL, valueT); - }, - - clonePosition: function(element, source) { - var options = Object.extend({ - setLeft: true, - setTop: true, - setWidth: true, - setHeight: true, - offsetTop: 0, - offsetLeft: 0 - }, arguments[2] || { }); - - source = $(source); - var p = Element.viewportOffset(source); - - element = $(element); - var delta = [0, 0]; - var parent = null; - if (Element.getStyle(element, 'position') == 'absolute') { - parent = Element.getOffsetParent(element); - delta = Element.viewportOffset(parent); - } - - if (parent == document.body) { - delta[0] -= document.body.offsetLeft; - delta[1] -= document.body.offsetTop; - } - - if (options.setLeft) element.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; - if (options.setTop) element.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; - if (options.setWidth) element.style.width = source.offsetWidth + 'px'; - if (options.setHeight) element.style.height = source.offsetHeight + 'px'; - return element; - } -}; - -Object.extend(Element.Methods, { - getElementsBySelector: Element.Methods.select, - - childElements: Element.Methods.immediateDescendants -}); - -Element._attributeTranslations = { - write: { - names: { - className: 'class', - htmlFor: 'for' - }, - values: { } - } -}; - -if (Prototype.Browser.Opera) { - Element.Methods.getStyle = Element.Methods.getStyle.wrap( - function(proceed, element, style) { - switch (style) { - case 'left': case 'top': case 'right': case 'bottom': - if (proceed(element, 'position') === 'static') return null; - case 'height': case 'width': - if (!Element.visible(element)) return null; - - var dim = parseInt(proceed(element, style), 10); - - if (dim !== element['offset' + style.capitalize()]) - return dim + 'px'; - - var properties; - if (style === 'height') { - properties = ['border-top-width', 'padding-top', - 'padding-bottom', 'border-bottom-width']; - } - else { - properties = ['border-left-width', 'padding-left', - 'padding-right', 'border-right-width']; - } - return properties.inject(dim, function(memo, property) { - var val = proceed(element, property); - return val === null ? memo : memo - parseInt(val, 10); - }) + 'px'; - default: return proceed(element, style); - } - } - ); - - Element.Methods.readAttribute = Element.Methods.readAttribute.wrap( - function(proceed, element, attribute) { - if (attribute === 'title') return element.title; - return proceed(element, attribute); - } - ); -} - -else if (Prototype.Browser.IE) { - Element.Methods.getOffsetParent = Element.Methods.getOffsetParent.wrap( - function(proceed, element) { - element = $(element); - try { element.offsetParent } - catch(e) { return $(document.body) } - var position = element.getStyle('position'); - if (position !== 'static') return proceed(element); - element.setStyle({ position: 'relative' }); - var value = proceed(element); - element.setStyle({ position: position }); - return value; - } - ); - - $w('positionedOffset viewportOffset').each(function(method) { - Element.Methods[method] = Element.Methods[method].wrap( - function(proceed, element) { - element = $(element); - try { element.offsetParent } - catch(e) { return Element._returnOffset(0,0) } - var position = element.getStyle('position'); - if (position !== 'static') return proceed(element); - var offsetParent = element.getOffsetParent(); - if (offsetParent && offsetParent.getStyle('position') === 'fixed') - offsetParent.setStyle({ zoom: 1 }); - element.setStyle({ position: 'relative' }); - var value = proceed(element); - element.setStyle({ position: position }); - return value; - } - ); - }); - - Element.Methods.cumulativeOffset = Element.Methods.cumulativeOffset.wrap( - function(proceed, element) { - try { element.offsetParent } - catch(e) { return Element._returnOffset(0,0) } - return proceed(element); - } - ); - - Element.Methods.getStyle = function(element, style) { - element = $(element); - style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize(); - var value = element.style[style]; - if (!value && element.currentStyle) value = element.currentStyle[style]; - - if (style == 'opacity') { - if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/)) - if (value[1]) return parseFloat(value[1]) / 100; - return 1.0; - } - - if (value == 'auto') { - if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none')) - return element['offset' + style.capitalize()] + 'px'; - return null; - } - return value; - }; - - Element.Methods.setOpacity = function(element, value) { - function stripAlpha(filter){ - return filter.replace(/alpha\([^\)]*\)/gi,''); - } - element = $(element); - var currentStyle = element.currentStyle; - if ((currentStyle && !currentStyle.hasLayout) || - (!currentStyle && element.style.zoom == 'normal')) - element.style.zoom = 1; - - var filter = element.getStyle('filter'), style = element.style; - if (value == 1 || value === '') { - (filter = stripAlpha(filter)) ? - style.filter = filter : style.removeAttribute('filter'); - return element; - } else if (value < 0.00001) value = 0; - style.filter = stripAlpha(filter) + - 'alpha(opacity=' + (value * 100) + ')'; - return element; - }; - - Element._attributeTranslations = (function(){ - - var classProp = 'className'; - var forProp = 'for'; - - var el = document.createElement('div'); - - el.setAttribute(classProp, 'x'); - - if (el.className !== 'x') { - el.setAttribute('class', 'x'); - if (el.className === 'x') { - classProp = 'class'; - } - } - el = null; - - el = document.createElement('label'); - el.setAttribute(forProp, 'x'); - if (el.htmlFor !== 'x') { - el.setAttribute('htmlFor', 'x'); - if (el.htmlFor === 'x') { - forProp = 'htmlFor'; - } - } - el = null; - - return { - read: { - names: { - 'class': classProp, - 'className': classProp, - 'for': forProp, - 'htmlFor': forProp - }, - values: { - _getAttr: function(element, attribute) { - return element.getAttribute(attribute); - }, - _getAttr2: function(element, attribute) { - return element.getAttribute(attribute, 2); - }, - _getAttrNode: function(element, attribute) { - var node = element.getAttributeNode(attribute); - return node ? node.value : ""; - }, - _getEv: (function(){ - - var el = document.createElement('div'); - el.onclick = Prototype.emptyFunction; - var value = el.getAttribute('onclick'); - var f; - - if (String(value).indexOf('{') > -1) { - f = function(element, attribute) { - attribute = element.getAttribute(attribute); - if (!attribute) return null; - attribute = attribute.toString(); - attribute = attribute.split('{')[1]; - attribute = attribute.split('}')[0]; - return attribute.strip(); - }; - } - else if (value === '') { - f = function(element, attribute) { - attribute = element.getAttribute(attribute); - if (!attribute) return null; - return attribute.strip(); - }; - } - el = null; - return f; - })(), - _flag: function(element, attribute) { - return $(element).hasAttribute(attribute) ? attribute : null; - }, - style: function(element) { - return element.style.cssText.toLowerCase(); - }, - title: function(element) { - return element.title; - } - } - } - } - })(); - - Element._attributeTranslations.write = { - names: Object.extend({ - cellpadding: 'cellPadding', - cellspacing: 'cellSpacing' - }, Element._attributeTranslations.read.names), - values: { - checked: function(element, value) { - element.checked = !!value; - }, - - style: function(element, value) { - element.style.cssText = value ? value : ''; - } - } - }; - - Element._attributeTranslations.has = {}; - - $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' + - 'encType maxLength readOnly longDesc frameBorder').each(function(attr) { - Element._attributeTranslations.write.names[attr.toLowerCase()] = attr; - Element._attributeTranslations.has[attr.toLowerCase()] = attr; - }); - - (function(v) { - Object.extend(v, { - href: v._getAttr2, - src: v._getAttr2, - type: v._getAttr, - action: v._getAttrNode, - disabled: v._flag, - checked: v._flag, - readonly: v._flag, - multiple: v._flag, - onload: v._getEv, - onunload: v._getEv, - onclick: v._getEv, - ondblclick: v._getEv, - onmousedown: v._getEv, - onmouseup: v._getEv, - onmouseover: v._getEv, - onmousemove: v._getEv, - onmouseout: v._getEv, - onfocus: v._getEv, - onblur: v._getEv, - onkeypress: v._getEv, - onkeydown: v._getEv, - onkeyup: v._getEv, - onsubmit: v._getEv, - onreset: v._getEv, - onselect: v._getEv, - onchange: v._getEv - }); - })(Element._attributeTranslations.read.values); - - if (Prototype.BrowserFeatures.ElementExtensions) { - (function() { - function _descendants(element) { - var nodes = element.getElementsByTagName('*'), results = []; - for (var i = 0, node; node = nodes[i]; i++) - if (node.tagName !== "!") // Filter out comment nodes. - results.push(node); - return results; - } - - Element.Methods.down = function(element, expression, index) { - element = $(element); - if (arguments.length == 1) return element.firstDescendant(); - return Object.isNumber(expression) ? _descendants(element)[expression] : - Element.select(element, expression)[index || 0]; - } - })(); - } - -} - -else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) { - Element.Methods.setOpacity = function(element, value) { - element = $(element); - element.style.opacity = (value == 1) ? 0.999999 : - (value === '') ? '' : (value < 0.00001) ? 0 : value; - return element; - }; -} - -else if (Prototype.Browser.WebKit) { - Element.Methods.setOpacity = function(element, value) { - element = $(element); - element.style.opacity = (value == 1 || value === '') ? '' : - (value < 0.00001) ? 0 : value; - - if (value == 1) - if(element.tagName.toUpperCase() == 'IMG' && element.width) { - element.width++; element.width--; - } else try { - var n = document.createTextNode(' '); - element.appendChild(n); - element.removeChild(n); - } catch (e) { } - - return element; - }; - - Element.Methods.cumulativeOffset = function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - if (element.offsetParent == document.body) - if (Element.getStyle(element, 'position') == 'absolute') break; - - element = element.offsetParent; - } while (element); - - return Element._returnOffset(valueL, valueT); - }; -} - -if ('outerHTML' in document.documentElement) { - Element.Methods.replace = function(element, content) { - element = $(element); - - if (content && content.toElement) content = content.toElement(); - if (Object.isElement(content)) { - element.parentNode.replaceChild(content, element); - return element; - } - - content = Object.toHTML(content); - var parent = element.parentNode, tagName = parent.tagName.toUpperCase(); - - if (Element._insertionTranslations.tags[tagName]) { - var nextSibling = element.next(); - var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts()); - parent.removeChild(element); - if (nextSibling) - fragments.each(function(node) { parent.insertBefore(node, nextSibling) }); - else - fragments.each(function(node) { parent.appendChild(node) }); - } - else element.outerHTML = content.stripScripts(); - - content.evalScripts.bind(content).defer(); - return element; - }; -} - -Element._returnOffset = function(l, t) { - var result = [l, t]; - result.left = l; - result.top = t; - return result; -}; - -Element._getContentFromAnonymousElement = function(tagName, html) { - var div = new Element('div'), t = Element._insertionTranslations.tags[tagName]; - if (t) { - div.innerHTML = t[0] + html + t[1]; - t[2].times(function() { div = div.firstChild }); - } else div.innerHTML = html; - return $A(div.childNodes); -}; - -Element._insertionTranslations = { - before: function(element, node) { - element.parentNode.insertBefore(node, element); - }, - top: function(element, node) { - element.insertBefore(node, element.firstChild); - }, - bottom: function(element, node) { - element.appendChild(node); - }, - after: function(element, node) { - element.parentNode.insertBefore(node, element.nextSibling); - }, - tags: { - TABLE: ['', '
    ', 1], - TBODY: ['', '
    ', 2], - TR: ['', '
    ', 3], - TD: ['
    ', '
    ', 4], - SELECT: ['', 1] - } -}; - -(function() { - var tags = Element._insertionTranslations.tags; - Object.extend(tags, { - THEAD: tags.TBODY, - TFOOT: tags.TBODY, - TH: tags.TD - }); -})(); - -Element.Methods.Simulated = { - hasAttribute: function(element, attribute) { - attribute = Element._attributeTranslations.has[attribute] || attribute; - var node = $(element).getAttributeNode(attribute); - return !!(node && node.specified); - } -}; - -Element.Methods.ByTag = { }; - -Object.extend(Element, Element.Methods); - -(function(div) { - - if (!Prototype.BrowserFeatures.ElementExtensions && div['__proto__']) { - window.HTMLElement = { }; - window.HTMLElement.prototype = div['__proto__']; - Prototype.BrowserFeatures.ElementExtensions = true; - } - - div = null; - -})(document.createElement('div')) - -Element.extend = (function() { - - function checkDeficiency(tagName) { - if (typeof window.Element != 'undefined') { - var proto = window.Element.prototype; - if (proto) { - var id = '_' + (Math.random()+'').slice(2); - var el = document.createElement(tagName); - proto[id] = 'x'; - var isBuggy = (el[id] !== 'x'); - delete proto[id]; - el = null; - return isBuggy; - } - } - return false; - } - - function extendElementWith(element, methods) { - for (var property in methods) { - var value = methods[property]; - if (Object.isFunction(value) && !(property in element)) - element[property] = value.methodize(); - } - } - - var HTMLOBJECTELEMENT_PROTOTYPE_BUGGY = checkDeficiency('object'); - - if (Prototype.BrowserFeatures.SpecificElementExtensions) { - if (HTMLOBJECTELEMENT_PROTOTYPE_BUGGY) { - return function(element) { - if (element && typeof element._extendedByPrototype == 'undefined') { - var t = element.tagName; - if (t && (/^(?:object|applet|embed)$/i.test(t))) { - extendElementWith(element, Element.Methods); - extendElementWith(element, Element.Methods.Simulated); - extendElementWith(element, Element.Methods.ByTag[t.toUpperCase()]); - } - } - return element; - } - } - return Prototype.K; - } - - var Methods = { }, ByTag = Element.Methods.ByTag; - - var extend = Object.extend(function(element) { - if (!element || typeof element._extendedByPrototype != 'undefined' || - element.nodeType != 1 || element == window) return element; - - var methods = Object.clone(Methods), - tagName = element.tagName.toUpperCase(); - - if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]); - - extendElementWith(element, methods); - - element._extendedByPrototype = Prototype.emptyFunction; - return element; - - }, { - refresh: function() { - if (!Prototype.BrowserFeatures.ElementExtensions) { - Object.extend(Methods, Element.Methods); - Object.extend(Methods, Element.Methods.Simulated); - } - } - }); - - extend.refresh(); - return extend; -})(); - -Element.hasAttribute = function(element, attribute) { - if (element.hasAttribute) return element.hasAttribute(attribute); - return Element.Methods.Simulated.hasAttribute(element, attribute); -}; - -Element.addMethods = function(methods) { - var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag; - - if (!methods) { - Object.extend(Form, Form.Methods); - Object.extend(Form.Element, Form.Element.Methods); - Object.extend(Element.Methods.ByTag, { - "FORM": Object.clone(Form.Methods), - "INPUT": Object.clone(Form.Element.Methods), - "SELECT": Object.clone(Form.Element.Methods), - "TEXTAREA": Object.clone(Form.Element.Methods) - }); - } - - if (arguments.length == 2) { - var tagName = methods; - methods = arguments[1]; - } - - if (!tagName) Object.extend(Element.Methods, methods || { }); - else { - if (Object.isArray(tagName)) tagName.each(extend); - else extend(tagName); - } - - function extend(tagName) { - tagName = tagName.toUpperCase(); - if (!Element.Methods.ByTag[tagName]) - Element.Methods.ByTag[tagName] = { }; - Object.extend(Element.Methods.ByTag[tagName], methods); - } - - function copy(methods, destination, onlyIfAbsent) { - onlyIfAbsent = onlyIfAbsent || false; - for (var property in methods) { - var value = methods[property]; - if (!Object.isFunction(value)) continue; - if (!onlyIfAbsent || !(property in destination)) - destination[property] = value.methodize(); - } - } - - function findDOMClass(tagName) { - var klass; - var trans = { - "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph", - "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList", - "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading", - "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote", - "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION": - "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD": - "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR": - "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET": - "FrameSet", "IFRAME": "IFrame" - }; - if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element'; - if (window[klass]) return window[klass]; - klass = 'HTML' + tagName + 'Element'; - if (window[klass]) return window[klass]; - klass = 'HTML' + tagName.capitalize() + 'Element'; - if (window[klass]) return window[klass]; - - var element = document.createElement(tagName); - var proto = element['__proto__'] || element.constructor.prototype; - element = null; - return proto; - } - - var elementPrototype = window.HTMLElement ? HTMLElement.prototype : - Element.prototype; - - if (F.ElementExtensions) { - copy(Element.Methods, elementPrototype); - copy(Element.Methods.Simulated, elementPrototype, true); - } - - if (F.SpecificElementExtensions) { - for (var tag in Element.Methods.ByTag) { - var klass = findDOMClass(tag); - if (Object.isUndefined(klass)) continue; - copy(T[tag], klass.prototype); - } - } - - Object.extend(Element, Element.Methods); - delete Element.ByTag; - - if (Element.extend.refresh) Element.extend.refresh(); - Element.cache = { }; -}; - - -document.viewport = { - - getDimensions: function() { - return { width: this.getWidth(), height: this.getHeight() }; - }, - - getScrollOffsets: function() { - return Element._returnOffset( - window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft, - window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop); - } -}; - -(function(viewport) { - var B = Prototype.Browser, doc = document, element, property = {}; - - function getRootElement() { - if (B.WebKit && !doc.evaluate) - return document; - - if (B.Opera && window.parseFloat(window.opera.version()) < 9.5) - return document.body; - - return document.documentElement; - } - - function define(D) { - if (!element) element = getRootElement(); - - property[D] = 'client' + D; - - viewport['get' + D] = function() { return element[property[D]] }; - return viewport['get' + D](); - } - - viewport.getWidth = define.curry('Width'); - - viewport.getHeight = define.curry('Height'); -})(document.viewport); - - -Element.Storage = { - UID: 1 -}; - -Element.addMethods({ - getStorage: function(element) { - if (!(element = $(element))) return; - - var uid; - if (element === window) { - uid = 0; - } else { - if (typeof element._prototypeUID === "undefined") - element._prototypeUID = [Element.Storage.UID++]; - uid = element._prototypeUID[0]; - } - - if (!Element.Storage[uid]) - Element.Storage[uid] = $H(); - - return Element.Storage[uid]; - }, - - store: function(element, key, value) { - if (!(element = $(element))) return; - - if (arguments.length === 2) { - Element.getStorage(element).update(key); - } else { - Element.getStorage(element).set(key, value); - } - - return element; - }, - - retrieve: function(element, key, defaultValue) { - if (!(element = $(element))) return; - var hash = Element.getStorage(element), value = hash.get(key); - - if (Object.isUndefined(value)) { - hash.set(key, defaultValue); - value = defaultValue; - } - - return value; - }, - - clone: function(element, deep) { - if (!(element = $(element))) return; - var clone = element.cloneNode(deep); - clone._prototypeUID = void 0; - if (deep) { - var descendants = Element.select(clone, '*'), - i = descendants.length; - while (i--) { - descendants[i]._prototypeUID = void 0; - } - } - return Element.extend(clone); - } -}); -/* Portions of the Selector class are derived from Jack Slocum's DomQuery, - * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style - * license. Please see http://www.yui-ext.com/ for more information. */ - -var Selector = Class.create({ - initialize: function(expression) { - this.expression = expression.strip(); - - if (this.shouldUseSelectorsAPI()) { - this.mode = 'selectorsAPI'; - } else if (this.shouldUseXPath()) { - this.mode = 'xpath'; - this.compileXPathMatcher(); - } else { - this.mode = "normal"; - this.compileMatcher(); - } - - }, - - shouldUseXPath: (function() { - - var IS_DESCENDANT_SELECTOR_BUGGY = (function(){ - var isBuggy = false; - if (document.evaluate && window.XPathResult) { - var el = document.createElement('div'); - el.innerHTML = '
    '; - - var xpath = ".//*[local-name()='ul' or local-name()='UL']" + - "//*[local-name()='li' or local-name()='LI']"; - - var result = document.evaluate(xpath, el, null, - XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); - - isBuggy = (result.snapshotLength !== 2); - el = null; - } - return isBuggy; - })(); - - return function() { - if (!Prototype.BrowserFeatures.XPath) return false; - - var e = this.expression; - - if (Prototype.Browser.WebKit && - (e.include("-of-type") || e.include(":empty"))) - return false; - - if ((/(\[[\w-]*?:|:checked)/).test(e)) - return false; - - if (IS_DESCENDANT_SELECTOR_BUGGY) return false; - - return true; - } - - })(), - - shouldUseSelectorsAPI: function() { - if (!Prototype.BrowserFeatures.SelectorsAPI) return false; - - if (Selector.CASE_INSENSITIVE_CLASS_NAMES) return false; - - if (!Selector._div) Selector._div = new Element('div'); - - try { - Selector._div.querySelector(this.expression); - } catch(e) { - return false; - } - - return true; - }, - - compileMatcher: function() { - var e = this.expression, ps = Selector.patterns, h = Selector.handlers, - c = Selector.criteria, le, p, m, len = ps.length, name; - - if (Selector._cache[e]) { - this.matcher = Selector._cache[e]; - return; - } - - this.matcher = ["this.matcher = function(root) {", - "var r = root, h = Selector.handlers, c = false, n;"]; - - while (e && le != e && (/\S/).test(e)) { - le = e; - for (var i = 0; i"; - } -}); - -if (Prototype.BrowserFeatures.SelectorsAPI && - document.compatMode === 'BackCompat') { - Selector.CASE_INSENSITIVE_CLASS_NAMES = (function(){ - var div = document.createElement('div'), - span = document.createElement('span'); - - div.id = "prototype_test_id"; - span.className = 'Test'; - div.appendChild(span); - var isIgnored = (div.querySelector('#prototype_test_id .test') !== null); - div = span = null; - return isIgnored; - })(); -} - -Object.extend(Selector, { - _cache: { }, - - xpath: { - descendant: "//*", - child: "/*", - adjacent: "/following-sibling::*[1]", - laterSibling: '/following-sibling::*', - tagName: function(m) { - if (m[1] == '*') return ''; - return "[local-name()='" + m[1].toLowerCase() + - "' or local-name()='" + m[1].toUpperCase() + "']"; - }, - className: "[contains(concat(' ', @class, ' '), ' #{1} ')]", - id: "[@id='#{1}']", - attrPresence: function(m) { - m[1] = m[1].toLowerCase(); - return new Template("[@#{1}]").evaluate(m); - }, - attr: function(m) { - m[1] = m[1].toLowerCase(); - m[3] = m[5] || m[6]; - return new Template(Selector.xpath.operators[m[2]]).evaluate(m); - }, - pseudo: function(m) { - var h = Selector.xpath.pseudos[m[1]]; - if (!h) return ''; - if (Object.isFunction(h)) return h(m); - return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m); - }, - operators: { - '=': "[@#{1}='#{3}']", - '!=': "[@#{1}!='#{3}']", - '^=': "[starts-with(@#{1}, '#{3}')]", - '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']", - '*=': "[contains(@#{1}, '#{3}')]", - '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]", - '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]" - }, - pseudos: { - 'first-child': '[not(preceding-sibling::*)]', - 'last-child': '[not(following-sibling::*)]', - 'only-child': '[not(preceding-sibling::* or following-sibling::*)]', - 'empty': "[count(*) = 0 and (count(text()) = 0)]", - 'checked': "[@checked]", - 'disabled': "[(@disabled) and (@type!='hidden')]", - 'enabled': "[not(@disabled) and (@type!='hidden')]", - 'not': function(m) { - var e = m[6], p = Selector.patterns, - x = Selector.xpath, le, v, len = p.length, name; - - var exclusion = []; - while (e && le != e && (/\S/).test(e)) { - le = e; - for (var i = 0; i= 0)]"; - return new Template(predicate).evaluate({ - fragment: fragment, a: a, b: b }); - } - } - } - }, - - criteria: { - tagName: 'n = h.tagName(n, r, "#{1}", c); c = false;', - className: 'n = h.className(n, r, "#{1}", c); c = false;', - id: 'n = h.id(n, r, "#{1}", c); c = false;', - attrPresence: 'n = h.attrPresence(n, r, "#{1}", c); c = false;', - attr: function(m) { - m[3] = (m[5] || m[6]); - return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(m); - }, - pseudo: function(m) { - if (m[6]) m[6] = m[6].replace(/"/g, '\\"'); - return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m); - }, - descendant: 'c = "descendant";', - child: 'c = "child";', - adjacent: 'c = "adjacent";', - laterSibling: 'c = "laterSibling";' - }, - - patterns: [ - { name: 'laterSibling', re: /^\s*~\s*/ }, - { name: 'child', re: /^\s*>\s*/ }, - { name: 'adjacent', re: /^\s*\+\s*/ }, - { name: 'descendant', re: /^\s/ }, - - { name: 'tagName', re: /^\s*(\*|[\w\-]+)(\b|$)?/ }, - { name: 'id', re: /^#([\w\-\*]+)(\b|$)/ }, - { name: 'className', re: /^\.([\w\-\*]+)(\b|$)/ }, - { name: 'pseudo', re: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/ }, - { name: 'attrPresence', re: /^\[((?:[\w-]+:)?[\w-]+)\]/ }, - { name: 'attr', re: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/ } - ], - - assertions: { - tagName: function(element, matches) { - return matches[1].toUpperCase() == element.tagName.toUpperCase(); - }, - - className: function(element, matches) { - return Element.hasClassName(element, matches[1]); - }, - - id: function(element, matches) { - return element.id === matches[1]; - }, - - attrPresence: function(element, matches) { - return Element.hasAttribute(element, matches[1]); - }, - - attr: function(element, matches) { - var nodeValue = Element.readAttribute(element, matches[1]); - return nodeValue && Selector.operators[matches[2]](nodeValue, matches[5] || matches[6]); - } - }, - - handlers: { - concat: function(a, b) { - for (var i = 0, node; node = b[i]; i++) - a.push(node); - return a; - }, - - mark: function(nodes) { - var _true = Prototype.emptyFunction; - for (var i = 0, node; node = nodes[i]; i++) - node._countedByPrototype = _true; - return nodes; - }, - - unmark: (function(){ - - var PROPERTIES_ATTRIBUTES_MAP = (function(){ - var el = document.createElement('div'), - isBuggy = false, - propName = '_countedByPrototype', - value = 'x' - el[propName] = value; - isBuggy = (el.getAttribute(propName) === value); - el = null; - return isBuggy; - })(); - - return PROPERTIES_ATTRIBUTES_MAP ? - function(nodes) { - for (var i = 0, node; node = nodes[i]; i++) - node.removeAttribute('_countedByPrototype'); - return nodes; - } : - function(nodes) { - for (var i = 0, node; node = nodes[i]; i++) - node._countedByPrototype = void 0; - return nodes; - } - })(), - - index: function(parentNode, reverse, ofType) { - parentNode._countedByPrototype = Prototype.emptyFunction; - if (reverse) { - for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) { - var node = nodes[i]; - if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++; - } - } else { - for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++) - if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++; - } - }, - - unique: function(nodes) { - if (nodes.length == 0) return nodes; - var results = [], n; - for (var i = 0, l = nodes.length; i < l; i++) - if (typeof (n = nodes[i])._countedByPrototype == 'undefined') { - n._countedByPrototype = Prototype.emptyFunction; - results.push(Element.extend(n)); - } - return Selector.handlers.unmark(results); - }, - - descendant: function(nodes) { - var h = Selector.handlers; - for (var i = 0, results = [], node; node = nodes[i]; i++) - h.concat(results, node.getElementsByTagName('*')); - return results; - }, - - child: function(nodes) { - var h = Selector.handlers; - for (var i = 0, results = [], node; node = nodes[i]; i++) { - for (var j = 0, child; child = node.childNodes[j]; j++) - if (child.nodeType == 1 && child.tagName != '!') results.push(child); - } - return results; - }, - - adjacent: function(nodes) { - for (var i = 0, results = [], node; node = nodes[i]; i++) { - var next = this.nextElementSibling(node); - if (next) results.push(next); - } - return results; - }, - - laterSibling: function(nodes) { - var h = Selector.handlers; - for (var i = 0, results = [], node; node = nodes[i]; i++) - h.concat(results, Element.nextSiblings(node)); - return results; - }, - - nextElementSibling: function(node) { - while (node = node.nextSibling) - if (node.nodeType == 1) return node; - return null; - }, - - previousElementSibling: function(node) { - while (node = node.previousSibling) - if (node.nodeType == 1) return node; - return null; - }, - - tagName: function(nodes, root, tagName, combinator) { - var uTagName = tagName.toUpperCase(); - var results = [], h = Selector.handlers; - if (nodes) { - if (combinator) { - if (combinator == "descendant") { - for (var i = 0, node; node = nodes[i]; i++) - h.concat(results, node.getElementsByTagName(tagName)); - return results; - } else nodes = this[combinator](nodes); - if (tagName == "*") return nodes; - } - for (var i = 0, node; node = nodes[i]; i++) - if (node.tagName.toUpperCase() === uTagName) results.push(node); - return results; - } else return root.getElementsByTagName(tagName); - }, - - id: function(nodes, root, id, combinator) { - var targetNode = $(id), h = Selector.handlers; - - if (root == document) { - if (!targetNode) return []; - if (!nodes) return [targetNode]; - } else { - if (!root.sourceIndex || root.sourceIndex < 1) { - var nodes = root.getElementsByTagName('*'); - for (var j = 0, node; node = nodes[j]; j++) { - if (node.id === id) return [node]; - } - } - } - - if (nodes) { - if (combinator) { - if (combinator == 'child') { - for (var i = 0, node; node = nodes[i]; i++) - if (targetNode.parentNode == node) return [targetNode]; - } else if (combinator == 'descendant') { - for (var i = 0, node; node = nodes[i]; i++) - if (Element.descendantOf(targetNode, node)) return [targetNode]; - } else if (combinator == 'adjacent') { - for (var i = 0, node; node = nodes[i]; i++) - if (Selector.handlers.previousElementSibling(targetNode) == node) - return [targetNode]; - } else nodes = h[combinator](nodes); - } - for (var i = 0, node; node = nodes[i]; i++) - if (node == targetNode) return [targetNode]; - return []; - } - return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : []; - }, - - className: function(nodes, root, className, combinator) { - if (nodes && combinator) nodes = this[combinator](nodes); - return Selector.handlers.byClassName(nodes, root, className); - }, - - byClassName: function(nodes, root, className) { - if (!nodes) nodes = Selector.handlers.descendant([root]); - var needle = ' ' + className + ' '; - for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) { - nodeClassName = node.className; - if (nodeClassName.length == 0) continue; - if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle)) - results.push(node); - } - return results; - }, - - attrPresence: function(nodes, root, attr, combinator) { - if (!nodes) nodes = root.getElementsByTagName("*"); - if (nodes && combinator) nodes = this[combinator](nodes); - var results = []; - for (var i = 0, node; node = nodes[i]; i++) - if (Element.hasAttribute(node, attr)) results.push(node); - return results; - }, - - attr: function(nodes, root, attr, value, operator, combinator) { - if (!nodes) nodes = root.getElementsByTagName("*"); - if (nodes && combinator) nodes = this[combinator](nodes); - var handler = Selector.operators[operator], results = []; - for (var i = 0, node; node = nodes[i]; i++) { - var nodeValue = Element.readAttribute(node, attr); - if (nodeValue === null) continue; - if (handler(nodeValue, value)) results.push(node); - } - return results; - }, - - pseudo: function(nodes, name, value, root, combinator) { - if (nodes && combinator) nodes = this[combinator](nodes); - if (!nodes) nodes = root.getElementsByTagName("*"); - return Selector.pseudos[name](nodes, value, root); - } - }, - - pseudos: { - 'first-child': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) { - if (Selector.handlers.previousElementSibling(node)) continue; - results.push(node); - } - return results; - }, - 'last-child': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) { - if (Selector.handlers.nextElementSibling(node)) continue; - results.push(node); - } - return results; - }, - 'only-child': function(nodes, value, root) { - var h = Selector.handlers; - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (!h.previousElementSibling(node) && !h.nextElementSibling(node)) - results.push(node); - return results; - }, - 'nth-child': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, formula, root); - }, - 'nth-last-child': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, formula, root, true); - }, - 'nth-of-type': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, formula, root, false, true); - }, - 'nth-last-of-type': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, formula, root, true, true); - }, - 'first-of-type': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, "1", root, false, true); - }, - 'last-of-type': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, "1", root, true, true); - }, - 'only-of-type': function(nodes, formula, root) { - var p = Selector.pseudos; - return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root); - }, - - getIndices: function(a, b, total) { - if (a == 0) return b > 0 ? [b] : []; - return $R(1, total).inject([], function(memo, i) { - if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i); - return memo; - }); - }, - - nth: function(nodes, formula, root, reverse, ofType) { - if (nodes.length == 0) return []; - if (formula == 'even') formula = '2n+0'; - if (formula == 'odd') formula = '2n+1'; - var h = Selector.handlers, results = [], indexed = [], m; - h.mark(nodes); - for (var i = 0, node; node = nodes[i]; i++) { - if (!node.parentNode._countedByPrototype) { - h.index(node.parentNode, reverse, ofType); - indexed.push(node.parentNode); - } - } - if (formula.match(/^\d+$/)) { // just a number - formula = Number(formula); - for (var i = 0, node; node = nodes[i]; i++) - if (node.nodeIndex == formula) results.push(node); - } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b - if (m[1] == "-") m[1] = -1; - var a = m[1] ? Number(m[1]) : 1; - var b = m[2] ? Number(m[2]) : 0; - var indices = Selector.pseudos.getIndices(a, b, nodes.length); - for (var i = 0, node, l = indices.length; node = nodes[i]; i++) { - for (var j = 0; j < l; j++) - if (node.nodeIndex == indices[j]) results.push(node); - } - } - h.unmark(nodes); - h.unmark(indexed); - return results; - }, - - 'empty': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) { - if (node.tagName == '!' || node.firstChild) continue; - results.push(node); - } - return results; - }, - - 'not': function(nodes, selector, root) { - var h = Selector.handlers, selectorType, m; - var exclusions = new Selector(selector).findElements(root); - h.mark(exclusions); - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (!node._countedByPrototype) results.push(node); - h.unmark(exclusions); - return results; - }, - - 'enabled': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (!node.disabled && (!node.type || node.type !== 'hidden')) - results.push(node); - return results; - }, - - 'disabled': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (node.disabled) results.push(node); - return results; - }, - - 'checked': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (node.checked) results.push(node); - return results; - } - }, - - operators: { - '=': function(nv, v) { return nv == v; }, - '!=': function(nv, v) { return nv != v; }, - '^=': function(nv, v) { return nv == v || nv && nv.startsWith(v); }, - '$=': function(nv, v) { return nv == v || nv && nv.endsWith(v); }, - '*=': function(nv, v) { return nv == v || nv && nv.include(v); }, - '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); }, - '|=': function(nv, v) { return ('-' + (nv || "").toUpperCase() + - '-').include('-' + (v || "").toUpperCase() + '-'); } - }, - - split: function(expression) { - var expressions = []; - expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) { - expressions.push(m[1].strip()); - }); - return expressions; - }, - - matchElements: function(elements, expression) { - var matches = $$(expression), h = Selector.handlers; - h.mark(matches); - for (var i = 0, results = [], element; element = elements[i]; i++) - if (element._countedByPrototype) results.push(element); - h.unmark(matches); - return results; - }, - - findElement: function(elements, expression, index) { - if (Object.isNumber(expression)) { - index = expression; expression = false; - } - return Selector.matchElements(elements, expression || '*')[index || 0]; - }, - - findChildElements: function(element, expressions) { - expressions = Selector.split(expressions.join(',')); - var results = [], h = Selector.handlers; - for (var i = 0, l = expressions.length, selector; i < l; i++) { - selector = new Selector(expressions[i].strip()); - h.concat(results, selector.findElements(element)); - } - return (l > 1) ? h.unique(results) : results; - } -}); - -if (Prototype.Browser.IE) { - Object.extend(Selector.handlers, { - concat: function(a, b) { - for (var i = 0, node; node = b[i]; i++) - if (node.tagName !== "!") a.push(node); - return a; - } - }); -} - -function $$() { - return Selector.findChildElements(document, $A(arguments)); -} - -var Form = { - reset: function(form) { - form = $(form); - form.reset(); - return form; - }, - - serializeElements: function(elements, options) { - if (typeof options != 'object') options = { hash: !!options }; - else if (Object.isUndefined(options.hash)) options.hash = true; - var key, value, submitted = false, submit = options.submit; - - var data = elements.inject({ }, function(result, element) { - if (!element.disabled && element.name) { - key = element.name; value = $(element).getValue(); - if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted && - submit !== false && (!submit || key == submit) && (submitted = true)))) { - if (key in result) { - if (!Object.isArray(result[key])) result[key] = [result[key]]; - result[key].push(value); - } - else result[key] = value; - } - } - return result; - }); - - return options.hash ? data : Object.toQueryString(data); - } -}; - -Form.Methods = { - serialize: function(form, options) { - return Form.serializeElements(Form.getElements(form), options); - }, - - getElements: function(form) { - var elements = $(form).getElementsByTagName('*'), - element, - arr = [ ], - serializers = Form.Element.Serializers; - for (var i = 0; element = elements[i]; i++) { - arr.push(element); - } - return arr.inject([], function(elements, child) { - if (serializers[child.tagName.toLowerCase()]) - elements.push(Element.extend(child)); - return elements; - }) - }, - - getInputs: function(form, typeName, name) { - form = $(form); - var inputs = form.getElementsByTagName('input'); - - if (!typeName && !name) return $A(inputs).map(Element.extend); - - for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) { - var input = inputs[i]; - if ((typeName && input.type != typeName) || (name && input.name != name)) - continue; - matchingInputs.push(Element.extend(input)); - } - - return matchingInputs; - }, - - disable: function(form) { - form = $(form); - Form.getElements(form).invoke('disable'); - return form; - }, - - enable: function(form) { - form = $(form); - Form.getElements(form).invoke('enable'); - return form; - }, - - findFirstElement: function(form) { - var elements = $(form).getElements().findAll(function(element) { - return 'hidden' != element.type && !element.disabled; - }); - var firstByIndex = elements.findAll(function(element) { - return element.hasAttribute('tabIndex') && element.tabIndex >= 0; - }).sortBy(function(element) { return element.tabIndex }).first(); - - return firstByIndex ? firstByIndex : elements.find(function(element) { - return /^(?:input|select|textarea)$/i.test(element.tagName); - }); - }, - - focusFirstElement: function(form) { - form = $(form); - form.findFirstElement().activate(); - return form; - }, - - request: function(form, options) { - form = $(form), options = Object.clone(options || { }); - - var params = options.parameters, action = form.readAttribute('action') || ''; - if (action.blank()) action = window.location.href; - options.parameters = form.serialize(true); - - if (params) { - if (Object.isString(params)) params = params.toQueryParams(); - Object.extend(options.parameters, params); - } - - if (form.hasAttribute('method') && !options.method) - options.method = form.method; - - return new Ajax.Request(action, options); - } -}; - -/*--------------------------------------------------------------------------*/ - - -Form.Element = { - focus: function(element) { - $(element).focus(); - return element; - }, - - select: function(element) { - $(element).select(); - return element; - } -}; - -Form.Element.Methods = { - - serialize: function(element) { - element = $(element); - if (!element.disabled && element.name) { - var value = element.getValue(); - if (value != undefined) { - var pair = { }; - pair[element.name] = value; - return Object.toQueryString(pair); - } - } - return ''; - }, - - getValue: function(element) { - element = $(element); - var method = element.tagName.toLowerCase(); - return Form.Element.Serializers[method](element); - }, - - setValue: function(element, value) { - element = $(element); - var method = element.tagName.toLowerCase(); - Form.Element.Serializers[method](element, value); - return element; - }, - - clear: function(element) { - $(element).value = ''; - return element; - }, - - present: function(element) { - return $(element).value != ''; - }, - - activate: function(element) { - element = $(element); - try { - element.focus(); - if (element.select && (element.tagName.toLowerCase() != 'input' || - !(/^(?:button|reset|submit)$/i.test(element.type)))) - element.select(); - } catch (e) { } - return element; - }, - - disable: function(element) { - element = $(element); - element.disabled = true; - return element; - }, - - enable: function(element) { - element = $(element); - element.disabled = false; - return element; - } -}; - -/*--------------------------------------------------------------------------*/ - -var Field = Form.Element; - -var $F = Form.Element.Methods.getValue; - -/*--------------------------------------------------------------------------*/ - -Form.Element.Serializers = { - input: function(element, value) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - return Form.Element.Serializers.inputSelector(element, value); - default: - return Form.Element.Serializers.textarea(element, value); - } - }, - - inputSelector: function(element, value) { - if (Object.isUndefined(value)) return element.checked ? element.value : null; - else element.checked = !!value; - }, - - textarea: function(element, value) { - if (Object.isUndefined(value)) return element.value; - else element.value = value; - }, - - select: function(element, value) { - if (Object.isUndefined(value)) - return this[element.type == 'select-one' ? - 'selectOne' : 'selectMany'](element); - else { - var opt, currentValue, single = !Object.isArray(value); - for (var i = 0, length = element.length; i < length; i++) { - opt = element.options[i]; - currentValue = this.optionValue(opt); - if (single) { - if (currentValue == value) { - opt.selected = true; - return; - } - } - else opt.selected = value.include(currentValue); - } - } - }, - - selectOne: function(element) { - var index = element.selectedIndex; - return index >= 0 ? this.optionValue(element.options[index]) : null; - }, - - selectMany: function(element) { - var values, length = element.length; - if (!length) return null; - - for (var i = 0, values = []; i < length; i++) { - var opt = element.options[i]; - if (opt.selected) values.push(this.optionValue(opt)); - } - return values; - }, - - optionValue: function(opt) { - return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text; - } -}; - -/*--------------------------------------------------------------------------*/ - - -Abstract.TimedObserver = Class.create(PeriodicalExecuter, { - initialize: function($super, element, frequency, callback) { - $super(callback, frequency); - this.element = $(element); - this.lastValue = this.getValue(); - }, - - execute: function() { - var value = this.getValue(); - if (Object.isString(this.lastValue) && Object.isString(value) ? - this.lastValue != value : String(this.lastValue) != String(value)) { - this.callback(this.element, value); - this.lastValue = value; - } - } -}); - -Form.Element.Observer = Class.create(Abstract.TimedObserver, { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.Observer = Class.create(Abstract.TimedObserver, { - getValue: function() { - return Form.serialize(this.element); - } -}); - -/*--------------------------------------------------------------------------*/ - -Abstract.EventObserver = Class.create({ - initialize: function(element, callback) { - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - if (this.element.tagName.toLowerCase() == 'form') - this.registerFormCallbacks(); - else - this.registerCallback(this.element); - }, - - onElementEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - }, - - registerFormCallbacks: function() { - Form.getElements(this.element).each(this.registerCallback, this); - }, - - registerCallback: function(element) { - if (element.type) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - Event.observe(element, 'click', this.onElementEvent.bind(this)); - break; - default: - Event.observe(element, 'change', this.onElementEvent.bind(this)); - break; - } - } - } -}); - -Form.Element.EventObserver = Class.create(Abstract.EventObserver, { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.EventObserver = Class.create(Abstract.EventObserver, { - getValue: function() { - return Form.serialize(this.element); - } -}); -(function() { - - var Event = { - KEY_BACKSPACE: 8, - KEY_TAB: 9, - KEY_RETURN: 13, - KEY_ESC: 27, - KEY_LEFT: 37, - KEY_UP: 38, - KEY_RIGHT: 39, - KEY_DOWN: 40, - KEY_DELETE: 46, - KEY_HOME: 36, - KEY_END: 35, - KEY_PAGEUP: 33, - KEY_PAGEDOWN: 34, - KEY_INSERT: 45, - - cache: {} - }; - - var docEl = document.documentElement; - var MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED = 'onmouseenter' in docEl - && 'onmouseleave' in docEl; - - var _isButton; - if (Prototype.Browser.IE) { - var buttonMap = { 0: 1, 1: 4, 2: 2 }; - _isButton = function(event, code) { - return event.button === buttonMap[code]; - }; - } else if (Prototype.Browser.WebKit) { - _isButton = function(event, code) { - switch (code) { - case 0: return event.which == 1 && !event.metaKey; - case 1: return event.which == 1 && event.metaKey; - default: return false; - } - }; - } else { - _isButton = function(event, code) { - return event.which ? (event.which === code + 1) : (event.button === code); - }; - } - - function isLeftClick(event) { return _isButton(event, 0) } - - function isMiddleClick(event) { return _isButton(event, 1) } - - function isRightClick(event) { return _isButton(event, 2) } - - function element(event) { - event = Event.extend(event); - - var node = event.target, type = event.type, - currentTarget = event.currentTarget; - - if (currentTarget && currentTarget.tagName) { - if (type === 'load' || type === 'error' || - (type === 'click' && currentTarget.tagName.toLowerCase() === 'input' - && currentTarget.type === 'radio')) - node = currentTarget; - } - - if (node.nodeType == Node.TEXT_NODE) - node = node.parentNode; - - return Element.extend(node); - } - - function findElement(event, expression) { - var element = Event.element(event); - if (!expression) return element; - var elements = [element].concat(element.ancestors()); - return Selector.findElement(elements, expression, 0); - } - - function pointer(event) { - return { x: pointerX(event), y: pointerY(event) }; - } - - function pointerX(event) { - var docElement = document.documentElement, - body = document.body || { scrollLeft: 0 }; - - return event.pageX || (event.clientX + - (docElement.scrollLeft || body.scrollLeft) - - (docElement.clientLeft || 0)); - } - - function pointerY(event) { - var docElement = document.documentElement, - body = document.body || { scrollTop: 0 }; - - return event.pageY || (event.clientY + - (docElement.scrollTop || body.scrollTop) - - (docElement.clientTop || 0)); - } - - - function stop(event) { - Event.extend(event); - event.preventDefault(); - event.stopPropagation(); - - event.stopped = true; - } - - Event.Methods = { - isLeftClick: isLeftClick, - isMiddleClick: isMiddleClick, - isRightClick: isRightClick, - - element: element, - findElement: findElement, - - pointer: pointer, - pointerX: pointerX, - pointerY: pointerY, - - stop: stop - }; - - - var methods = Object.keys(Event.Methods).inject({ }, function(m, name) { - m[name] = Event.Methods[name].methodize(); - return m; - }); - - if (Prototype.Browser.IE) { - function _relatedTarget(event) { - var element; - switch (event.type) { - case 'mouseover': element = event.fromElement; break; - case 'mouseout': element = event.toElement; break; - default: return null; - } - return Element.extend(element); - } - - Object.extend(methods, { - stopPropagation: function() { this.cancelBubble = true }, - preventDefault: function() { this.returnValue = false }, - inspect: function() { return '[object Event]' } - }); - - Event.extend = function(event, element) { - if (!event) return false; - if (event._extendedByPrototype) return event; - - event._extendedByPrototype = Prototype.emptyFunction; - var pointer = Event.pointer(event); - - Object.extend(event, { - target: event.srcElement || element, - relatedTarget: _relatedTarget(event), - pageX: pointer.x, - pageY: pointer.y - }); - - return Object.extend(event, methods); - }; - } else { - Event.prototype = window.Event.prototype || document.createEvent('HTMLEvents').__proto__; - Object.extend(Event.prototype, methods); - Event.extend = Prototype.K; - } - - function _createResponder(element, eventName, handler) { - var registry = Element.retrieve(element, 'prototype_event_registry'); - - if (Object.isUndefined(registry)) { - CACHE.push(element); - registry = Element.retrieve(element, 'prototype_event_registry', $H()); - } - - var respondersForEvent = registry.get(eventName); - if (Object.isUndefined(respondersForEvent)) { - respondersForEvent = []; - registry.set(eventName, respondersForEvent); - } - - if (respondersForEvent.pluck('handler').include(handler)) return false; - - var responder; - if (eventName.include(":")) { - responder = function(event) { - if (Object.isUndefined(event.eventName)) - return false; - - if (event.eventName !== eventName) - return false; - - Event.extend(event, element); - handler.call(element, event); - }; - } else { - if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED && - (eventName === "mouseenter" || eventName === "mouseleave")) { - if (eventName === "mouseenter" || eventName === "mouseleave") { - responder = function(event) { - Event.extend(event, element); - - var parent = event.relatedTarget; - while (parent && parent !== element) { - try { parent = parent.parentNode; } - catch(e) { parent = element; } - } - - if (parent === element) return; - - handler.call(element, event); - }; - } - } else { - responder = function(event) { - Event.extend(event, element); - handler.call(element, event); - }; - } - } - - responder.handler = handler; - respondersForEvent.push(responder); - return responder; - } - - function _destroyCache() { - for (var i = 0, length = CACHE.length; i < length; i++) { - Event.stopObserving(CACHE[i]); - CACHE[i] = null; - } - } - - var CACHE = []; - - if (Prototype.Browser.IE) - window.attachEvent('onunload', _destroyCache); - - if (Prototype.Browser.WebKit) - window.addEventListener('unload', Prototype.emptyFunction, false); - - - var _getDOMEventName = Prototype.K; - - if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED) { - _getDOMEventName = function(eventName) { - var translations = { mouseenter: "mouseover", mouseleave: "mouseout" }; - return eventName in translations ? translations[eventName] : eventName; - }; - } - - function observe(element, eventName, handler) { - element = $(element); - - var responder = _createResponder(element, eventName, handler); - - if (!responder) return element; - - if (eventName.include(':')) { - if (element.addEventListener) - element.addEventListener("dataavailable", responder, false); - else { - element.attachEvent("ondataavailable", responder); - element.attachEvent("onfilterchange", responder); - } - } else { - var actualEventName = _getDOMEventName(eventName); - - if (element.addEventListener) - element.addEventListener(actualEventName, responder, false); - else - element.attachEvent("on" + actualEventName, responder); - } - - return element; - } - - function stopObserving(element, eventName, handler) { - element = $(element); - - var registry = Element.retrieve(element, 'prototype_event_registry'); - - if (Object.isUndefined(registry)) return element; - - if (eventName && !handler) { - var responders = registry.get(eventName); - - if (Object.isUndefined(responders)) return element; - - responders.each( function(r) { - Element.stopObserving(element, eventName, r.handler); - }); - return element; - } else if (!eventName) { - registry.each( function(pair) { - var eventName = pair.key, responders = pair.value; - - responders.each( function(r) { - Element.stopObserving(element, eventName, r.handler); - }); - }); - return element; - } - - var responders = registry.get(eventName); - - if (!responders) return; - - var responder = responders.find( function(r) { return r.handler === handler; }); - if (!responder) return element; - - var actualEventName = _getDOMEventName(eventName); - - if (eventName.include(':')) { - if (element.removeEventListener) - element.removeEventListener("dataavailable", responder, false); - else { - element.detachEvent("ondataavailable", responder); - element.detachEvent("onfilterchange", responder); - } - } else { - if (element.removeEventListener) - element.removeEventListener(actualEventName, responder, false); - else - element.detachEvent('on' + actualEventName, responder); - } - - registry.set(eventName, responders.without(responder)); - - return element; - } - - function fire(element, eventName, memo, bubble) { - element = $(element); - - if (Object.isUndefined(bubble)) - bubble = true; - - if (element == document && document.createEvent && !element.dispatchEvent) - element = document.documentElement; - - var event; - if (document.createEvent) { - event = document.createEvent('HTMLEvents'); - event.initEvent('dataavailable', true, true); - } else { - event = document.createEventObject(); - event.eventType = bubble ? 'ondataavailable' : 'onfilterchange'; - } - - event.eventName = eventName; - event.memo = memo || { }; - - if (document.createEvent) - element.dispatchEvent(event); - else - element.fireEvent(event.eventType, event); - - return Event.extend(event); - } - - - Object.extend(Event, Event.Methods); - - Object.extend(Event, { - fire: fire, - observe: observe, - stopObserving: stopObserving - }); - - Element.addMethods({ - fire: fire, - - observe: observe, - - stopObserving: stopObserving - }); - - Object.extend(document, { - fire: fire.methodize(), - - observe: observe.methodize(), - - stopObserving: stopObserving.methodize(), - - loaded: false - }); - - if (window.Event) Object.extend(window.Event, Event); - else window.Event = Event; -})(); - -(function() { - /* Support for the DOMContentLoaded event is based on work by Dan Webb, - Matthias Miller, Dean Edwards, John Resig, and Diego Perini. */ - - var timer; - - function fireContentLoadedEvent() { - if (document.loaded) return; - if (timer) window.clearTimeout(timer); - document.loaded = true; - document.fire('dom:loaded'); - } - - function checkReadyState() { - if (document.readyState === 'complete') { - document.stopObserving('readystatechange', checkReadyState); - fireContentLoadedEvent(); - } - } - - function pollDoScroll() { - try { document.documentElement.doScroll('left'); } - catch(e) { - timer = pollDoScroll.defer(); - return; - } - fireContentLoadedEvent(); - } - - if (document.addEventListener) { - document.addEventListener('DOMContentLoaded', fireContentLoadedEvent, false); - } else { - document.observe('readystatechange', checkReadyState); - if (window == top) - timer = pollDoScroll.defer(); - } - - Event.observe(window, 'load', fireContentLoadedEvent); -})(); - -Element.addMethods(); - -/*------------------------------- DEPRECATED -------------------------------*/ - -Hash.toQueryString = Object.toQueryString; - -var Toggle = { display: Element.toggle }; - -Element.Methods.childOf = Element.Methods.descendantOf; - -var Insertion = { - Before: function(element, content) { - return Element.insert(element, {before:content}); - }, - - Top: function(element, content) { - return Element.insert(element, {top:content}); - }, - - Bottom: function(element, content) { - return Element.insert(element, {bottom:content}); - }, - - After: function(element, content) { - return Element.insert(element, {after:content}); - } -}; - -var $continue = new Error('"throw $continue" is deprecated, use "return" instead'); - -var Position = { - includeScrollOffsets: false, - - prepare: function() { - this.deltaX = window.pageXOffset - || document.documentElement.scrollLeft - || document.body.scrollLeft - || 0; - this.deltaY = window.pageYOffset - || document.documentElement.scrollTop - || document.body.scrollTop - || 0; - }, - - within: function(element, x, y) { - if (this.includeScrollOffsets) - return this.withinIncludingScrolloffsets(element, x, y); - this.xcomp = x; - this.ycomp = y; - this.offset = Element.cumulativeOffset(element); - - return (y >= this.offset[1] && - y < this.offset[1] + element.offsetHeight && - x >= this.offset[0] && - x < this.offset[0] + element.offsetWidth); - }, - - withinIncludingScrolloffsets: function(element, x, y) { - var offsetcache = Element.cumulativeScrollOffset(element); - - this.xcomp = x + offsetcache[0] - this.deltaX; - this.ycomp = y + offsetcache[1] - this.deltaY; - this.offset = Element.cumulativeOffset(element); - - return (this.ycomp >= this.offset[1] && - this.ycomp < this.offset[1] + element.offsetHeight && - this.xcomp >= this.offset[0] && - this.xcomp < this.offset[0] + element.offsetWidth); - }, - - overlap: function(mode, element) { - if (!mode) return 0; - if (mode == 'vertical') - return ((this.offset[1] + element.offsetHeight) - this.ycomp) / - element.offsetHeight; - if (mode == 'horizontal') - return ((this.offset[0] + element.offsetWidth) - this.xcomp) / - element.offsetWidth; - }, - - - cumulativeOffset: Element.Methods.cumulativeOffset, - - positionedOffset: Element.Methods.positionedOffset, - - absolutize: function(element) { - Position.prepare(); - return Element.absolutize(element); - }, - - relativize: function(element) { - Position.prepare(); - return Element.relativize(element); - }, - - realOffset: Element.Methods.cumulativeScrollOffset, - - offsetParent: Element.Methods.getOffsetParent, - - page: Element.Methods.viewportOffset, - - clone: function(source, target, options) { - options = options || { }; - return Element.clonePosition(target, source, options); - } -}; - -/*--------------------------------------------------------------------------*/ - -if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){ - function iter(name) { - return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]"; - } - - instanceMethods.getElementsByClassName = Prototype.BrowserFeatures.XPath ? - function(element, className) { - className = className.toString().strip(); - var cond = /\s/.test(className) ? $w(className).map(iter).join('') : iter(className); - return cond ? document._getElementsByXPath('.//*' + cond, element) : []; - } : function(element, className) { - className = className.toString().strip(); - var elements = [], classNames = (/\s/.test(className) ? $w(className) : null); - if (!classNames && !className) return elements; - - var nodes = $(element).getElementsByTagName('*'); - className = ' ' + className + ' '; - - for (var i = 0, child, cn; child = nodes[i]; i++) { - if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) || - (classNames && classNames.all(function(name) { - return !name.toString().blank() && cn.include(' ' + name + ' '); - })))) - elements.push(Element.extend(child)); - } - return elements; - }; - - return function(className, parentElement) { - return $(parentElement || document.body).getElementsByClassName(className); - }; -}(Element.Methods); - -/*--------------------------------------------------------------------------*/ - -Element.ClassNames = Class.create(); -Element.ClassNames.prototype = { - initialize: function(element) { - this.element = $(element); - }, - - _each: function(iterator) { - this.element.className.split(/\s+/).select(function(name) { - return name.length > 0; - })._each(iterator); - }, - - set: function(className) { - this.element.className = className; - }, - - add: function(classNameToAdd) { - if (this.include(classNameToAdd)) return; - this.set($A(this).concat(classNameToAdd).join(' ')); - }, - - remove: function(classNameToRemove) { - if (!this.include(classNameToRemove)) return; - this.set($A(this).without(classNameToRemove).join(' ')); - }, - - toString: function() { - return $A(this).join(' '); - } -}; - -Object.extend(Element.ClassNames.prototype, Enumerable); - -/*--------------------------------------------------------------------------*/ diff --git a/scorecard_tool/web-app/js/prototype/rico.js b/scorecard_tool/web-app/js/prototype/rico.js deleted file mode 100644 index f0b6fb584..000000000 --- a/scorecard_tool/web-app/js/prototype/rico.js +++ /dev/null @@ -1,2691 +0,0 @@ -/** - * - * Copyright 2005 Sabre Airline Solutions - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this - * file except in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the - * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the specific language governing permissions - * and limitations under the License. - **/ - - -//-------------------- rico.js -var Rico = { - Version: '1.1-beta2' -} - -Rico.ArrayExtensions = new Array(); - -if (Object.prototype.extend) { - // in prototype.js... - Rico.ArrayExtensions[ Rico.ArrayExtensions.length ] = Object.prototype.extend; -} - -if (Array.prototype.push) { - // in prototype.js... - Rico.ArrayExtensions[ Rico.ArrayExtensions.length ] = Array.prototype.push; -} - -if (!Array.prototype.remove) { - Array.prototype.remove = function(dx) { - if( isNaN(dx) || dx > this.length ) - return false; - for( var i=0,n=0; i 1 ) { - if(typeof(arguments[1]) == "object" && arguments[1].length != undefined) { - queryString = this._createQueryString(arguments[1], 0); - } - else { - queryString = this._createQueryString(arguments, 1); - } - } - - new Ajax.Request(requestURL, this._requestOptions(queryString)); - }, - - sendRequestWithData: function(requestName, xmlDocument) { - var requestURL = this.requestURLS[requestName]; - if ( requestURL == null ) - return; - - var queryString = ""; - if ( arguments.length > 2 ) { - if(typeof(arguments[2]) == "object" && arguments[2].length != undefined) { - queryString = this._createQueryString(arguments[2], 0); - } - else { - queryString = this._createQueryString(arguments, 2); - } - } - - new Ajax.Request(requestURL + "?" + queryString, this._requestOptions(null,xmlDocument)); - }, - - sendRequestAndUpdate: function(requestName,container,options) { - var requestURL = this.requestURLS[requestName]; - if ( requestURL == null ) - return; - - var queryString = ""; - if ( arguments.length > 3 ) { - if(typeof(arguments[3]) == "object" && arguments[3].length != undefined) { - queryString = this._createQueryString(arguments[3], 0); - } - else { - queryString = this._createQueryString(arguments, 3); - } - } - - var updaterOptions = this._requestOptions(queryString); - updaterOptions.onComplete = null; - updaterOptions.extend(options); - - new Ajax.Updater(container, requestURL, updaterOptions); - }, - - sendRequestWithDataAndUpdate: function(requestName,xmlDocument,container,options) { - var requestURL = this.requestURLS[requestName]; - if ( requestURL == null ) - return; - - var queryString = ""; - if ( arguments.length > 4 ) { - if(typeof(arguments[4]) == "object" && arguments[4].length != undefined) { - queryString = this._createQueryString(arguments[4], 0); - } - else { - queryString = this._createQueryString(arguments, 4); - } - } - - - var updaterOptions = this._requestOptions(queryString,xmlDocument); - updaterOptions.onComplete = null; - updaterOptions.extend(options); - - new Ajax.Updater(container, requestURL + "?" + queryString, updaterOptions); - }, - - // Private -- not part of intended engine API -------------------------------------------------------------------- - - _requestOptions: function(queryString,xmlDoc) { - var self = this; - - var requestHeaders = ['X-Rico-Version', Rico.Version ]; - var sendMethod = "post" - if ( arguments[1] ) - requestHeaders.push( 'Content-type', 'text/xml' ); - else - sendMethod = "get"; - - return { requestHeaders: requestHeaders, - parameters: queryString, - postBody: arguments[1] ? xmlDoc : null, - method: sendMethod, - onComplete: self._onRequestComplete.bind(self) }; - }, - - _createQueryString: function( theArgs, offset ) { - var self = this; - var queryString = "" - for ( var i = offset ; i < theArgs.length ; i++ ) { - if ( i != offset ) - queryString += "&"; - - var anArg = theArgs[i]; - - if ( anArg.name != undefined && anArg.value != undefined ) { - queryString += anArg.name + "=" + escape(anArg.value); - } - else { - var ePos = anArg.indexOf('='); - var argName = anArg.substring( 0, ePos ); - var argValue = anArg.substring( ePos + 1 ); - queryString += argName + "=" + escape(argValue); - } - } - - return queryString; - }, - _onRequestComplete : function(request) { - - //!!TODO: error handling infrastructure?? - if (request.status != 200) - return; - - var response = request.responseXML.getElementsByTagName("ajax-response"); - if (response == null || response.length != 1) - return; - this._processAjaxResponse( response[0].childNodes ); - }, - - _processAjaxResponse: function( xmlResponseElements ) { - for ( var i = 0 ; i < xmlResponseElements.length ; i++ ) { - var responseElement = xmlResponseElements[i]; - - // only process nodes of type element..... - if ( responseElement.nodeType != 1 ) - continue; - - var responseType = responseElement.getAttribute("type"); - var responseId = responseElement.getAttribute("id"); - - if ( responseType == "object" ) - this._processAjaxObjectUpdate( this.ajaxObjects[ responseId ], responseElement ); - else if ( responseType == "element" ) - this._processAjaxElementUpdate( this.ajaxElements[ responseId ], responseElement ); - else - alert('unrecognized AjaxResponse type : ' + responseType ); - } - }, - - _processAjaxObjectUpdate: function( ajaxObject, responseElement ) { - ajaxObject.ajaxUpdate( responseElement ); - }, - - _processAjaxElementUpdate: function( ajaxElement, responseElement ) { - ajaxElement.innerHTML = RicoUtil.getContentAsString(responseElement); - } - -} - -var ajaxEngine = new Rico.AjaxEngine(); - - -//-------------------- ricoColor.js -Rico.Color = Class.create(); - -Rico.Color.prototype = { - - initialize: function(red, green, blue) { - this.rgb = { r: red, g : green, b : blue }; - }, - - setRed: function(r) { - this.rgb.r = r; - }, - - setGreen: function(g) { - this.rgb.g = g; - }, - - setBlue: function(b) { - this.rgb.b = b; - }, - - setHue: function(h) { - - // get an HSB model, and set the new hue... - var hsb = this.asHSB(); - hsb.h = h; - - // convert back to RGB... - this.rgb = Rico.Color.HSBtoRGB(hsb.h, hsb.s, hsb.b); - }, - - setSaturation: function(s) { - // get an HSB model, and set the new hue... - var hsb = this.asHSB(); - hsb.s = s; - - // convert back to RGB and set values... - this.rgb = Rico.Color.HSBtoRGB(hsb.h, hsb.s, hsb.b); - }, - - setBrightness: function(b) { - // get an HSB model, and set the new hue... - var hsb = this.asHSB(); - hsb.b = b; - - // convert back to RGB and set values... - this.rgb = Rico.Color.HSBtoRGB( hsb.h, hsb.s, hsb.b ); - }, - - darken: function(percent) { - var hsb = this.asHSB(); - this.rgb = Rico.Color.HSBtoRGB(hsb.h, hsb.s, Math.max(hsb.b - percent,0)); - }, - - brighten: function(percent) { - var hsb = this.asHSB(); - this.rgb = Rico.Color.HSBtoRGB(hsb.h, hsb.s, Math.min(hsb.b + percent,1)); - }, - - blend: function(other) { - this.rgb.r = Math.floor((this.rgb.r + other.rgb.r)/2); - this.rgb.g = Math.floor((this.rgb.g + other.rgb.g)/2); - this.rgb.b = Math.floor((this.rgb.b + other.rgb.b)/2); - }, - - isBright: function() { - var hsb = this.asHSB(); - return this.asHSB().b > 0.5; - }, - - isDark: function() { - return ! this.isBright(); - }, - - asRGB: function() { - return "rgb(" + this.rgb.r + "," + this.rgb.g + "," + this.rgb.b + ")"; - }, - - asHex: function() { - return "#" + this.rgb.r.toColorPart() + this.rgb.g.toColorPart() + this.rgb.b.toColorPart(); - }, - - asHSB: function() { - return Rico.Color.RGBtoHSB(this.rgb.r, this.rgb.g, this.rgb.b); - }, - - toString: function() { - return this.asHex(); - } - -}; - -Rico.Color.createFromHex = function(hexCode) { - - if ( hexCode.indexOf('#') == 0 ) - hexCode = hexCode.substring(1); - var red = hexCode.substring(0,2); - var green = hexCode.substring(2,4); - var blue = hexCode.substring(4,6); - return new Rico.Color( parseInt(red,16), parseInt(green,16), parseInt(blue,16) ); -} - -/** - * Factory method for creating a color from the background of - * an HTML element. - */ -Rico.Color.createColorFromBackground = function(elem) { - - var actualColor = RicoUtil.getElementsComputedStyle($(elem), "backgroundColor", "background-color"); - - if ( actualColor == "transparent" && elem.parent ) - return Rico.Color.createColorFromBackground(elem.parent); - - if ( actualColor == null ) - return new Rico.Color(255,255,255); - - if ( actualColor.indexOf("rgb(") == 0 ) { - var colors = actualColor.substring(4, actualColor.length - 1 ); - var colorArray = colors.split(","); - return new Rico.Color( parseInt( colorArray[0] ), - parseInt( colorArray[1] ), - parseInt( colorArray[2] ) ); - - } - else if ( actualColor.indexOf("#") == 0 ) { - var redPart = parseInt(actualColor.substring(1,3), 16); - var greenPart = parseInt(actualColor.substring(3,5), 16); - var bluePart = parseInt(actualColor.substring(5), 16); - return new Rico.Color( redPart, greenPart, bluePart ); - } - else - return new Rico.Color(255,255,255); -} - -Rico.Color.HSBtoRGB = function(hue, saturation, brightness) { - - var red = 0; - var green = 0; - var blue = 0; - - if (saturation == 0) { - red = parseInt(brightness * 255.0 + 0.5); - green = red; - blue = red; - } - else { - var h = (hue - Math.floor(hue)) * 6.0; - var f = h - Math.floor(h); - var p = brightness * (1.0 - saturation); - var q = brightness * (1.0 - saturation * f); - var t = brightness * (1.0 - (saturation * (1.0 - f))); - - switch (parseInt(h)) { - case 0: - red = (brightness * 255.0 + 0.5); - green = (t * 255.0 + 0.5); - blue = (p * 255.0 + 0.5); - break; - case 1: - red = (q * 255.0 + 0.5); - green = (brightness * 255.0 + 0.5); - blue = (p * 255.0 + 0.5); - break; - case 2: - red = (p * 255.0 + 0.5); - green = (brightness * 255.0 + 0.5); - blue = (t * 255.0 + 0.5); - break; - case 3: - red = (p * 255.0 + 0.5); - green = (q * 255.0 + 0.5); - blue = (brightness * 255.0 + 0.5); - break; - case 4: - red = (t * 255.0 + 0.5); - green = (p * 255.0 + 0.5); - blue = (brightness * 255.0 + 0.5); - break; - case 5: - red = (brightness * 255.0 + 0.5); - green = (p * 255.0 + 0.5); - blue = (q * 255.0 + 0.5); - break; - } - } - - return { r : parseInt(red), g : parseInt(green) , b : parseInt(blue) }; -} - -Rico.Color.RGBtoHSB = function(r, g, b) { - - var hue; - var saturaton; - var brightness; - - var cmax = (r > g) ? r : g; - if (b > cmax) - cmax = b; - - var cmin = (r < g) ? r : g; - if (b < cmin) - cmin = b; - - brightness = cmax / 255.0; - if (cmax != 0) - saturation = (cmax - cmin)/cmax; - else - saturation = 0; - - if (saturation == 0) - hue = 0; - else { - var redc = (cmax - r)/(cmax - cmin); - var greenc = (cmax - g)/(cmax - cmin); - var bluec = (cmax - b)/(cmax - cmin); - - if (r == cmax) - hue = bluec - greenc; - else if (g == cmax) - hue = 2.0 + redc - bluec; - else - hue = 4.0 + greenc - redc; - - hue = hue / 6.0; - if (hue < 0) - hue = hue + 1.0; - } - - return { h : hue, s : saturation, b : brightness }; -} - - -//-------------------- ricoCorner.js - -Rico.Corner = { - - round: function(e, options) { - var e = $(e); - this._setOptions(options); - - var color = this.options.color; - if ( this.options.color == "fromElement" ) - color = this._background(e); - - var bgColor = this.options.bgColor; - if ( this.options.bgColor == "fromParent" ) - bgColor = this._background(e.offsetParent); - - this._roundCornersImpl(e, color, bgColor); - }, - - _roundCornersImpl: function(e, color, bgColor) { - if(this.options.border) - this._renderBorder(e,bgColor); - if(this._isTopRounded()) - this._roundTopCorners(e,color,bgColor); - if(this._isBottomRounded()) - this._roundBottomCorners(e,color,bgColor); - }, - - _renderBorder: function(el,bgColor) { - var borderValue = "1px solid " + this._borderColor(bgColor); - var borderL = "border-left: " + borderValue; - var borderR = "border-right: " + borderValue; - var style = "style='" + borderL + ";" + borderR + "'"; - el.innerHTML = "
    " + el.innerHTML + "
    " - }, - - _roundTopCorners: function(el, color, bgColor) { - var corner = this._createCorner(bgColor); - for(var i=0 ; i < this.options.numSlices ; i++ ) - corner.appendChild(this._createCornerSlice(color,bgColor,i,"top")); - el.style.paddingTop = 0; - el.insertBefore(corner,el.firstChild); - }, - - _roundBottomCorners: function(el, color, bgColor) { - var corner = this._createCorner(bgColor); - for(var i=(this.options.numSlices-1) ; i >= 0 ; i-- ) - corner.appendChild(this._createCornerSlice(color,bgColor,i,"bottom")); - el.style.paddingBottom = 0; - el.appendChild(corner); - }, - - _createCorner: function(bgColor) { - var corner = document.createElement("div"); - corner.style.backgroundColor = (this._isTransparent() ? "transparent" : bgColor); - return corner; - }, - - _createCornerSlice: function(color,bgColor, n, position) { - var slice = document.createElement("span"); - - var inStyle = slice.style; - inStyle.backgroundColor = color; - inStyle.display = "block"; - inStyle.height = "1px"; - inStyle.overflow = "hidden"; - inStyle.fontSize = "1px"; - - var borderColor = this._borderColor(color,bgColor); - if ( this.options.border && n == 0 ) { - inStyle.borderTopStyle = "solid"; - inStyle.borderTopWidth = "1px"; - inStyle.borderLeftWidth = "0px"; - inStyle.borderRightWidth = "0px"; - inStyle.borderBottomWidth = "0px"; - inStyle.height = "0px"; // assumes css compliant box model - inStyle.borderColor = borderColor; - } - else if(borderColor) { - inStyle.borderColor = borderColor; - inStyle.borderStyle = "solid"; - inStyle.borderWidth = "0px 1px"; - } - - if ( !this.options.compact && (n == (this.options.numSlices-1)) ) - inStyle.height = "2px"; - - this._setMargin(slice, n, position); - this._setBorder(slice, n, position); - - return slice; - }, - - _setOptions: function(options) { - this.options = { - corners : "all", - color : "fromElement", - bgColor : "fromParent", - blend : true, - border : false, - compact : false - }.extend(options || {}); - - this.options.numSlices = this.options.compact ? 2 : 4; - if ( this._isTransparent() ) - this.options.blend = false; - }, - - _whichSideTop: function() { - if ( this._hasString(this.options.corners, "all", "top") ) - return ""; - - if ( this.options.corners.indexOf("tl") >= 0 && this.options.corners.indexOf("tr") >= 0 ) - return ""; - - if (this.options.corners.indexOf("tl") >= 0) - return "left"; - else if (this.options.corners.indexOf("tr") >= 0) - return "right"; - return ""; - }, - - _whichSideBottom: function() { - if ( this._hasString(this.options.corners, "all", "bottom") ) - return ""; - - if ( this.options.corners.indexOf("bl")>=0 && this.options.corners.indexOf("br")>=0 ) - return ""; - - if(this.options.corners.indexOf("bl") >=0) - return "left"; - else if(this.options.corners.indexOf("br")>=0) - return "right"; - return ""; - }, - - _borderColor : function(color,bgColor) { - if ( color == "transparent" ) - return bgColor; - else if ( this.options.border ) - return this.options.border; - else if ( this.options.blend ) - return this._blend( bgColor, color ); - else - return ""; - }, - - - _setMargin: function(el, n, corners) { - var marginSize = this._marginSize(n); - var whichSide = corners == "top" ? this._whichSideTop() : this._whichSideBottom(); - - if ( whichSide == "left" ) { - el.style.marginLeft = marginSize + "px"; el.style.marginRight = "0px"; - } - else if ( whichSide == "right" ) { - el.style.marginRight = marginSize + "px"; el.style.marginLeft = "0px"; - } - else { - el.style.marginLeft = marginSize + "px"; el.style.marginRight = marginSize + "px"; - } - }, - - _setBorder: function(el,n,corners) { - var borderSize = this._borderSize(n); - var whichSide = corners == "top" ? this._whichSideTop() : this._whichSideBottom(); - - if ( whichSide == "left" ) { - el.style.borderLeftWidth = borderSize + "px"; el.style.borderRightWidth = "0px"; - } - else if ( whichSide == "right" ) { - el.style.borderRightWidth = borderSize + "px"; el.style.borderLeftWidth = "0px"; - } - else { - el.style.borderLeftWidth = borderSize + "px"; el.style.borderRightWidth = borderSize + "px"; - } - }, - - _marginSize: function(n) { - if ( this._isTransparent() ) - return 0; - - var marginSizes = [ 5, 3, 2, 1 ]; - var blendedMarginSizes = [ 3, 2, 1, 0 ]; - var compactMarginSizes = [ 2, 1 ]; - var smBlendedMarginSizes = [ 1, 0 ]; - - if ( this.options.compact && this.options.blend ) - return smBlendedMarginSizes[n]; - else if ( this.options.compact ) - return compactMarginSizes[n]; - else if ( this.options.blend ) - return blendedMarginSizes[n]; - else - return marginSizes[n]; - }, - - _borderSize: function(n) { - var transparentBorderSizes = [ 5, 3, 2, 1 ]; - var blendedBorderSizes = [ 2, 1, 1, 1 ]; - var compactBorderSizes = [ 1, 0 ]; - var actualBorderSizes = [ 0, 2, 0, 0 ]; - - if ( this.options.compact && (this.options.blend || this._isTransparent()) ) - return 1; - else if ( this.options.compact ) - return compactBorderSizes[n]; - else if ( this.options.blend ) - return blendedBorderSizes[n]; - else if ( this.options.border ) - return actualBorderSizes[n]; - else if ( this._isTransparent() ) - return transparentBorderSizes[n]; - return 0; - }, - - _hasString: function(str) { for(var i=1 ; i= 0) return true; return false; }, - _blend: function(c1, c2) { var cc1 = Rico.Color.createFromHex(c1); cc1.blend(Rico.Color.createFromHex(c2)); return cc1; }, - _background: function(el) { try { return Rico.Color.createColorFromBackground(el).asHex(); } catch(err) { return "#ffffff"; } }, - _isTransparent: function() { return this.options.color == "transparent"; }, - _isTopRounded: function() { return this._hasString(this.options.corners, "all", "top", "tl", "tr"); }, - _isBottomRounded: function() { return this._hasString(this.options.corners, "all", "bottom", "bl", "br"); }, - _hasSingleTextChild: function(el) { return el.childNodes.length == 1 && el.childNodes[0].nodeType == 3; } -} - - -//-------------------- ricoDragAndDrop.js -Rico.DragAndDrop = Class.create(); - -Rico.DragAndDrop.prototype = { - - initialize: function() { - this.dropZones = new Array(); - this.draggables = new Array(); - this.currentDragObjects = new Array(); - this.dragElement = null; - this.lastSelectedDraggable = null; - this.currentDragObjectVisible = false; - this.interestedInMotionEvents = false; - }, - - registerDropZone: function(aDropZone) { - this.dropZones[ this.dropZones.length ] = aDropZone; - }, - - deregisterDropZone: function(aDropZone) { - var newDropZones = new Array(); - var j = 0; - for ( var i = 0 ; i < this.dropZones.length ; i++ ) { - if ( this.dropZones[i] != aDropZone ) - newDropZones[j++] = this.dropZones[i]; - } - - this.dropZones = newDropZones; - }, - - clearDropZones: function() { - this.dropZones = new Array(); - }, - - registerDraggable: function( aDraggable ) { - this.draggables[ this.draggables.length ] = aDraggable; - this._addMouseDownHandler( aDraggable ); - }, - - clearSelection: function() { - for ( var i = 0 ; i < this.currentDragObjects.length ; i++ ) - this.currentDragObjects[i].deselect(); - this.currentDragObjects = new Array(); - this.lastSelectedDraggable = null; - }, - - hasSelection: function() { - return this.currentDragObjects.length > 0; - }, - - setStartDragFromElement: function( e, mouseDownElement ) { - this.origPos = RicoUtil.toDocumentPosition(mouseDownElement); - this.startx = e.screenX - this.origPos.x - this.starty = e.screenY - this.origPos.y - //this.startComponentX = e.layerX ? e.layerX : e.offsetX; - //this.startComponentY = e.layerY ? e.layerY : e.offsetY; - //this.adjustedForDraggableSize = false; - - this.interestedInMotionEvents = this.hasSelection(); - this._terminateEvent(e); - }, - - updateSelection: function( draggable, extendSelection ) { - if ( ! extendSelection ) - this.clearSelection(); - - if ( draggable.isSelected() ) { - this.currentDragObjects.removeItem(draggable); - draggable.deselect(); - if ( draggable == this.lastSelectedDraggable ) - this.lastSelectedDraggable = null; - } - else { - this.currentDragObjects[ this.currentDragObjects.length ] = draggable; - draggable.select(); - this.lastSelectedDraggable = draggable; - } - }, - - _mouseDownHandler: function(e) { - if ( arguments.length == 0 ) - e = event; - - // if not button 1 ignore it... - var nsEvent = e.which != undefined; - if ( (nsEvent && e.which != 1) || (!nsEvent && e.button != 1)) - return; - - var eventTarget = e.target ? e.target : e.srcElement; - var draggableObject = eventTarget.draggable; - - var candidate = eventTarget; - while (draggableObject == null && candidate.parentNode) { - candidate = candidate.parentNode; - draggableObject = candidate.draggable; - } - - if ( draggableObject == null ) - return; - - this.updateSelection( draggableObject, e.ctrlKey ); - - // clear the drop zones postion cache... - if ( this.hasSelection() ) - for ( var i = 0 ; i < this.dropZones.length ; i++ ) - this.dropZones[i].clearPositionCache(); - - this.setStartDragFromElement( e, draggableObject.getMouseDownHTMLElement() ); - }, - - - _mouseMoveHandler: function(e) { - var nsEvent = e.which != undefined; - if ( !this.interestedInMotionEvents ) { - this._terminateEvent(e); - return; - } - - if ( ! this.hasSelection() ) - return; - - if ( ! this.currentDragObjectVisible ) - this._startDrag(e); - - if ( !this.activatedDropZones ) - this._activateRegisteredDropZones(); - - //if ( !this.adjustedForDraggableSize ) - // this._adjustForDraggableSize(e); - - this._updateDraggableLocation(e); - this._updateDropZonesHover(e); - - this._terminateEvent(e); - }, - - _makeDraggableObjectVisible: function(e) - { - if ( !this.hasSelection() ) - return; - - var dragElement; - if ( this.currentDragObjects.length > 1 ) - dragElement = this.currentDragObjects[0].getMultiObjectDragGUI(this.currentDragObjects); - else - dragElement = this.currentDragObjects[0].getSingleObjectDragGUI(); - - // go ahead and absolute position it... - if ( RicoUtil.getElementsComputedStyle(dragElement, "position") != "absolute" ) - dragElement.style.position = "absolute"; - - // need to parent him into the document... - if ( dragElement.parentNode == null || dragElement.parentNode.nodeType == 11 ) - document.body.appendChild(dragElement); - - this.dragElement = dragElement; - this._updateDraggableLocation(e); - - this.currentDragObjectVisible = true; - }, - - /** - _adjustForDraggableSize: function(e) { - var dragElementWidth = this.dragElement.offsetWidth; - var dragElementHeight = this.dragElement.offsetHeight; - if ( this.startComponentX > dragElementWidth ) - this.startx -= this.startComponentX - dragElementWidth + 2; - if ( e.offsetY ) { - if ( this.startComponentY > dragElementHeight ) - this.starty -= this.startComponentY - dragElementHeight + 2; - } - this.adjustedForDraggableSize = true; - }, - **/ - - _updateDraggableLocation: function(e) { - var dragObjectStyle = this.dragElement.style; - dragObjectStyle.left = (e.screenX - this.startx) + "px" - dragObjectStyle.top = (e.screenY - this.starty) + "px"; - }, - - _updateDropZonesHover: function(e) { - var n = this.dropZones.length; - for ( var i = 0 ; i < n ; i++ ) { - if ( ! this._mousePointInDropZone( e, this.dropZones[i] ) ) - this.dropZones[i].hideHover(); - } - - for ( var i = 0 ; i < n ; i++ ) { - if ( this._mousePointInDropZone( e, this.dropZones[i] ) ) { - if ( this.dropZones[i].canAccept(this.currentDragObjects) ) - this.dropZones[i].showHover(); - } - } - }, - - _startDrag: function(e) { - for ( var i = 0 ; i < this.currentDragObjects.length ; i++ ) - this.currentDragObjects[i].startDrag(); - - this._makeDraggableObjectVisible(e); - }, - - _mouseUpHandler: function(e) { - if ( ! this.hasSelection() ) - return; - - var nsEvent = e.which != undefined; - if ( (nsEvent && e.which != 1) || (!nsEvent && e.button != 1)) - return; - - this.interestedInMotionEvents = false; - - if ( this.dragElement == null ) { - this._terminateEvent(e); - return; - } - - if ( this._placeDraggableInDropZone(e) ) - this._completeDropOperation(e); - else { - this._terminateEvent(e); - new Effect.Position( this.dragElement, - this.origPos.x, - this.origPos.y, - 200, - 20, - { complete : this._doCancelDragProcessing.bind(this) } ); - } - }, - - _completeDropOperation: function(e) { - if ( this.dragElement != this.currentDragObjects[0].getMouseDownHTMLElement() ) { - if ( this.dragElement.parentNode != null ) - this.dragElement.parentNode.removeChild(this.dragElement); - } - - this._deactivateRegisteredDropZones(); - this._endDrag(); - this.clearSelection(); - this.dragElement = null; - this.currentDragObjectVisible = false; - this._terminateEvent(e); - }, - - _doCancelDragProcessing: function() { - this._cancelDrag(); - - if ( this.dragElement != this.currentDragObjects[0].getMouseDownHTMLElement() ) { - if ( this.dragElement.parentNode != null ) { - this.dragElement.parentNode.removeChild(this.dragElement); - } - } - - this._deactivateRegisteredDropZones(); - this.dragElement = null; - this.currentDragObjectVisible = false; - }, - - _placeDraggableInDropZone: function(e) { - var foundDropZone = false; - var n = this.dropZones.length; - for ( var i = 0 ; i < n ; i++ ) { - if ( this._mousePointInDropZone( e, this.dropZones[i] ) ) { - if ( this.dropZones[i].canAccept(this.currentDragObjects) ) { - this.dropZones[i].hideHover(); - this.dropZones[i].accept(this.currentDragObjects); - foundDropZone = true; - break; - } - } - } - - return foundDropZone; - }, - - _cancelDrag: function() { - for ( var i = 0 ; i < this.currentDragObjects.length ; i++ ) - this.currentDragObjects[i].cancelDrag(); - }, - - _endDrag: function() { - for ( var i = 0 ; i < this.currentDragObjects.length ; i++ ) - this.currentDragObjects[i].endDrag(); - }, - - _mousePointInDropZone: function( e, dropZone ) { - - var absoluteRect = dropZone.getAbsoluteRect(); - - return e.clientX > absoluteRect.left && - e.clientX < absoluteRect.right && - e.clientY > absoluteRect.top && - e.clientY < absoluteRect.bottom; - }, - - _addMouseDownHandler: function( aDraggable ) - { - var htmlElement = aDraggable.getMouseDownHTMLElement(); - if ( htmlElement != null ) { - htmlElement.draggable = aDraggable; - this._addMouseDownEvent( htmlElement ); - } - }, - - _activateRegisteredDropZones: function() { - var n = this.dropZones.length; - for ( var i = 0 ; i < n ; i++ ) { - var dropZone = this.dropZones[i]; - if ( dropZone.canAccept(this.currentDragObjects) ) - dropZone.activate(); - } - - this.activatedDropZones = true; - }, - - _deactivateRegisteredDropZones: function() { - var n = this.dropZones.length; - for ( var i = 0 ; i < n ; i++ ) - this.dropZones[i].deactivate(); - this.activatedDropZones = false; - }, - - _addMouseDownEvent: function( htmlElement ) { - if ( typeof document.implementation != "undefined" && - document.implementation.hasFeature("HTML", "1.0") && - document.implementation.hasFeature("Events", "2.0") && - document.implementation.hasFeature("CSS", "2.0") ) { - htmlElement.addEventListener("mousedown", this._mouseDownHandler.bindAsEventListener(this), false); - } - else { - htmlElement.attachEvent( "onmousedown", this._mouseDownHandler.bindAsEventListener(this) ); - } - }, - - _terminateEvent: function(e) { - if ( e.stopPropagation != undefined ) - e.stopPropagation(); - else if ( e.cancelBubble != undefined ) - e.cancelBubble = true; - - if ( e.preventDefault != undefined ) - e.preventDefault(); - else - e.returnValue = false; - }, - - initializeEventHandlers: function() { - if ( typeof document.implementation != "undefined" && - document.implementation.hasFeature("HTML", "1.0") && - document.implementation.hasFeature("Events", "2.0") && - document.implementation.hasFeature("CSS", "2.0") ) { - document.addEventListener("mouseup", this._mouseUpHandler.bindAsEventListener(this), false); - document.addEventListener("mousemove", this._mouseMoveHandler.bindAsEventListener(this), false); - } - else { - document.attachEvent( "onmouseup", this._mouseUpHandler.bindAsEventListener(this) ); - document.attachEvent( "onmousemove", this._mouseMoveHandler.bindAsEventListener(this) ); - } - } -} - -//var dndMgr = new Rico.DragAndDrop(); -//dndMgr.initializeEventHandlers(); - - -//-------------------- ricoDraggable.js -Rico.Draggable = Class.create(); - -Rico.Draggable.prototype = { - - initialize: function( type, htmlElement ) { - this.type = type; - this.htmlElement = $(htmlElement); - this.selected = false; - }, - - /** - * Returns the HTML element that should have a mouse down event - * added to it in order to initiate a drag operation - * - **/ - getMouseDownHTMLElement: function() { - return this.htmlElement; - }, - - select: function() { - this.selected = true; - - if ( this.showingSelected ) - return; - - var htmlElement = this.getMouseDownHTMLElement(); - - var color = Rico.Color.createColorFromBackground(htmlElement); - color.isBright() ? color.darken(0.033) : color.brighten(0.033); - - this.saveBackground = RicoUtil.getElementsComputedStyle(htmlElement, "backgroundColor", "background-color"); - htmlElement.style.backgroundColor = color.asHex(); - this.showingSelected = true; - }, - - deselect: function() { - this.selected = false; - if ( !this.showingSelected ) - return; - - var htmlElement = this.getMouseDownHTMLElement(); - - htmlElement.style.backgroundColor = this.saveBackground; - this.showingSelected = false; - }, - - isSelected: function() { - return this.selected; - }, - - startDrag: function() { - }, - - cancelDrag: function() { - }, - - endDrag: function() { - }, - - getSingleObjectDragGUI: function() { - return this.htmlElement; - }, - - getMultiObjectDragGUI: function( draggables ) { - return this.htmlElement; - }, - - getDroppedGUI: function() { - return this.htmlElement; - }, - - toString: function() { - return this.type + ":" + this.htmlElement + ":"; - } - -} - - -//-------------------- ricoDropzone.js -Rico.Dropzone = Class.create(); - -Rico.Dropzone.prototype = { - - initialize: function( htmlElement ) { - this.htmlElement = $(htmlElement); - this.absoluteRect = null; - }, - - getHTMLElement: function() { - return this.htmlElement; - }, - - clearPositionCache: function() { - this.absoluteRect = null; - }, - - getAbsoluteRect: function() { - if ( this.absoluteRect == null ) { - var htmlElement = this.getHTMLElement(); - var pos = RicoUtil.toViewportPosition(htmlElement); - - this.absoluteRect = { - top: pos.y, - left: pos.x, - bottom: pos.y + htmlElement.offsetHeight, - right: pos.x + htmlElement.offsetWidth - }; - } - return this.absoluteRect; - }, - - activate: function() { - var htmlElement = this.getHTMLElement(); - if (htmlElement == null || this.showingActive) - return; - - this.showingActive = true; - this.saveBackgroundColor = htmlElement.style.backgroundColor; - - var fallbackColor = "#ffea84"; - var currentColor = Rico.Color.createColorFromBackground(htmlElement); - if ( currentColor == null ) - htmlElement.style.backgroundColor = fallbackColor; - else { - currentColor.isBright() ? currentColor.darken(0.2) : currentColor.brighten(0.2); - htmlElement.style.backgroundColor = currentColor.asHex(); - } - }, - - deactivate: function() { - var htmlElement = this.getHTMLElement(); - if (htmlElement == null || !this.showingActive) - return; - - htmlElement.style.backgroundColor = this.saveBackgroundColor; - this.showingActive = false; - this.saveBackgroundColor = null; - }, - - showHover: function() { - var htmlElement = this.getHTMLElement(); - if ( htmlElement == null || this.showingHover ) - return; - - this.saveBorderWidth = htmlElement.style.borderWidth; - this.saveBorderStyle = htmlElement.style.borderStyle; - this.saveBorderColor = htmlElement.style.borderColor; - - this.showingHover = true; - htmlElement.style.borderWidth = "1px"; - htmlElement.style.borderStyle = "solid"; - //htmlElement.style.borderColor = "#ff9900"; - htmlElement.style.borderColor = "#ffff00"; - }, - - hideHover: function() { - var htmlElement = this.getHTMLElement(); - if ( htmlElement == null || !this.showingHover ) - return; - - htmlElement.style.borderWidth = this.saveBorderWidth; - htmlElement.style.borderStyle = this.saveBorderStyle; - htmlElement.style.borderColor = this.saveBorderColor; - this.showingHover = false; - }, - - canAccept: function(draggableObjects) { - return true; - }, - - accept: function(draggableObjects) { - var htmlElement = this.getHTMLElement(); - if ( htmlElement == null ) - return; - - n = draggableObjects.length; - for ( var i = 0 ; i < n ; i++ ) - { - var theGUI = draggableObjects[i].getDroppedGUI(); - if ( RicoUtil.getElementsComputedStyle( theGUI, "position" ) == "absolute" ) - { - theGUI.style.position = "static"; - theGUI.style.top = ""; - theGUI.style.top = ""; - } - htmlElement.appendChild(theGUI); - } - } -} - - -//-------------------- ricoEffects.js - -/** - * Use the Effect namespace for effects. If using scriptaculous effects - * this will already be defined, otherwise we'll just create an empty - * object for it... - **/ -if ( window.Effect == undefined ) - Effect = {}; - -Effect.SizeAndPosition = Class.create(); -Effect.SizeAndPosition.prototype = { - - initialize: function(element, x, y, w, h, duration, steps, options) { - this.element = $(element); - this.x = x; - this.y = y; - this.w = w; - this.h = h; - this.duration = duration; - this.steps = steps; - this.options = arguments[7] || {}; - - this.sizeAndPosition(); - }, - - sizeAndPosition: function() { - if (this.isFinished()) { - if(this.options.complete) this.options.complete(this); - return; - } - - if (this.timer) - clearTimeout(this.timer); - - var stepDuration = Math.round(this.duration/this.steps) ; - - // Get original values: x,y = top left corner; w,h = width height - var currentX = this.element.offsetLeft; - var currentY = this.element.offsetTop; - var currentW = this.element.offsetWidth; - var currentH = this.element.offsetHeight; - - // If values not set, or zero, we do not modify them, and take original as final as well - this.x = (this.x) ? this.x : currentX; - this.y = (this.y) ? this.y : currentY; - this.w = (this.w) ? this.w : currentW; - this.h = (this.h) ? this.h : currentH; - - // how much do we need to modify our values for each step? - var difX = this.steps > 0 ? (this.x - currentX)/this.steps : 0; - var difY = this.steps > 0 ? (this.y - currentY)/this.steps : 0; - var difW = this.steps > 0 ? (this.w - currentW)/this.steps : 0; - var difH = this.steps > 0 ? (this.h - currentH)/this.steps : 0; - - this.moveBy(difX, difY); - this.resizeBy(difW, difH); - - this.duration -= stepDuration; - this.steps--; - - this.timer = setTimeout(this.sizeAndPosition.bind(this), stepDuration); - }, - - isFinished: function() { - return this.steps <= 0; - }, - - moveBy: function( difX, difY ) { - var currentLeft = this.element.offsetLeft; - var currentTop = this.element.offsetTop; - var intDifX = parseInt(difX); - var intDifY = parseInt(difY); - - var style = this.element.style; - if ( intDifX != 0 ) - style.left = (currentLeft + intDifX) + "px"; - if ( intDifY != 0 ) - style.top = (currentTop + intDifY) + "px"; - }, - - resizeBy: function( difW, difH ) { - var currentWidth = this.element.offsetWidth; - var currentHeight = this.element.offsetHeight; - var intDifW = parseInt(difW); - var intDifH = parseInt(difH); - - var style = this.element.style; - if ( intDifW != 0 ) - style.width = (currentWidth + intDifW) + "px"; - if ( intDifH != 0 ) - style.height = (currentHeight + intDifH) + "px"; - } -} - -Effect.Size = Class.create(); -Effect.Size.prototype = { - - initialize: function(element, w, h, duration, steps, options) { - new Effect.SizeAndPosition(element, null, null, w, h, duration, steps, options); - } -} - -Effect.Position = Class.create(); -Effect.Position.prototype = { - - initialize: function(element, x, y, duration, steps, options) { - new Effect.SizeAndPosition(element, x, y, null, null, duration, steps, options); - } -} - -Effect.Round = Class.create(); -Effect.Round.prototype = { - - initialize: function(tagName, className, options) { - var elements = document.getElementsByTagAndClassName(tagName,className); - for ( var i = 0 ; i < elements.length ; i++ ) - Rico.Corner.round( elements[i], options ); - } -}; - -Effect.FadeTo = Class.create(); -Effect.FadeTo.prototype = { - - initialize: function( element, opacity, duration, steps, options) { - this.element = $(element); - this.opacity = opacity; - this.duration = duration; - this.steps = steps; - this.options = arguments[4] || {}; - this.fadeTo(); - }, - - fadeTo: function() { - if (this.isFinished()) { - if(this.options.complete) this.options.complete(this); - return; - } - - if (this.timer) - clearTimeout(this.timer); - - var stepDuration = Math.round(this.duration/this.steps) ; - var currentOpacity = this.getElementOpacity(); - var delta = this.steps > 0 ? (this.opacity - currentOpacity)/this.steps : 0; - - this.changeOpacityBy(delta); - this.duration -= stepDuration; - this.steps--; - - this.timer = setTimeout(this.fadeTo.bind(this), stepDuration); - }, - - changeOpacityBy: function(v) { - var currentOpacity = this.getElementOpacity(); - var newOpacity = Math.max(0, Math.min(currentOpacity+v, 1)); - this.element.ricoOpacity = newOpacity; - - this.element.style.filter = "alpha(opacity:"+Math.round(newOpacity*100)+")"; - this.element.style.opacity = newOpacity; /*//*/; - }, - - isFinished: function() { - return this.steps <= 0; - }, - - getElementOpacity: function() { - if ( this.element.ricoOpacity == undefined ) { - var opacity; - if ( this.element.currentStyle ) { - opacity = this.element.currentStyle.opacity; - } - else if ( document.defaultView.getComputedStyle != undefined ) { - var computedStyle = document.defaultView.getComputedStyle; - opacity = computedStyle(this.element, null).getPropertyValue('opacity'); - } - - this.element.ricoOpacity = opacity != undefined ? opacity : 1.0; - } - - return parseFloat(this.element.ricoOpacity); - } -} - -Effect.AccordionSize = Class.create(); - -Effect.AccordionSize.prototype = { - - initialize: function(e1, e2, start, end, duration, steps, options) { - this.e1 = $(e1); - this.e2 = $(e2); - this.start = start; - this.end = end; - this.duration = duration; - this.steps = steps; - this.options = arguments[6] || {}; - - this.accordionSize(); - }, - - accordionSize: function() { - - if (this.isFinished()) { - // just in case there are round errors or such... - this.e1.style.height = this.start + "px"; - this.e2.style.height = this.end + "px"; - - if(this.options.complete) - this.options.complete(this); - return; - } - - if (this.timer) - clearTimeout(this.timer); - - var stepDuration = Math.round(this.duration/this.steps) ; - - var diff = this.steps > 0 ? (parseInt(this.e1.offsetHeight) - this.start)/this.steps : 0; - this.resizeBy(diff); - - this.duration -= stepDuration; - this.steps--; - - this.timer = setTimeout(this.accordionSize.bind(this), stepDuration); - }, - - isFinished: function() { - return this.steps <= 0; - }, - - resizeBy: function(diff) { - var h1Height = this.e1.offsetHeight; - var h2Height = this.e2.offsetHeight; - var intDiff = parseInt(diff); - if ( diff != 0 ) { - this.e1.style.height = (h1Height - intDiff) + "px"; - this.e2.style.height = (h2Height + intDiff) + "px"; - } - } - -}; - - -//-------------------- ricoLiveGrid.js - -// Rico.LiveGridMetaData ----------------------------------------------------- - -Rico.LiveGridMetaData = Class.create(); - -Rico.LiveGridMetaData.prototype = { - - initialize: function( pageSize, totalRows, columnCount, options ) { - this.pageSize = pageSize; - this.totalRows = totalRows; - this.setOptions(options); - this.scrollArrowHeight = 16; - this.columnCount = columnCount; - }, - - setOptions: function(options) { - this.options = { - largeBufferSize : 7.0, // 7 pages - nearLimitFactor : 0.2 // 20% of buffer - }.extend(options || {}); - }, - - getPageSize: function() { - return this.pageSize; - }, - - getTotalRows: function() { - return this.totalRows; - }, - - setTotalRows: function(n) { - this.totalRows = n; - }, - - getLargeBufferSize: function() { - return parseInt(this.options.largeBufferSize * this.pageSize); - }, - - getLimitTolerance: function() { - return parseInt(this.getLargeBufferSize() * this.options.nearLimitFactor); - } -}; - -// Rico.LiveGridScroller ----------------------------------------------------- - -Rico.LiveGridScroller = Class.create(); - -Rico.LiveGridScroller.prototype = { - - initialize: function(liveGrid, viewPort) { - this.isIE = navigator.userAgent.toLowerCase().indexOf("msie") >= 0; - this.liveGrid = liveGrid; - this.metaData = liveGrid.metaData; - this.createScrollBar(); - this.scrollTimeout = null; - this.lastScrollPos = 0; - this.viewPort = viewPort; - this.rows = new Array(); - }, - - isUnPlugged: function() { - return this.scrollerDiv.onscroll == null; - }, - - plugin: function() { - this.scrollerDiv.onscroll = this.handleScroll.bindAsEventListener(this); - }, - - unplug: function() { - this.scrollerDiv.onscroll = null; - }, - - sizeIEHeaderHack: function() { - if ( !this.isIE ) return; - var headerTable = $(this.liveGrid.tableId + "_header"); - if ( headerTable ) - headerTable.rows[0].cells[0].style.width = - (headerTable.rows[0].cells[0].offsetWidth + 1) + "px"; - }, - - createScrollBar: function() { - var visibleHeight = this.liveGrid.viewPort.visibleHeight(); - // create the outer div... - this.scrollerDiv = document.createElement("div"); - var scrollerStyle = this.scrollerDiv.style; - scrollerStyle.borderRight = "1px solid #ababab"; // hard coded color!!! - scrollerStyle.position = "relative"; - scrollerStyle.left = this.isIE ? "-6px" : "-3px"; - scrollerStyle.width = "19px"; - scrollerStyle.height = visibleHeight + "px"; - scrollerStyle.overflow = "auto"; - - // create the inner div... - this.heightDiv = document.createElement("div"); - this.heightDiv.style.width = "1px"; - - this.heightDiv.style.height = parseInt(visibleHeight * - this.metaData.getTotalRows()/this.metaData.getPageSize()) + "px" ; - this.scrollerDiv.appendChild(this.heightDiv); - this.scrollerDiv.onscroll = this.handleScroll.bindAsEventListener(this); - - var table = this.liveGrid.table; - table.parentNode.parentNode.insertBefore( this.scrollerDiv, table.parentNode.nextSibling ); - }, - - updateSize: function() { - var table = this.liveGrid.table; - var visibleHeight = this.viewPort.visibleHeight(); - this.heightDiv.style.height = parseInt(visibleHeight * - this.metaData.getTotalRows()/this.metaData.getPageSize()) + "px"; - }, - - rowToPixel: function(rowOffset) { - return (rowOffset / this.metaData.getTotalRows()) * this.heightDiv.offsetHeight - }, - - moveScroll: function(rowOffset) { - this.scrollerDiv.scrollTop = this.rowToPixel(rowOffset); - if ( this.metaData.options.onscroll ) - this.metaData.options.onscroll( this.liveGrid, rowOffset ); - }, - - handleScroll: function() { - if ( this.scrollTimeout ) - clearTimeout( this.scrollTimeout ); - - var contentOffset = parseInt(this.scrollerDiv.scrollTop / this.viewPort.rowHeight); - this.liveGrid.requestContentRefresh(contentOffset); - this.viewPort.scrollTo(this.scrollerDiv.scrollTop); - - if ( this.metaData.options.onscroll ) - this.metaData.options.onscroll( this.liveGrid, contentOffset ); - - this.scrollTimeout = setTimeout( this.scrollIdle.bind(this), 1200 ); - }, - - scrollIdle: function() { - if ( this.metaData.options.onscrollidle ) - this.metaData.options.onscrollidle(); - } -}; - -// Rico.LiveGridBuffer ----------------------------------------------------- - -Rico.LiveGridBuffer = Class.create(); - -Rico.LiveGridBuffer.prototype = { - - initialize: function(metaData, viewPort) { - this.startPos = 0; - this.size = 0; - this.metaData = metaData; - this.rows = new Array(); - this.updateInProgress = false; - this.viewPort = viewPort; - this.maxBufferSize = metaData.getLargeBufferSize() * 2; - this.maxFetchSize = metaData.getLargeBufferSize(); - this.lastOffset = 0; - }, - - getBlankRow: function() { - if (!this.blankRow ) { - this.blankRow = new Array(); - for ( var i=0; i < this.metaData.columnCount ; i++ ) - this.blankRow[i] = " "; - } - return this.blankRow; - }, - - loadRows: function(ajaxResponse) { - var rowsElement = ajaxResponse.getElementsByTagName('rows')[0]; - this.updateUI = rowsElement.getAttribute("update_ui") == "true" - var newRows = new Array() - var trs = rowsElement.getElementsByTagName("tr"); - for ( var i=0 ; i < trs.length; i++ ) { - var row = newRows[i] = new Array(); - var cells = trs[i].getElementsByTagName("td"); - for ( var j=0; j < cells.length ; j++ ) { - var cell = cells[j]; - var convertSpaces = cell.getAttribute("convert_spaces") == "true"; - var cellContent = RicoUtil.getContentAsString(cell); - row[j] = convertSpaces ? this.convertSpaces(cellContent) : cellContent; - if (!row[j]) - row[j] = ' '; - } - } - return newRows; - }, - - update: function(ajaxResponse, start) { - var newRows = this.loadRows(ajaxResponse); - if (this.rows.length == 0) { // initial load - this.rows = newRows; - this.size = this.rows.length; - this.startPos = start; - return; - } - if (start > this.startPos) { //appending - if (this.startPos + this.rows.length < start) { - this.rows = newRows; - this.startPos = start;// - } else { - this.rows = this.rows.concat( newRows.slice(0, newRows.length)); - if (this.rows.length > this.maxBufferSize) { - var fullSize = this.rows.length; - this.rows = this.rows.slice(this.rows.length - this.maxBufferSize, this.rows.length) - this.startPos = this.startPos + (fullSize - this.rows.length); - } - } - } else { //prepending - if (start + newRows.length < this.startPos) { - this.rows = newRows; - } else { - this.rows = newRows.slice(0, this.startPos).concat(this.rows); - if (this.rows.length > this.maxBufferSize) - this.rows = this.rows.slice(0, this.maxBufferSize) - } - this.startPos = start; - } - this.size = this.rows.length; - }, - - clear: function() { - this.rows = new Array(); - this.startPos = 0; - this.size = 0; - }, - - isOverlapping: function(start, size) { - return ((start < this.endPos()) && (this.startPos < start + size)) || (this.endPos() == 0) - }, - - isInRange: function(position) { - return (position >= this.startPos) && (position + this.metaData.getPageSize() <= this.endPos()); - //&& this.size() != 0; - }, - - isNearingTopLimit: function(position) { - return position - this.startPos < this.metaData.getLimitTolerance(); - }, - - endPos: function() { - return this.startPos + this.rows.length; - }, - - isNearingBottomLimit: function(position) { - return this.endPos() - (position + this.metaData.getPageSize()) < this.metaData.getLimitTolerance(); - }, - - isAtTop: function() { - return this.startPos == 0; - }, - - isAtBottom: function() { - return this.endPos() == this.metaData.getTotalRows(); - }, - - isNearingLimit: function(position) { - return ( !this.isAtTop() && this.isNearingTopLimit(position)) || - ( !this.isAtBottom() && this.isNearingBottomLimit(position) ) - }, - - getFetchSize: function(offset) { - var adjustedOffset = this.getFetchOffset(offset); - var adjustedSize = 0; - if (adjustedOffset >= this.startPos) { //apending - var endFetchOffset = this.maxFetchSize + adjustedOffset; - if (endFetchOffset > this.metaData.totalRows) - endFetchOffset = this.metaData.totalRows; - adjustedSize = endFetchOffset - adjustedOffset; - } else {//prepending - var adjustedSize = this.startPos - adjustedOffset; - if (adjustedSize > this.maxFetchSize) - adjustedSize = this.maxFetchSize; - } - return adjustedSize; - }, - - getFetchOffset: function(offset) { - var adjustedOffset = offset; - if (offset > this.startPos) //apending - adjustedOffset = (offset > this.endPos()) ? offset : this.endPos(); - else { //prepending - if (offset + this.maxFetchSize >= this.startPos) { - var adjustedOffset = this.startPos - this.maxFetchSize; - if (adjustedOffset < 0) - adjustedOffset = 0; - } - } - this.lastOffset = adjustedOffset; - return adjustedOffset; - }, - - getRows: function(start, count) { - var begPos = start - this.startPos - var endPos = begPos + count - - // er? need more data... - if ( endPos > this.size ) - endPos = this.size - - var results = new Array() - var index = 0; - for ( var i=begPos ; i < endPos; i++ ) { - results[index++] = this.rows[i] - } - return results - }, - - convertSpaces: function(s) { - return s.split(" ").join(" "); - } - -}; - - -//Rico.GridViewPort -------------------------------------------------- -Rico.GridViewPort = Class.create(); - -Rico.GridViewPort.prototype = { - - initialize: function(table, rowHeight, visibleRows, buffer, liveGrid) { - this.lastDisplayedStartPos = 0; - this.div = table.parentNode; - this.table = table - this.rowHeight = rowHeight; - this.div.style.height = this.rowHeight * visibleRows; - this.div.style.overflow = "hidden"; - this.buffer = buffer; - this.liveGrid = liveGrid; - this.visibleRows = visibleRows + 1; - this.lastPixelOffset = 0; - this.startPos = 0; - }, - - populateRow: function(htmlRow, row) { - for (var j=0; j < row.length; j++) { - htmlRow.cells[j].innerHTML = row[j] - } - }, - - bufferChanged: function() { - this.refreshContents( parseInt(this.lastPixelOffset / this.rowHeight)); - }, - - clearRows: function() { - if (!this.isBlank) { - for (var i=0; i < this.visibleRows; i++) - this.populateRow(this.table.rows[i], this.buffer.getBlankRow()); - this.isBlank = true; - } - }, - - clearContents: function() { - this.clearRows(); - this.scrollTo(0); - this.startPos = 0; - this.lastStartPos = -1; - }, - - refreshContents: function(startPos) { - if (startPos == this.lastRowPos && !this.isPartialBlank && !this.isBlank) { - return; - } - if ((startPos + this.visibleRows < this.buffer.startPos) - || (this.buffer.startPos + this.buffer.size < startPos) - || (this.buffer.size == 0)) { - this.clearRows(); - return; - } - this.isBlank = false; - var viewPrecedesBuffer = this.buffer.startPos > startPos - var contentStartPos = viewPrecedesBuffer ? this.buffer.startPos: startPos; - - var contentEndPos = (this.buffer.startPos + this.buffer.size < startPos + this.visibleRows) - ? this.buffer.startPos + this.buffer.size - : startPos + this.visibleRows; - var rowSize = contentEndPos - contentStartPos; - var rows = this.buffer.getRows(contentStartPos, rowSize ); - var blankSize = this.visibleRows - rowSize; - var blankOffset = viewPrecedesBuffer ? 0: rowSize; - var contentOffset = viewPrecedesBuffer ? blankSize: 0; - - for (var i=0; i < rows.length; i++) {//initialize what we have - this.populateRow(this.table.rows[i + contentOffset], rows[i]); - } - for (var i=0; i < blankSize; i++) {// blank out the rest - this.populateRow(this.table.rows[i + blankOffset], this.buffer.getBlankRow()); - } - this.isPartialBlank = blankSize > 0; - this.lastRowPos = startPos; - }, - - scrollTo: function(pixelOffset) { - if (this.lastPixelOffset == pixelOffset) - return; - - this.refreshContents(parseInt(pixelOffset / this.rowHeight)) - this.div.scrollTop = pixelOffset % this.rowHeight - - this.lastPixelOffset = pixelOffset; - }, - - visibleHeight: function() { - return parseInt(this.div.style.height); - } - -}; - - -Rico.LiveGridRequest = Class.create(); -Rico.LiveGridRequest.prototype = { - initialize: function( requestOffset, options ) { - this.requestOffset = requestOffset; - } -}; - -// Rico.LiveGrid ----------------------------------------------------- - -Rico.LiveGrid = Class.create(); - -Rico.LiveGrid.prototype = { - - initialize: function( tableId, visibleRows, totalRows, url, options ) { - if ( options == null ) - options = {}; - - this.tableId = tableId; - this.table = $(tableId); - var columnCount = this.table.rows[0].cells.length - this.metaData = new Rico.LiveGridMetaData(visibleRows, totalRows, columnCount, options); - this.buffer = new Rico.LiveGridBuffer(this.metaData); - - var rowCount = this.table.rows.length; - this.viewPort = new Rico.GridViewPort(this.table, - this.table.offsetHeight/rowCount, - visibleRows, - this.buffer, this); - this.scroller = new Rico.LiveGridScroller(this,this.viewPort); - - this.additionalParms = options.requestParameters || []; - - options.sortHandler = this.sortHandler.bind(this); - - if ( $(tableId + '_header') ) - this.sort = new Rico.LiveGridSort(tableId + '_header', options) - - this.processingRequest = null; - this.unprocessedRequest = null; - - this.initAjax(url); - if ( options.prefetchBuffer || options.prefetchOffset > 0) { - var offset = 0; - if (options.offset ) { - offset = options.offset; - this.scroller.moveScroll(offset); - this.viewPort.scrollTo(this.scroller.rowToPixel(offset)); - } - if (options.sortCol) { - this.sortCol = options.sortCol; - this.sortDir = options.sortDir; - } - this.requestContentRefresh(offset); - } - }, - - resetContents: function() { - this.scroller.moveScroll(0); - this.buffer.clear(); - this.viewPort.clearContents(); - }, - - sortHandler: function(column) { - this.sortCol = column.name; - this.sortDir = column.currentSort; - - this.resetContents(); - this.requestContentRefresh(0) - }, - - setRequestParams: function() { - this.additionalParms = []; - for ( var i=0 ; i < arguments.length ; i++ ) - this.additionalParms[i] = arguments[i]; - }, - - setTotalRows: function( newTotalRows ) { - this.resetContents(); - this.metaData.setTotalRows(newTotalRows); - this.scroller.updateSize(); - }, - - initAjax: function(url) { - ajaxEngine.registerRequest( this.tableId + '_request', url ); - ajaxEngine.registerAjaxObject( this.tableId + '_updater', this ); - }, - - invokeAjax: function() { - }, - - handleTimedOut: function() { - //server did not respond in 4 seconds... assume that there could have been - //an error or something, and allow requests to be processed again... - this.processingRequest = null; - this.processQueuedRequest(); - }, - - fetchBuffer: function(offset) { - if ( this.buffer.isInRange(offset) && - !this.buffer.isNearingLimit(offset)) { - return; - } - if (this.processingRequest) { - this.unprocessedRequest = new Rico.LiveGridRequest(offset); - return; - } - var bufferStartPos = this.buffer.getFetchOffset(offset); - this.processingRequest = new Rico.LiveGridRequest(offset); - this.processingRequest.bufferOffset = bufferStartPos; - var fetchSize = this.buffer.getFetchSize(offset); - var partialLoaded = false; - var callParms = []; - callParms.push(this.tableId + '_request'); - callParms.push('id=' + this.tableId); - callParms.push('page_size=' + fetchSize); - callParms.push('offset=' + bufferStartPos); - if ( this.sortCol) { - callParms.push('sort_col=' + this.sortCol); - callParms.push('sort_dir=' + this.sortDir); - } - - for( var i=0 ; i < this.additionalParms.length ; i++ ) - callParms.push(this.additionalParms[i]); - ajaxEngine.sendRequest.apply( ajaxEngine, callParms ); - - this.timeoutHandler = setTimeout( this.handleTimedOut.bind(this), 20000 ); //todo: make as option - }, - - requestContentRefresh: function(contentOffset) { - this.fetchBuffer(contentOffset); - }, - - ajaxUpdate: function(ajaxResponse) { - try { - clearTimeout( this.timeoutHandler ); - this.buffer.update(ajaxResponse,this.processingRequest.bufferOffset); - this.viewPort.bufferChanged(); - } - catch(err) {} - finally {this.processingRequest = null; } - this.processQueuedRequest(); - }, - - processQueuedRequest: function() { - if (this.unprocessedRequest != null) { - this.requestContentRefresh(this.unprocessedRequest.requestOffset); - this.unprocessedRequest = null - } - } - -}; - - -//-------------------- ricoLiveGridSort.js -Rico.LiveGridSort = Class.create(); - -Rico.LiveGridSort.prototype = { - - initialize: function(headerTableId, options) { - this.headerTableId = headerTableId; - this.headerTable = $(headerTableId); - this.setOptions(options); - this.applySortBehavior(); - - if ( this.options.sortCol ) { - this.setSortUI( this.options.sortCol, this.options.sortDir ); - } - }, - - setSortUI: function( columnName, sortDirection ) { - var cols = this.options.columns; - for ( var i = 0 ; i < cols.length ; i++ ) { - if ( cols[i].name == columnName ) { - this.setColumnSort(i, sortDirection); - break; - } - } - }, - - setOptions: function(options) { - this.options = { - sortAscendImg: 'images/sort_asc.gif', - sortDescendImg: 'images/sort_desc.gif', - imageWidth: 9, - imageHeight: 5, - ajaxSortURLParms: [] - }.extend(options); - - // preload the images... - new Image().src = this.options.sortAscendImg; - new Image().src = this.options.sortDescendImg; - - this.sort = options.sortHandler; - if ( !this.options.columns ) - this.options.columns = this.introspectForColumnInfo(); - else { - // allow client to pass { columns: [ ["a", true], ["b", false] ] } - // and convert to an array of Rico.TableColumn objs... - this.options.columns = this.convertToTableColumns(this.options.columns); - } - }, - - applySortBehavior: function() { - var headerRow = this.headerTable.rows[0]; - var headerCells = headerRow.cells; - for ( var i = 0 ; i < headerCells.length ; i++ ) { - this.addSortBehaviorToColumn( i, headerCells[i] ); - } - }, - - addSortBehaviorToColumn: function( n, cell ) { - if ( this.options.columns[n].isSortable() ) { - cell.id = this.headerTableId + '_' + n; - cell.style.cursor = 'pointer'; - cell.onclick = this.headerCellClicked.bindAsEventListener(this); - cell.innerHTML = cell.innerHTML + '' - + '   '; - } - }, - - // event handler.... - headerCellClicked: function(evt) { - var eventTarget = evt.target ? evt.target : evt.srcElement; - var cellId = eventTarget.id; - var columnNumber = parseInt(cellId.substring( cellId.lastIndexOf('_') + 1 )); - var sortedColumnIndex = this.getSortedColumnIndex(); - if ( sortedColumnIndex != -1 ) { - if ( sortedColumnIndex != columnNumber ) { - this.removeColumnSort(sortedColumnIndex); - this.setColumnSort(columnNumber, Rico.TableColumn.SORT_ASC); - } - else - this.toggleColumnSort(sortedColumnIndex); - } - else - this.setColumnSort(columnNumber, Rico.TableColumn.SORT_ASC); - - if (this.options.sortHandler) { - this.options.sortHandler(this.options.columns[columnNumber]); - } - }, - - removeColumnSort: function(n) { - this.options.columns[n].setUnsorted(); - this.setSortImage(n); - }, - - setColumnSort: function(n, direction) { - this.options.columns[n].setSorted(direction); - this.setSortImage(n); - }, - - toggleColumnSort: function(n) { - this.options.columns[n].toggleSort(); - this.setSortImage(n); - }, - - setSortImage: function(n) { - var sortDirection = this.options.columns[n].getSortDirection(); - - var sortImageSpan = $( this.headerTableId + '_img_' + n ); - if ( sortDirection == Rico.TableColumn.UNSORTED ) - sortImageSpan.innerHTML = '  '; - else if ( sortDirection == Rico.TableColumn.SORT_ASC ) - sortImageSpan.innerHTML = '  '; - else if ( sortDirection == Rico.TableColumn.SORT_DESC ) - sortImageSpan.innerHTML = '  '; - }, - - getSortedColumnIndex: function() { - var cols = this.options.columns; - for ( var i = 0 ; i < cols.length ; i++ ) { - if ( cols[i].isSorted() ) - return i; - } - - return -1; - }, - - introspectForColumnInfo: function() { - var columns = new Array(); - var headerRow = this.headerTable.rows[0]; - var headerCells = headerRow.cells; - for ( var i = 0 ; i < headerCells.length ; i++ ) - columns.push( new Rico.TableColumn( this.deriveColumnNameFromCell(headerCells[i],i), true ) ); - return columns; - }, - - convertToTableColumns: function(cols) { - var columns = new Array(); - for ( var i = 0 ; i < cols.length ; i++ ) - columns.push( new Rico.TableColumn( cols[i][0], cols[i][1] ) ); - }, - - deriveColumnNameFromCell: function(cell,columnNumber) { - var cellContent = cell.innerText != undefined ? cell.innerText : cell.textContent; - return cellContent ? cellContent.toLowerCase().split(' ').join('_') : "col_" + columnNumber; - } -}; - -Rico.TableColumn = Class.create(); - -Rico.TableColumn.UNSORTED = 0; -Rico.TableColumn.SORT_ASC = "ASC"; -Rico.TableColumn.SORT_DESC = "DESC"; - -Rico.TableColumn.prototype = { - initialize: function(name, sortable) { - this.name = name; - this.sortable = sortable; - this.currentSort = Rico.TableColumn.UNSORTED; - }, - - isSortable: function() { - return this.sortable; - }, - - isSorted: function() { - return this.currentSort != Rico.TableColumn.UNSORTED; - }, - - getSortDirection: function() { - return this.currentSort; - }, - - toggleSort: function() { - if ( this.currentSort == Rico.TableColumn.UNSORTED || this.currentSort == Rico.TableColumn.SORT_DESC ) - this.currentSort = Rico.TableColumn.SORT_ASC; - else if ( this.currentSort == Rico.TableColumn.SORT_ASC ) - this.currentSort = Rico.TableColumn.SORT_DESC; - }, - - setUnsorted: function(direction) { - this.setSorted(Rico.TableColumn.UNSORTED); - }, - - setSorted: function(direction) { - // direction must by one of Rico.TableColumn.UNSORTED, .SORT_ASC, or .SET_DESC... - this.currentSort = direction; - } - -}; - - -//-------------------- ricoUtil.js - -var RicoUtil = { - - getElementsComputedStyle: function ( htmlElement, cssProperty, mozillaEquivalentCSS) { - if ( arguments.length == 2 ) - mozillaEquivalentCSS = cssProperty; - - var el = $(htmlElement); - if ( el.currentStyle ) - return el.currentStyle[cssProperty]; - else - return document.defaultView.getComputedStyle(el, null).getPropertyValue(mozillaEquivalentCSS); - }, - - createXmlDocument : function() { - if (document.implementation && document.implementation.createDocument) { - var doc = document.implementation.createDocument("", "", null); - - if (doc.readyState == null) { - doc.readyState = 1; - doc.addEventListener("load", function () { - doc.readyState = 4; - if (typeof doc.onreadystatechange == "function") - doc.onreadystatechange(); - }, false); - } - - return doc; - } - - if (window.ActiveXObject) - return Try.these( - function() { return new ActiveXObject('MSXML2.DomDocument') }, - function() { return new ActiveXObject('Microsoft.DomDocument')}, - function() { return new ActiveXObject('MSXML.DomDocument') }, - function() { return new ActiveXObject('MSXML3.DomDocument') } - ) || false; - - return null; - }, - - getContentAsString: function( parentNode ) { - return parentNode.xml != undefined ? - this._getContentAsStringIE(parentNode) : - this._getContentAsStringMozilla(parentNode); - }, - - _getContentAsStringIE: function(parentNode) { - var contentStr = ""; - for ( var i = 0 ; i < parentNode.childNodes.length ; i++ ) - contentStr += parentNode.childNodes[i].xml; - return contentStr; - }, - - _getContentAsStringMozilla: function(parentNode) { - var xmlSerializer = new XMLSerializer(); - var contentStr = ""; - for ( var i = 0 ; i < parentNode.childNodes.length ; i++ ) - contentStr += xmlSerializer.serializeToString(parentNode.childNodes[i]); - return contentStr; - }, - - toViewportPosition: function(element) { - return this._toAbsolute(element,true); - }, - - toDocumentPosition: function(element) { - return this._toAbsolute(element,false); - }, - - /** - * Compute the elements position in terms of the window viewport - * so that it can be compared to the position of the mouse (dnd) - * This is additions of all the offsetTop,offsetLeft values up the - * offsetParent hierarchy, ...taking into account any scrollTop, - * scrollLeft values along the way... - * - * IE has a bug reporting a correct offsetLeft of elements within a - * a relatively positioned parent!!! - **/ - _toAbsolute: function(element,accountForDocScroll) { - - if ( navigator.userAgent.toLowerCase().indexOf("msie") == -1 ) - return this._toAbsoluteMozilla(element,accountForDocScroll); - - var x = 0; - var y = 0; - var parent = element; - while ( parent ) { - - var borderXOffset = 0; - var borderYOffset = 0; - if ( parent != element ) { - var borderXOffset = parseInt(this.getElementsComputedStyle(parent, "borderLeftWidth" )); - var borderYOffset = parseInt(this.getElementsComputedStyle(parent, "borderTopWidth" )); - borderXOffset = isNaN(borderXOffset) ? 0 : borderXOffset; - borderYOffset = isNaN(borderYOffset) ? 0 : borderYOffset; - } - - x += parent.offsetLeft - parent.scrollLeft + borderXOffset; - y += parent.offsetTop - parent.scrollTop + borderYOffset; - parent = parent.offsetParent; - } - - if ( accountForDocScroll ) { - x -= this.docScrollLeft(); - y -= this.docScrollTop(); - } - - return { x:x, y:y }; - }, - - /** - * Mozilla did not report all of the parents up the hierarchy via the - * offsetParent property that IE did. So for the calculation of the - * offsets we use the offsetParent property, but for the calculation of - * the scrollTop/scrollLeft adjustments we navigate up via the parentNode - * property instead so as to get the scroll offsets... - * - **/ - _toAbsoluteMozilla: function(element,accountForDocScroll) { - var x = 0; - var y = 0; - var parent = element; - while ( parent ) { - x += parent.offsetLeft; - y += parent.offsetTop; - parent = parent.offsetParent; - } - - parent = element; - while ( parent && - parent != document.body && - parent != document.documentElement ) { - if ( parent.scrollLeft ) - x -= parent.scrollLeft; - if ( parent.scrollTop ) - y -= parent.scrollTop; - parent = parent.parentNode; - } - - if ( accountForDocScroll ) { - x -= this.docScrollLeft(); - y -= this.docScrollTop(); - } - - return { x:x, y:y }; - }, - - docScrollLeft: function() { - if ( window.pageXOffset ) - return window.pageXOffset; - else if ( document.documentElement && document.documentElement.scrollLeft ) - return document.documentElement.scrollLeft; - else if ( document.body ) - return document.body.scrollLeft; - else - return 0; - }, - - docScrollTop: function() { - if ( window.pageYOffset ) - return window.pageYOffset; - else if ( document.documentElement && document.documentElement.scrollTop ) - return document.documentElement.scrollTop; - else if ( document.body ) - return document.body.scrollTop; - else - return 0; - } - -}; diff --git a/scorecard_tool/web-app/js/prototype/scriptaculous.js b/scorecard_tool/web-app/js/prototype/scriptaculous.js deleted file mode 100644 index 6bf437acc..000000000 --- a/scorecard_tool/web-app/js/prototype/scriptaculous.js +++ /dev/null @@ -1,68 +0,0 @@ -// script.aculo.us scriptaculous.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 - -// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// For details, see the script.aculo.us web site: http://script.aculo.us/ - -var Scriptaculous = { - Version: '1.8.3', - require: function(libraryName) { - try{ - // inserting via DOM fails in Safari 2.0, so brute force approach - document.write(' + + + + diff --git a/src/web/WEB-INF/includes/contest/editTab.jsp b/src/web/WEB-INF/includes/contest/editTab.jsp index d401d249b..3208fb92a 100644 --- a/src/web/WEB-INF/includes/contest/editTab.jsp +++ b/src/web/WEB-INF/includes/contest/editTab.jsp @@ -1,6 +1,6 @@ <%-- - - Version: 2.5 - - Copyright (C) 2010 - 2016 TopCoder Inc., All Rights Reserved. + - Version: 2.6 + - Copyright (C) 2010 - 2017 TopCoder Inc., All Rights Reserved. - - Description: Edit Tab for studio contest detail page - @@ -50,6 +50,9 @@ - - Version 2.5 (TOPCODER DIRECT - IMPROVEMENT FOR PRE-REGISTER MEMBERS WHEN LAUNCHING CHALLENGES) - Add Pre-Register user for private challenge + - + - Version 2.6 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES): + - - Add section for display and edit challenge group --%> <%@ include file="/WEB-INF/includes/taglibs.jsp" %> @@ -141,11 +144,16 @@ : + + Group(s): + : + + Created By : - + <%----%> <%--Challenge Fee--%> <%--: $--%> @@ -308,16 +316,20 @@ Assign Member(s): -

    +
    + Group(s): +
    +
    +

    Created By -

    +

    cancel save -

    -
    +

    +
    @@ -736,7 +748,6 @@
    -

    Final Deliverables
    diff --git a/src/web/WEB-INF/includes/contest/editTabMarathon.jsp b/src/web/WEB-INF/includes/contest/editTabMarathon.jsp index 51ea087d9..1e29aa1ce 100644 --- a/src/web/WEB-INF/includes/contest/editTabMarathon.jsp +++ b/src/web/WEB-INF/includes/contest/editTabMarathon.jsp @@ -1,6 +1,6 @@ <%-- - - Version: 1.6 - - Copyright (C) 2013 - 2016 TopCoder Inc., All Rights Reserved. + - Version: 1.7 + - Copyright (C) 2013 - 2017 TopCoder Inc., All Rights Reserved. - - Version 1.1 BUGR-8788 (TC Cockpit - New Client Billing Config Type) change notes: - - change on #billingProjects, will load by jquery @@ -24,6 +24,8 @@ - Version 1.6 (TOPCODER DIRECT - IMPROVEMENT FOR PRE-REGISTER MEMBERS WHEN LAUNCHING CHALLENGES) - Add Pre-Register user for private challenge - + - Version 1.7 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES): + - - Add section for display and edit challenge group --%> <%@ include file="/WEB-INF/includes/taglibs.jsp" %> @@ -103,14 +105,17 @@ Challenge Fee : $ + Assign Member(s): : + - Created By - : + Group(s): + : + Created By : @@ -242,23 +247,27 @@ Task -

    +
    Assign Member(s):
    -

    - +
    +
    + Group(s): +
    +
    +

    Created By - - +
    +

    + cancel + save +

    +
    -

    - cancel - save -

    -
    +
    diff --git a/src/web/WEB-INF/includes/contest/editTabSoftware.jsp b/src/web/WEB-INF/includes/contest/editTabSoftware.jsp index 60ced1c87..d7f5f33e4 100644 --- a/src/web/WEB-INF/includes/contest/editTabSoftware.jsp +++ b/src/web/WEB-INF/includes/contest/editTabSoftware.jsp @@ -1,6 +1,6 @@ <%-- - - Version: 2.9 - - Copyright (C) 2010 - 2016 TopCoder Inc., All Rights Reserved. + - Version: 2.10 + - Copyright (C) 2010 - 2017 TopCoder Inc., All Rights Reserved. - - Description: This page fragment renders edit softeware contest page. - @@ -73,6 +73,8 @@ - Version 2.9 (Provide Way To Pre_register members When Launching Challenge) - - pre-register member support - + - Version 2.10 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES): + - - Add section for display and edit challenge group --%> <%@ include file="/WEB-INF/includes/taglibs.jsp" %> @@ -162,6 +164,11 @@ : + + Group(s): + : + + Created By : @@ -325,17 +332,19 @@
    -
    Task
    -
    Assign Member(s):
    -

    +
    + Group(s): +
    +
    +

    Created By @@ -344,8 +353,6 @@
    - -

    cancel @@ -778,7 +785,7 @@ - +

    Catalog Name @@ -943,7 +950,6 @@

    - diff --git a/src/web/WEB-INF/includes/launch/contestSelection.jsp b/src/web/WEB-INF/includes/launch/contestSelection.jsp index ec9625523..8a054df3d 100644 --- a/src/web/WEB-INF/includes/launch/contestSelection.jsp +++ b/src/web/WEB-INF/includes/launch/contestSelection.jsp @@ -201,7 +201,12 @@ - +
    + +
    +
    +
    +
    diff --git a/src/web/WEB-INF/includes/launch/overview.jsp b/src/web/WEB-INF/includes/launch/overview.jsp index a9a050703..e638e5272 100644 --- a/src/web/WEB-INF/includes/launch/overview.jsp +++ b/src/web/WEB-INF/includes/launch/overview.jsp @@ -1,7 +1,7 @@ <%-- - - Author: isv, Ghost_141, GreatKevin, Veve - - Version: 1.8 - - Copyright (C) 2010 - 2014 TopCoder Inc., All Rights Reserved. + - Author: isv, Ghost_141, GreatKevin, Veve, TCSCODER + - Version: 1.9 + - Copyright (C) 2010 - 2017 TopCoder Inc., All Rights Reserved. - - Description: overview page for studio contest. - @@ -21,6 +21,9 @@ - - Version 1.8 (TopCoder Direct - Design Challenge Track Studio Cup Point Flag) - Add studio cup points checkbox and studio cup points display + - + - Version 1.9 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES): + - - Add section for adding challenge group --%> <%@ include file="/WEB-INF/includes/taglibs.jsp" %> @@ -62,7 +65,6 @@ -
    diff --git a/src/web/WEB-INF/includes/launch/overviewAlgorithm.jsp b/src/web/WEB-INF/includes/launch/overviewAlgorithm.jsp index 0903675c5..e1aaf726d 100644 --- a/src/web/WEB-INF/includes/launch/overviewAlgorithm.jsp +++ b/src/web/WEB-INF/includes/launch/overviewAlgorithm.jsp @@ -1,11 +1,14 @@ <%-- - - Author: bugbuka, GreatKevin - - Version: 1.1 - - Copyright (C) 2013 TopCoder Inc., All Rights Reserved. + - Author: bugbuka, GreatKevin, TCSCODER + - Version: 1.3 + - Copyright (C) 2013 - 2017 TopCoder Inc., All Rights Reserved. - - Version 1.2 (Module Assembly - TC Cockpit Launch Code Contest) - - Add a specific CSS class for algorithm contest prize add and remove - + - Version 1.3 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES): + - - Add section for adding challenge group + - - Description: This page fragment renders edit algorithm contest page. --%> <%@ include file="/WEB-INF/includes/taglibs.jsp" %> @@ -41,7 +44,6 @@
    -

    File Upload (20MB maximum):

    diff --git a/src/web/WEB-INF/includes/launch/overviewSoftware.jsp b/src/web/WEB-INF/includes/launch/overviewSoftware.jsp index c1413c1fe..e2d55a830 100644 --- a/src/web/WEB-INF/includes/launch/overviewSoftware.jsp +++ b/src/web/WEB-INF/includes/launch/overviewSoftware.jsp @@ -1,7 +1,7 @@ <%-- - - Author: isv, Ghost_141, GreatKevin - - Version: 1.9 - - Copyright (C) 2010 - 2014 TopCoder Inc., All Rights Reserved. + - Author: isv, Ghost_141, GreatKevin, TCSCODER + - Version: 1.10 + - Copyright (C) 2010 - 2017 TopCoder Inc., All Rights Reserved. - - Description: This page fragment renders edit softeware contest page. - @@ -32,6 +32,9 @@ - - Version 1.9 (F2F - TC Cockpit Update Bug Hunt type) - - Make the spec review alone, so it can be displayed for bug hunt challenge + - + - Version 1.10 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES): + - - Add section for adding challenge group --%> <%@ include file="/WEB-INF/includes/taglibs.jsp" %> diff --git a/src/web/WEB-INF/includes/launch/review.jsp b/src/web/WEB-INF/includes/launch/review.jsp index 79597afb5..625b3fbff 100644 --- a/src/web/WEB-INF/includes/launch/review.jsp +++ b/src/web/WEB-INF/includes/launch/review.jsp @@ -1,7 +1,7 @@ <%-- - - Author: TCSASSEMBER - - Version: 1.2 - - Copyright (C) 2010 TopCoder Inc., All Rights Reserved. + - Author: TCSASSEMBER, TCSCODER + - Version: 1.3 + - Copyright (C) 2010 - 2017 TopCoder Inc., All Rights Reserved. - - Description: review page for studio contest. - @@ -10,6 +10,9 @@ - - Remove End Date for project. - - Version 1.2 (Release Assembly - TopCoder Cockpit TinyMCE Editor Revamp) changes: new tinyMCE editor. + - + - Version 1.3 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES): + - - Add section for displaying challenge group --%> <%@ include file="/WEB-INF/includes/taglibs.jsp" %> @@ -54,6 +57,10 @@ End : Edit + + Group(s) : + Edit +
    diff --git a/src/web/WEB-INF/includes/launch/reviewAlgorithm.jsp b/src/web/WEB-INF/includes/launch/reviewAlgorithm.jsp index 072422172..d29b44502 100644 --- a/src/web/WEB-INF/includes/launch/reviewAlgorithm.jsp +++ b/src/web/WEB-INF/includes/launch/reviewAlgorithm.jsp @@ -1,9 +1,12 @@ <%-- - - Author: bugbuka - - Version: 1.0 - - Copyright (C) 2013 TopCoder Inc., All Rights Reserved. + - Author: bugbuka, TCSCCODER + - Version: 1.1 + - Copyright (C) 2013 - 2017 TopCoder Inc., All Rights Reserved. - - Description: review page for algorithm contest. + - + - Version 1.1 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES): + - - Add section for displaying challenge group --%> <%@ include file="/WEB-INF/includes/taglibs.jsp" %> @@ -40,6 +43,10 @@ End : Edit + + Group(s) : + Edit + diff --git a/src/web/WEB-INF/includes/launch/reviewSoftware.jsp b/src/web/WEB-INF/includes/launch/reviewSoftware.jsp index 12a3d7ef4..afc46198e 100644 --- a/src/web/WEB-INF/includes/launch/reviewSoftware.jsp +++ b/src/web/WEB-INF/includes/launch/reviewSoftware.jsp @@ -1,7 +1,7 @@ <%-- - - Author: GreatKevin - - Version: 1.5 - - Copyright (C) 2010 - 2013 TopCoder Inc., All Rights Reserved. + - Author: GreatKevin, TCSCODER + - Version: 1.6 + - Copyright (C) 2010 - 2017 TopCoder Inc., All Rights Reserved. - - Description: review page for software contest. - @@ -18,6 +18,9 @@ - - Version 1.5 (Module Assembly - TC Cockpit Launch F2F contest) - - Hide the uneeded prize for F2F contest + - + - Version 1.6 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES): + - - Add section for display and edit challenge group --%> <%@ include file="/WEB-INF/includes/taglibs.jsp" %> @@ -58,6 +61,10 @@ Checkpoint End : Edit + + Group(s) : + Edit + diff --git a/src/web/WEB-INF/includes/newHeader.jsp b/src/web/WEB-INF/includes/newHeader.jsp index 87dd1fce5..3b42c7c40 100644 --- a/src/web/WEB-INF/includes/newHeader.jsp +++ b/src/web/WEB-INF/includes/newHeader.jsp @@ -276,7 +276,7 @@
  • - Scorecard Management + Scorecard Management
  • diff --git a/src/web/WEB-INF/includes/oldHeader.jsp b/src/web/WEB-INF/includes/oldHeader.jsp index 02d29cef3..f179b7521 100644 --- a/src/web/WEB-INF/includes/oldHeader.jsp +++ b/src/web/WEB-INF/includes/oldHeader.jsp @@ -192,7 +192,7 @@
  • - Scorecards + Scorecards
  • @@ -266,7 +266,7 @@
  • - Scorecards + Scorecards
  • @@ -338,7 +338,7 @@
  • - Scorecards + Scorecards
  • @@ -404,7 +404,7 @@
  • - Scorecards + Scorecards
  • @@ -467,7 +467,7 @@
  • - Scorecards + Scorecards
  • @@ -526,7 +526,7 @@
  • - Scorecards + Scorecards
  • diff --git a/src/web/WEB-INF/launch-contest.jsp b/src/web/WEB-INF/launch-contest.jsp index 0a54c2a86..8c35b9664 100644 --- a/src/web/WEB-INF/launch-contest.jsp +++ b/src/web/WEB-INF/launch-contest.jsp @@ -21,8 +21,16 @@ + + + + + + diff --git a/src/web/css/direct/launchcontest.css b/src/web/css/direct/launchcontest.css index 34f7b8eb4..af73ffc17 100644 --- a/src/web/css/direct/launchcontest.css +++ b/src/web/css/direct/launchcontest.css @@ -1,5 +1,5 @@ /* -* Copyright (C) 2011 - 2014 TopCoder Inc., All Rights Reserved. +* Copyright (C) 2011 - 2017 TopCoder Inc., All Rights Reserved. * * This css used to render the launch new contest flow. * @@ -22,8 +22,11 @@ * - Update prize section to support on the fly cost calculation for design challenge * - Add checkpoint prize for dev challenge prize section and update on the fly cost calculation * -* Author: GreatKevin, TCSASSEMBLER -* Version 1.6 +* Version 1.7 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES): +* - Add section for project group + +* Author: GreatKevin, TCSASSEMBLER, TCSCODER +* Version 1.7 */ @charset "utf-8"; @@ -968,7 +971,7 @@ table.total td.toRight { /** prizesInner **/ /** prizesInner **/ -#button_tech, #button_platform { +#button_tech, #button_platform, .button_tech { height: 90px; padding-top: 40px; padding-bottom: 20px; @@ -1003,14 +1006,14 @@ table.total td.toRight { padding-left: 260px; } -#masterTechnologiesSelect, #masterPlatformsSelect { +#masterTechnologiesSelect, #masterPlatformsSelect, .masterGroupsSelect { overflow: scroll; height: 150px; width: 285px; float: left; } -#masterTechnologiesChoosenSelect, #masterPlatformsChoosenSelect { +#masterTechnologiesChoosenSelect, #masterPlatformsChoosenSelect, .masterGroupsChoosenSelect { overflow: scroll; height: 150px; width: 285px; @@ -3178,4 +3181,38 @@ div#selectWinnerConfirmation.outLay { div#winnerDiv { margin-top: -30px; padding: 10px; +} + +.rGroups td span { + border: #e7e7e7 solid 1px; + border-radius: 5px; + padding: 2px 5px 2px 5px; + margin-right: 5px; +} +#groupDiv{ + border: 1px solid #CCC; + border-radius: 5px; + margin-left: 132px; + width: 372px; +} +.ms-ctn-focus{ + background-color: #ffffff; +} +#groupDisplay #groupDiv{ + margin-left: 150px; +} +div#groupDisplay { + margin-top: 20px; +} +div#groupDisplay #groupDiv{ + margin-top: 20px; + width: 293px; +} +#groupDiv .ms-res-ctn .ms-res-item{ + font-size: 12px; + text-decoration: underline; + line-height: 20px; +} +#groupDiv .ms-res-ctn .ms-res-item-active { + background-color: #CCC; } \ No newline at end of file diff --git a/src/web/css/direct/magicsuggest.css b/src/web/css/direct/magicsuggest.css new file mode 100644 index 000000000..03ecac381 --- /dev/null +++ b/src/web/css/direct/magicsuggest.css @@ -0,0 +1,266 @@ +/** + * Multiple Selection Component for Bootstrap + * Check nicolasbize.github.io/magicsuggest/ for latest updates. + * + * Author: Nicolas Bize + * Created: Feb 8th 2013 + * Last Updated: Oct 16th 2014 + * Version: 2.1.4 + * Licence: MagicSuggest is licenced under MIT licence (http://opensource.org/licenses/MIT) + */ +.ms-ctn{ + position: relative; + padding: 5px 12px; + height: auto; +} +.ms-inv{ + border: 1px solid #CC0000; +} +.ms-ctn-readonly{ + cursor: pointer; +} +.ms-ctn-disabled{ + cursor: not-allowed; + background-color: #eeeeee; +} +.ms-ctn-bootstrap-focus, +.ms-ctn-bootstrap-focus .ms-res-ctn{ + border-color: rgba(82, 168, 236, 0.8) !important; + /* IE6-9 */ + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6) !important; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6) !important; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6) !important; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} +.ms-ctn-focus{ + border-color: #66afe9; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); +} +.ms-ctn input{ + border: 0; + box-shadow: none; + -webkit-transition: none; + outline: none; + display: block; + padding: 0; + line-height: 1.42857143; + margin: 1px 0; + width: 100%; +} +.ms-ctn .ms-sel-ctn input{ + float: left; +} +.ms-ctn-disabled input{ + cursor: not-allowed; + background-color: #eeeeee; +} +.ms-ctn .ms-input-readonly{ + cursor: pointer; +} +.ms-ctn .ms-empty-text{ + color: #DDD; +} +.ms-ctn input:focus{ + border: 0; + box-shadow: none; + -webkit-transition: none; + background: #FFF; +} +.ms-ctn input::-ms-clear { + width: 0; + height: 0; +} +.ms-ctn .ms-trigger{ + top: 0; + width: 25px; + height:100%; + position:absolute; + right:0; + background: transparent; + border-left: 1px solid #CCC; + cursor: pointer; +} +.ms-ctn .ms-trigger .ms-trigger-ico { + display: inline-block; + width: 0; + height: 0; + vertical-align: top; + border-top: 4px solid #333; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + content: ""; + margin-left: 8px; + margin-top: 15px; +} +.ms-ctn .ms-trigger:hover{ + background-color: #e6e6e6; +} +.ms-ctn .ms-trigger:hover .ms-trigger-ico{ + background-position: 0 -4px; +} +.ms-ctn-disabled .ms-trigger{ + cursor: not-allowed; + background-color: #eeeeee; +} +.ms-ctn-bootstrap-focus{ + border-bottom: 1px solid #CCC; +} +.ms-res-ctn{ + width: 100%; + display: block; + overflow-y: auto; +} +.ms-res-ctn .ms-res-group{ + line-height: 23px; + text-align: left; + padding: 2px 5px; + font-weight: bold; + border-bottom: 1px dotted #CCC; + border-top: 1px solid #CCC; + background: #f3edff; + color: #333; +} +.ms-res-ctn .ms-res-item{ + line-height: 25px; + text-align: left; + padding: 2px 5px; + color: #666; + cursor: pointer; +} +.ms-res-ctn .ms-res-item-grouped{ + padding-left: 15px; +} +.ms-res-ctn .ms-res-odd{ + background: #FAFAFA; +} +.ms-res-ctn .ms-res-item-active{ + background-color: #F5F5F5; +} +.ms-res-ctn .ms-res-item-disabled{ + color: #CCC; + cursor: default; +} +.ms-sel-ctn{ + overflow: auto; + line-height: 18px; + padding-right: 25px; +} +.ms-no-trigger .ms-sel-ctn{ + padding-right: 0; +} +/** Outer and global tags **/ +.ms-sel-ctn .ms-sel-item{ + background: #F3F3F3; + color: #999; + float: left; + font-size: 12px; + padding: 3px 5px; + border-radius: 3px; + border: 1px solid #DDD; + margin: 3px 0px 1px 0; +} +.ms-sel-ctn .ms-sel-invalid{ + border-color: rgb(248, 165, 165) !important; + background: #FDF2F2 !important; +} +.ms-sel-ctn .ms-sel-item:hover{ + border: 1px solid #BBB; +} +/** For inner tags **/ +.ms-ctn .ms-sel-item{ + background: #F3F3F3; + color: #999; + float: left; + font-size: 12px; + padding: 0 5px; + border-radius: 3px; + border: 1px solid #DDD; + margin: 1px 5px 1px 0; +} +.ms-ctn .ms-sel-item:hover{ + border: 1px solid transparent; +} +.ms-ctn-focus .ms-sel-item:hover{ + border: 1px solid #BBB; +} +.ms-sel-ctn .ms-sel-text{ + background: #FFF; + color: #666; + padding-right: 0; + margin-left: 0; + font-size: 14px; + font-weight: normal; +} +.ms-as-string .ms-sel-text{ + border-color: transparent; +} +.ms-res-ctn .ms-res-item em{ + font-style: normal; + background: #565656; + color: #FFF; +} +.ms-sel-ctn .ms-sel-text:hover{ + background: #FFF; +} +.ms-sel-ctn .ms-sel-item-active{ + border: 1px solid red; + background: #757575; +} +.ms-stacked .ms-sel-item{ + float: inherit; +} +.ms-sel-ctn .ms-sel-item .ms-close-btn{ + width: 7px; + cursor: pointer; + height: 7px; + float: right; + margin: 6px 2px 0 10px; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAOCAYAAADjXQYbAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAABSSURBVHjahI7BCQAwCAOTzpThHMHh3Kl9CVos9XckFwQAuPtGuWTWwMwaczKzyHsqg6+5JqMJr28BABHRwmTWQFJjTmYWOU1L4tdck9GE17dnALGAS+kAR/u2AAAAAElFTkSuQmCC); + background-position: 0 -7px; +} +.ms-sel-ctn .ms-sel-item .ms-close-btn:hover{ + background-position: 0 0; +} +.ms-stacked .ms-sel-item .ms-close-btn { + margin-left: 0px; +} +.ms-helper{ + color: #AAA; + font-size: 10px; + position: absolute; + top: -17px; + right: 0; +} +.ms-ctn.input-lg .ms-trigger .ms-trigger-ico { + margin-top: 17px +} +.ms-ctn.input-sm .ms-trigger .ms-trigger-ico { + margin-top: 13px +} +.ms-ctn.input-lg .ms-sel-ctn .ms-sel-item { + padding-top: 2px; + padding-bottom: 3px; +} +.ms-ctn.input-sm .ms-sel-ctn { + line-height: 15px; +} +.ms-ctn.input-sm .ms-sel-ctn .ms-sel-item { + padding-top: 1px; + padding-bottom: 1px; + margin-top:0; + margin-bottom: 0; +} +.ms-ctn.input-sm .ms-sel-ctn .ms-sel-item .ms-close-btn { + margin-top: 4px; +} +.ms-ctn .ms-sel-ctn { + margin-left: -7px; +} +.ms-ctn .ms-trigger:hover { + width:24px; + right: 1px; + border-radius: 0 3px 3px 0; +} diff --git a/src/web/css/scorecard/dashboard.css b/src/web/css/scorecard/dashboard.css deleted file mode 100644 index 2087401e4..000000000 --- a/src/web/css/scorecard/dashboard.css +++ /dev/null @@ -1,6971 +0,0 @@ -.coderTextRed, .coderTextYellow, .coderTextBlue, .coderTextGreen, .coderTextGray, .coderTextOrange { - background-color: transparent; - font-weight: bold; -} - -.coderTextRed:link, .coderTextYellow:link, .coderTextBlue:link, .coderTextGreen:link, .coderTextGray:link, .coderTextOrange:link, .coderTextWhite:link, .coderTextBlack:link { - text-decoration: none; -} - -.coderTextRed:visited, .coderTextYellow:visited, .coderTextBlue:visited, .coderTextGreen:visited, .coderTextGray:visited, .coderTextOrange:visited, .coderTextWhite:visited, .coderTextBlack:visited { - text-decoration: none; -} - -.coderTextRed:hover, .coderTextYellow:hover, .coderTextBlue:hover, .coderTextGreen:hover, .coderTextGray:hover, .coderTextOrange:hover, .coderTextWhite:hover, .coderTextBlack:hover { - text-decoration: underline; -} - -.coderTextRed:active, .coderTextYellow:active, .coderTextBlue:active, .coderTextGreen:active, .coderTextGray:active, .coderTextOrange:active, .coderTextWhite:active, .coderTextBlack:active { - text-decoration: underline; -} - -.coderTextOrange, .coderTextOrange:link, .coderTextOrange:visited, .coderTextOrange:hover, .coderTextOrange:active { - color: #FF9900; -} - -.coderTextRed, .coderTextRed:link, .coderTextRed:visited, .coderTextRed:hover, .coderTextRed:active { - color: #EE0000; -} - -.coderTextYellow, .coderTextYellow:link, .coderTextYellow:visited, .coderTextYellow:hover, .coderTextYellow:active { - color: #DDCC00; -} - -.coderTextBlue, .coderTextBlue:link, .coderTextBlue:visited, .coderTextBlue:hover, .coderTextBlue:active { - color: #6666FF; -} - -.coderTextGreen, .coderTextGreen:link, .coderTextGreen:visited, .coderTextGreen:hover, .coderTextGreen:active { - color: #00A900; -} - -.coderTextGray, .coderTextGray:link, .coderTextGray:visited, .coderTextGray:hover, .coderTextGray:active { - color: #999999; -} - -.coderTextWhite, .coderTextWhite:link, .coderTextWhite:visited, .coderTextWhite:hover, .coderTextWhite:active { - color: #FFFFFF; -} - -.coderTextBlack, .coderTextBlack:link, .coderTextBlack:visited, .coderTextBlack:hover, .coderTextBlack:active { - color: #000000; -} - -BODY#page { - background-color: #F6F6F6; - color: #333333; - font-family: "Source Sans Pro","Source Sans Pro",Arial,Helvetica,sans-serif ! important; - margin: 0px; - padding: 0px; -} - -#content { - min-width: 1000px; -} - -#header { - background: url("../../../images/header_dash_bg.png") repeat-x scroll 0% 0% transparent; - height: 120px; - position: relative; -} - -#header .logo { - color: #333333; - font-family: Geneva,"Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 16px; - left: 21px; - position: absolute; - text-decoration: none; - top: 44px; -} - -#header .projectLogo { - background: url("../../../images/project_logo.png") no-repeat scroll left center transparent; - padding-bottom: 3px; - padding-left: 40px; - padding-top: 7px; -} - -#header .helloUser { - font-size: 12px; - position: absolute; - right: 30px; - top: 8px; -} - -#header .helloUser UL { - list-style: none outside none; - margin: 0px; - padding: 0px; -} - -#header .helloUser LI { - color: #444444; - float: left; -} - -#header .helloUser LI strong { - color: #FFFFFE; -} - -#header .helloUser li.helloUserLink A { - color: #FFFFFE; - padding: 0px 5px; - text-decoration: none; -} - -#header .helloUser A:hover { - color: #908986; -} - -#header .helloUser A.user { - color: #EC1C23 ! important; - font-weight: bold; - padding-left: 0px; -} - -#header .helloUser li.helloUserLink A.help { - padding-top: 2px; -} - -#tabs0 { - background: none repeat scroll 0% 0% #362F2B; - height: 33px; - left: 0px; - position: absolute; - top: 0px; - width: 100%; -} - -#tabs0 UL { - height: 21px; - list-style: none outside none; - margin: 6px 0px 6px 25px; - padding: 0px; -} - -#tabs0 UL LI { - float: left; - margin-right: 15px; -} - -#tabs0 UL LI A { - color: #FFFFFE; - float: left; - font-size: 12px; - font-weight: bold; - height: 21px; - line-height: 21px; - text-decoration: none; -} - -#tabs0 UL LI A SPAN { - cursor: pointer; - display: inline-block; - float: left; - height: 21px; - margin-left: 4px; - padding: 0px 17px 0px 13px; - text-align: center; -} - -#tabs0 UL LI.on A { - background: url("../../../images/top_nav_button_left.png") no-repeat scroll left top transparent; - color: #262626; -} - -#tabs0 UL LI.on A:hover { - -} - -#tabs0 UL LI.on A SPAN { - background: url("../../../images/top_nav_button.png") no-repeat scroll right top transparent; -} - -#tabs0 UL LI A:hover { - background: url("../../../images/top_nav_button_left.png") no-repeat scroll 0px -21px transparent; - color: #262626; -} - -#tabs0 UL LI A:hover SPAN { - background: url("../../../images/top_nav_button.png") no-repeat scroll right -21px transparent; -} - -.scorecardLogo { - position: absolute; - right: 11px; - top: 54px; -} - -.roundedBox { - border: 1px solid #EDEDED; - margin: 8px 0px; - padding: 10px 0px; - position: relative; -} - -.tl, .tr, .bl, .br { - height: 4px; - position: absolute; - width: 4px; -} - -.tl { - background-position: 0px 0px; - left: -1px; - top: -1px; -} - -.tr { - background-position: -4px 0px; - right: -1px; - top: -1px; -} - -.bl { - background-position: 0px -4px; - bottom: -1px; - left: -1px; -} - -.br { - background-position: -4px -4px; - bottom: -1px; - right: -1px; -} - -.roundedBox.results { - margin: 0px; - top: -1px; -} - -#addScorecard2 .scorecardFind .row, #addScorecard .scorecardFind .row { - overflow: hidden; - width: 680px; -} - -#addScorecard2 .scorecardFind .row label.caption, #addScorecard .scorecardFind .row label.caption { - color: #333333; - display: inline; - float: left; - font-family: "Source Sans Pro",Arial; - font-size: 14px; - font-weight: bold; - height: 28px; - line-height: 28px; - margin-right: 20px; - text-align: right; - width: 220px; -} - -#addScorecard2 .scorecardFind .wide.row label.caption, #addScorecard .scorecardFind .wide.row label.caption { - height: 56px; -} - -#addScorecard2 .scorecardFind .row label.radioCaption, #addScorecard2 .scorecardFind .row label.checkCaption, #addScorecard .scorecardFind .row label.radioCaption, #addScorecard .scorecardFind .row label.checkCaption { - color: #333333; - float: left; - font-size: 12px; - line-height: 19px; - margin: 5px; - min-width: 125px; -} - -#addScorecard2 input.text, #addScorecard input.text, input.text { - background-color: inherit; - border: 1px solid #EDEDED; - color: #000000; - font-size: 11px; - height: 19px; - line-height: 19px; - margin: 5px; - padding: 0px 5px; - width: 370px; -} - -#addScorecard2 input.status, #addScorecard2 input.check, #addScorecard input.status, #addScorecard input.check, input.status, input.check { - margin-right: 5px; - margin-top: 1px; - vertical-align: text-top; -} - -#addScorecard2 select.combo, #addScorecard select.combo, select.combo { - font-size: 11px; - height: 19px; - line-height: 19px; - margin: 5px; - width: 215px; -} - -#addScorecard2 span.note, #addScorecard span.note, span.note { - color: #EC1C23; - font-size: 11px; -} - -.buttons { - margin-top: 15px; - overflow: hidden; -} - -.buttons a.button7 span.right, .buttons a.button6 span.right { - padding-left: 20px; - padding-right: 20px; -} - -.buttons a.button7 span.right { - background-color: inherit; - color: #ffffff; -} - -#tabs1 { - left: 21px; - position: absolute; - top: 99px; -} - -#tabs1 UL { - list-style: none outside none; - margin: 0px; - padding: 0px; -} - -#tabs1 UL LI { - float: left; - margin: 0px 3px; -} - -#tabs1 UL LI A { - background: none repeat scroll 0% 0% #FF8A00; - border-left: 1px solid #FF8A01; - border-right: 1px solid #FF8A01; - border-top: 1px solid #FF8A01; - color: #FFFFFF; - float: left; - font-size: 12px; - font-weight: bold; - text-decoration: none; -} - -#tabs1 UL LI A SPAN { - background: none repeat scroll 0% 0% #FF8A00; - color: #FFFFFE; - cursor: pointer; - float: left; - height: 20px; - padding-top: 8px; - text-align: center; - width: 160px; -} - -#tabs1.copilotsTabs1 UL LI A SPAN { - padding-left: 15px; - padding-right: 15px; - width: auto; -} - -#tabs1 UL LI A:hover { - background: none repeat scroll 0% 0% #FFFFFF; - border-color: #E7E7E7; - color: #666666; -} - -#tabs1 UL LI A:hover SPAN { - background: none repeat scroll 0% 0% #FFFFFF; - color: #666666; -} - -#tabs1 UL LI.on A { - background: none repeat scroll 0% 0% #FFFFFF; - border-color: #E7E7E7; - color: #666666; -} - -#tabs1 UL LI.on A SPAN { - background: none repeat scroll 0% 0% #FFFFFF; - color: #666666; -} - -#tabs1 ul li a span span.arrow { - background: url("/images/dropdown-arrow.png") no-repeat scroll 0px -30px transparent; - display: inline-block; - float: none; - height: 12px; - margin: 0px 0px 0px 5px; - padding: 0px; - width: 15px; -} - -#tabs1 ul li.on a span span.arrow { - background: url("/images/dropdown-arrow.png") no-repeat scroll 0px 0px transparent; -} - -#tabs1 ul li:hover a span span.arrow { - background: url("/images/dropdown-arrow.png") no-repeat scroll 0px -15px transparent; -} - -#tabs1 ul li .dropDwnLst { - -moz-border-bottom-colors: none; - -moz-border-left-colors: none; - -moz-border-right-colors: none; - -moz-border-top-colors: none; - background: url("/images/contest--box-bg.gif") repeat-x scroll 0% 0% #E7E7E8; - border-color: #E7E7E7 #E7E7E7 -moz-use-text-color; - border-image: none; - border-style: solid solid none; - border-width: 1px 1px medium; - display: none; - left: 0px; - line-height: 18px; - position: absolute; - top: 28px; - width: 190px; - z-index: 1000; -} - -#tabs1 ul li .dropDwnLst .section { - border-bottom: 1px solid #E7E7E7; - border-top: 1px solid #FFFFFF; - padding: 9px; -} - -#tabs1 ul li .dropDwnLst .section h3 { - font-size: 12px; - font-weight: bold; -} - -#tabs1 ul li .dropDwnLst .section a { - background: url("/images/dropdown-icon.png") no-repeat scroll 3px 5px transparent; - color: #000000; - display: block; - float: none; - font-size: 12px; - font-weight: normal; - padding-left: 13px; - text-decoration: underline; -} - -#tabs1 ul li .dropDwnLst .section a:hover { - text-decoration: none; -} - -#tabs2 { - position: absolute; - right: 21px; - top: 92px; -} - -#tabs2 UL { - list-style: none outside none; - margin: 0px; - padding: 0px; -} - -#tabs2 UL LI { - float: left; - margin: 0px 3px; -} - -#tabs2 UL LI.last { - margin-right: 100px; -} - -#tabs2 UL LI A { - background: url("../../../images/tabs2_left.png") no-repeat scroll left top #000000; - color: #FFFFFF; - float: left; - font-size: 12px; - font-weight: bold; - text-decoration: none; -} - -#tabs2 UL LI A SPAN { - background: url("../../../images/tabs2_right.png") no-repeat scroll right top transparent; - cursor: pointer; - float: left; - height: 20px; - padding-top: 8px; - text-align: center; - width: 100px; -} - -#tabs2 UL LI A:hover { - background-position: left bottom; -} - -#tabs2 UL LI A:hover SPAN { - background-position: right bottom; -} - -#tabs2 UL LI.on A { - background-position: left bottom; -} - -#tabs2 UL LI.on SPAN { - background-position: right bottom; -} - -.tabs3Container { - background: none repeat scroll 0% 0% rgba(0, 0, 0, 0) ! important; - margin: 0px; - padding: 0px; - width: 100%; -} - -#tabs3 { - height: 40px; - overflow: hidden; - width: 100%; -} - -#tabs3 UL { - background: url("../../../images/tabs3_bg.png") repeat-x scroll center top transparent; - height: 40px; - list-style: none outside none; - margin: 0px; - overflow: hidden; - padding: 0px; - width: 100%; -} - -#tabs3 UL LI { - float: left; - height: 40px; - margin: 0px; - overflow: hidden; - padding: 0px; - width: 20%; -} - -#tabs3 UL LI.lastItem { - float: none; - width: auto; -} - -#tabs3 UL LI A { - display: block; - font-size: 12px; - font-weight: bold; - height: 100%; - text-decoration: none; - width: 100%; -} - -#tabs3 UL LI A:hover { - background: url("../../../images/tabs3_bg_hover.png") repeat-x scroll 0% 0% transparent; -} - -#tabs3 UL LI A SPAN { - cursor: pointer; - float: left; - height: 40px; - width: 100%; -} - -#tabs3 UL LI A.first SPAN.left { - background: url("../../../images/tabs3_left.png") no-repeat scroll left top transparent; -} - -#tabs3 UL LI A.last SPAN.left { - background: url("../../../images/tabs3_right.png") no-repeat scroll right top transparent; -} - -#tabs3 UL LI A.last SPAN.right { - background: none repeat scroll 0% 0% transparent; -} - -#tabs3 UL LI A SPAN.right { - background: url("../../../images/tabs3_border.png") no-repeat scroll right top transparent; - height: 30px; - padding-top: 10px; - text-align: center; -} - -#tabs3 UL LI A.first:hover SPAN.left { - background-position: left bottom; -} - -#tabs3 UL LI A.last:hover SPAN.left { - background-position: right bottom; -} - -#tabs3 UL LI.on A { - background: url("../../../images/tabs3_on.png") repeat-x scroll center top rgba(0, 0, 0, 0) ! important; - color: #FFFFFF; - font-family: Verdana,Geneva,sans-serif; -} - -#tabs3 UL LI.off A SPAN.right { - color: #A9A9A9; -} - -#tabs3 UL LI.on A SPAN.right { - background: url("../../../images/tabs3_arrow.png") no-repeat scroll center bottom transparent; - height: 32px; - padding-top: 8px; -} - -#tabs3 UL LI.on A.first SPAN.left { - background: url("../../../images/tabs3_left_on.png") no-repeat scroll left center transparent; -} - -#tabs3 UL LI.on A.last SPAN.left { - background: url("../../../images/tabs3_right_on.png") no-repeat scroll right center transparent; -} - -.tabs4 { - padding-top: 10px; -} - -.tabs4 UL { - background: url("../../../images/content_border.png") repeat-x scroll center bottom transparent; - height: 21px; - list-style: none outside none; - margin: 0px; - padding: 0px; -} - -.tabs4 UL LI { - float: left; - margin: 0px 3px 0px 0px; - padding: 0px; -} - -.tabs4 UL LI A { - background: url("../../../images/tabs4_left.png") no-repeat scroll left center transparent; - cursor: pointer; - float: left; - font-size: 12px; - text-decoration: none; -} - -.tabs4 UL LI A SPAN { - background: url("../../../images/tabs4_right.png") no-repeat scroll right center transparent; - cursor: pointer; - float: left; - padding: 3px 10px; -} - -.tabs4 UL LI.on A { - background: url("../../../images/tabs4_left_on.png") no-repeat scroll left center transparent; - font-weight: bold; -} - -.tabs4 UL LI.on A SPAN { - background: url("../../../images/tabs4_right_on.png") no-repeat scroll right center transparent; -} - -.tabs4Content { - -moz-border-bottom-colors: none; - -moz-border-left-colors: none; - -moz-border-right-colors: none; - -moz-border-top-colors: none; - background-color: #E8E8E8; - border-color: -moz-use-text-color #BDBDBD #BDBDBD; - border-image: none; - border-style: none solid solid; - border-width: medium 1px 1px; - padding: 10px; -} - -.tabs4Content H2 { - font-size: 14px; - margin: 0px; - padding: 0px; -} - -.tabs4Content P { - font-size: 12px; - margin: 0px; - padding: 2px 0px; -} - -.tabs4Content .message P { - font-size: 11px; -} - -.details TABLE.projectStats { - margin-bottom: 5px; - margin-top: 5px; -} - -.details TABLE.projectStats TD { - background-color: #FFFFFF; - font-size: 12px ! important; - font-weight: normal ! important; - padding-left: 10px; - text-align: left; -} - -.details TABLE.projectStats TD.column1 { - width: 3%; -} - -.details TABLE.projectStats TD.column2 { - text-align: center; -} - -.details .questions { - padding: 5px 0px; -} - -.filesContainer { - height: 100%; - overflow: hidden; -} - -.file { - float: left; - font-size: 12px; - height: 80px; - padding: 10px 0px; - width: 45%; -} - -.file IMG { - float: left; -} - -.file .fileName { - float: left; - padding-left: 5px; - padding-top: 32px; -} - -#mainContent { - background: url("../../../images/area2_bg2.png") repeat-y scroll right center #FFFFFF; - color: #333333; - overflow: hidden; - width: 100%; -} - -#area1 { - padding-bottom: 100px; - padding-left: 25px; - padding-right: 290px; -} - -#area1 .currentPage { - color: #333333; - font-size: 11px; - padding-top: 10px; -} - -#area1 .currentPage A { - text-decoration: none; -} - -#area1 .currentPage A.home { - background: url("../../../images/home_ico.png") no-repeat scroll left 2px transparent; - padding-left: 15px; -} - -#area1 .currentPage A:hover { - text-decoration: underline; -} - -#area1 .areaHeader { - padding: 30px 0px 10px; - position: relative; -} - -#area1 .areaHeader p.leftAlign { - float: left; -} - -#area1 H2.title { - background: url("../../../images/area_title.png") no-repeat scroll left center transparent; - font-family: Geneva,"Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 16px; - font-weight: bold; - padding-bottom: 10px; - padding-left: 43px; - padding-top: 5px; -} - -#area1.scorecard H2.title { - background-image: url("../../../images/area_title2.png"); -} - -#area1 H2.title.details { - background-image: url("../../../images/area_title3.png"); -} - -#area1 H2.title.edit { - background-image: url("../../../images/area_title4.png"); -} - -#area1 H2.contestTitle { - background: url("../../../images/contest_ico.png") no-repeat scroll left center transparent; -} - -#area1 H2.notificationTitle { - background: url("../../../images/notification_ico.png") no-repeat scroll left center transparent; -} - -.areaHeader A.button1 { - position: absolute; - right: 0px; - top: 36px; -} - -.copilotArea { - background: url("../../../images/box_top2.png") no-repeat scroll center top transparent; - margin-top: 450px; - overflow: hidden; - padding: 15px 0px 15px 9px; - position: relative; -} - -.coPilotTitle { - background: url("../../../images/title2_left.png") no-repeat scroll left center transparent; - margin: 0px auto; - width: 210px; -} - -.coPilotTitle .titleInner { - background: url("../../../images/title2_right.png") no-repeat scroll right center transparent; - height: 35px; -} - -.coPilotTitle .titleInner A.title { - background: url("../../../images/help_ico2.png") no-repeat scroll right center transparent; - float: left; - font-family: Verdana,Geneva,sans-serif; - font-size: 14px; - font-weight: normal; - line-height: 35px; - padding-left: 11px; - text-decoration: none; - width: 70px; -} - -.copilotArea .number { - color: #EC1C23; - padding-left: 5px; - padding-right: 5px; -} - -.coPilotTitle .titleInner .button6 { - font-family: "Myriad Pro",Verdana,Geneva,sans-serif; - height: 24px; - margin-right: 10px; - margin-top: 5px; - text-align: center; - width: 45px; -} - -.coPilotTitle .titleInner .button6 SPAN.right { - padding-left: 8px; - padding-right: 25px; -} - -.coPilotContent { - color: #F8EFE5; - font-family: "Source Sans Pro",Arial,Verdana,Geneva,sans-serif; - font-size: 11px; - margin: 9px 0px 0px 28px; - overflow: hidden; -} - -.coPilotContent DL { - margin: 0px 0px 3px; - overflow: hidden; -} - -.coPilotContent DT { - float: left; - width: 190px; -} - -.coPilotContent DD { - float: left; - width: 20px; -} - -#area2 { - float: right; - width: 272px; -} - -.box { - background: url("../../../images/box_top2.png") no-repeat scroll center top transparent; - padding: 15px 0px 15px 9px; - position: static; -} - -.box H2 { - background: url("../../../images/my_project_ico.png") no-repeat scroll left center transparent; - color: #FFFFFF; - font-family: "Myriad pro","Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 20px; - font-weight: normal; - margin: 0px 0px 10px; - padding-left: 41px; -} - -.box P.label { - color: #F8EFE5; - font-size: 12px; - font-weight: bold; - margin: 17px 0px 5px; -} - -.contestsContainer { - position: relative; -} - -.box .inputSelect { - background: url("../../../images/select_input_bg.png") no-repeat scroll 0% 0% transparent; - height: 26px; - margin-bottom: 11px; - padding-left: 10px; - padding-top: 2px; - position: relative; - width: 252px; -} - -.box .inputSelect INPUT { - border: 0px none; - font-size: 12px; - width: 213px; -} - -.box .inputSelect A.selectIco { - background: url("../../../images/select_input_ico.png") no-repeat scroll 0% 0% transparent; - display: block; - height: 23px; - position: absolute; - right: 13px; - top: 3px; - width: 24px; -} - -.box .contestsDropDown { - background-color: #FFFFFF; - border: 1px solid #D0D2D3; - color: #333333; - display: none; - position: absolute; - top: 48px; - width: 250px; - z-index: 999; -} - -.contestsDropDown UL { - list-style: none outside none; - margin: 0px ! important; - padding: 0px ! important; -} - -.contestsDropDown UL LI { - cursor: pointer; - margin: 0px ! important; - padding: 3px 6px ! important; -} - -.contestsDropDown UL LI.hover { - background-color: #FFFFCC ! important; -} - -.contestsDropDown UL LI.even { - background-color: #F3F3F3; -} - -.contestsDropDown UL LI A { - font-size: 12px; - text-decoration: none; -} - -.box .contestsList { - background: url("../../../images/contest_bottom.png") no-repeat scroll left bottom transparent; - padding-bottom: 4px; - width: 253px; -} - -.box .contestsList .caption { - background: url("../../../images/contests_caption.png") no-repeat scroll 0% 0% transparent; - color: #333333; - font-size: 12px; - height: 28px; - padding-left: 10px; - padding-top: 7px; - width: 253px; -} - -.contestsList .caption SELECT { - width: 110px; -} - -.contestsContent { - background: url("../../../images/contest_list_bg.png") repeat-y scroll 0% 0% transparent; - height: 237px; - overflow: auto; - padding-left: 1px; - padding-right: 1px; - width: 250px; -} - -.contestsContent TABLE { - border-collapse: collapse; - font-size: 11px; -} - -.contestsContent TABLE TD { - background-color: #FCFCFC; - padding: 5px 0px; -} - -.contestsContent TABLE TR { - border-bottom: 1px solid #D0D2D3; - border-top: 1px solid #D0D2D3; -} - -.contestsContent TABLE TR.last { - border-bottom: medium none; -} - -.contestsContent TABLE TR TD { - background-color: #FCFCFC; - cursor: pointer; -} - -.contestsContent TABLE TR.even TD { - background-color: #ECECEC; -} - -.contestsContent TD.status { - width: 30px; -} - -.contestsContent .status SPAN { - display: block; - height: 11px; - margin-left: 10px; - width: 11px; -} - -.contestsContent .status SPAN SPAN { - display: none; -} - -.contestsContent .draft { - background: url("../../../images/draft_ico.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .running { - background: url("../../../images/running_ico.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .milstone { - background: url("../../../images/milestone_ico.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .awarding { - background: url("../../../images/awarding_ico.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .failedReview { - background: url("../../../images/milestone_ico.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .highlight TD { - background-color: #FFFFCC ! important; - color: #FF0000; - font-weight: bold; -} - -.contestsContent TD.type { - padding-left: 5px; - width: 30px; -} - -.contestsContent .type SPAN { - display: block; - height: 16px; - width: 16px; -} - -.contestsContent .type SPAN SPAN { - display: none; -} - -.contestsContent .wType { - background: url("../../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .pType { - background: url("../../../images/p_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .lType { - background: url("../../../images/l_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .sType { - background: url("../../../images/s_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .WType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .PType { - background: url("../../images/p_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .LType { - background: url("../../images/l_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .SType { - background: url("../../images/s_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .WdType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .IType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .PrType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .AdType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .FType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .BType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .MdType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .OType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .WdType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .SpType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .ArType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .CdType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .CvType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .AsType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .TType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .TsType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .RbType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .RcType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .AgType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .MType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent .CpType { - background: url("../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -P.projectArchive { - background: none repeat scroll 0% 0% transparent; - display: block; - font-size: 11px; - margin: 4px 0px; - padding-right: 10px; - text-align: right; -} - -P.projectArchive A { - color: #FFFFFF; - text-decoration: underline; -} - -P.projectArchive A:hover { - text-decoration: none; -} - -.box .title2 { - background: url("../../../images/title2_left.png") no-repeat scroll left center transparent; - margin: 0px auto; - width: 210px; -} - -.space { - margin-top: 20px; -} - -.project-box .title2 { - background: url("../../../images/title2_left.png") no-repeat scroll left center transparent; - margin: 0px auto; - width: 210px; -} - -.box .title2 .titleInner { - background: url("../../../images/title2_right.png") no-repeat scroll right center transparent; - height: 35px; -} - -.project-box .title2 .titleInner { - background: url("../../../images/title2_right.png") no-repeat scroll right center transparent; - height: 35px; -} - -.box .title2 H3 { - font-family: Verdana,Geneva,sans-serif; - font-size: 14px; - font-weight: normal; - margin: 0px; - padding-left: 11px; - padding-top: 9px; -} - -.project-box .title2 H3 { - font-family: Verdana,Geneva,sans-serif; - font-size: 14px; - font-weight: normal; - margin: 0px; - padding-left: 11px; - padding-top: 9px; -} - -.box UL { - list-style: none outside none; - margin: 0px auto; - padding: 10px 0px 0px 8px; - width: 210px; -} - -.box UL LI { - margin: 3px 0px; -} - -.box UL.links A { - background: url("../../../images/li_arrow.png") no-repeat scroll left center transparent; - color: #EFE2D2; - font-family: Verdana,Geneva,sans-serif; - font-size: 13px; - padding-left: 15px; - text-decoration: none; -} - -.box UL.links A:hover { - background-color: transparent; - color: #FFFFFF; -} - -.project-box UL { - list-style: none outside none; - margin: 0px auto; - padding: 10px 0px 0px 8px; - width: 210px; -} - -.project-box UL LI { - margin: 3px 0px; -} - -.project-box UL.links A { - background: url("../../../images/li_arrow.png") no-repeat scroll left center transparent; - color: #EFE2D2; - font-family: Verdana,Geneva,sans-serif; - font-size: 13px; - padding-left: 15px; - text-decoration: none; -} - -.project-box UL.links A:hover { - background-color: transparent; - color: #FFFFFF; -} - -#calendar { - margin-bottom: 20px; -} - -table.fc-header { - background: url("../../../images/calendar_header.png") repeat-x scroll left top #37302E; - color: #FFFFFF; - font-family: Verdena,Geneva,sans-serif ! important; - font-size: 14px ! important; - height: 33px ! important; - width: 100%; -} - -.fc-event a { - background-position: left 3px; - background-repeat: no-repeat; - float: left; - font-size: 11px; - margin-left: 4px; - padding-left: 14px; - text-decoration: none; -} - -.fc-event a:hover { - text-decoration: underline; -} - -.fc-event a.launch { - background-color: transparent; - background-image: url("../../../images/event_launch_ico.png"); - color: #FF0000; -} - -.fc-event a.task { - background-color: transparent; - background-image: url("../../../images/event_task_ico.png"); - color: #0497EE; -} - -.fc-event a.forum { - background-color: transparent; - background-image: url("../../../images/event_forum_ico.png"); - color: #17C000; -} - -.fc-event a.milestone { - background-color: transparent; - background-image: url("../../../images/event_milestone_ico.png"); - color: #BDBDBD; -} - -.fc-event a.winner { - background-color: transparent; - background-image: url("../../../images/event_winner_ico.png"); - color: #FF6600; -} - -SPAN.notif-text { - font-size: 11px; -} - -DIV.notif-div { - margin-bottom: 4px; - margin-top: 13px; -} - -.tooltipContainer { - background-color: transparent; - color: #000000; - display: none; - padding-left: 4px; - position: absolute; - width: 182px; - z-index: 999; -} - -.tooltipContainer SPAN.arrow { - background: url("../../../images/popup_arrow.png") no-repeat scroll 0% 0% transparent; - display: block; - height: 7px; - left: 0px; - position: absolute; - top: 40px; - width: 5px; -} - -.tooltipContainer .tooltipLeft { - background: url("../../../images/tooltip_border.png") repeat-y scroll left center #FFFFFF; - color: #000000; -} - -.tooltipContainer .tooltipRight { - background: url("../../../images/tooltip_border.png") repeat-y scroll right center transparent; -} - -.tooltipContainer .tooltipBottom { - background: url("../../../images/tooltip_border.png") repeat-x scroll center bottom transparent; -} - -.tooltipContainer .tooltipBottomLeft { - background: url("../../../images/tooltip_bottom_left.png") no-repeat scroll left bottom transparent; -} - -.tooltipContainer .tooltipBottomRight { - background: url("../../../images/tooltip_bottom_right.png") no-repeat scroll right bottom transparent; -} - -.tooltipCaption { - background: url("../../../images/tooltip_bg.png") repeat-x scroll 0% 0% transparent; -} - -.tooltipCaptionLeft { - background: url("../../../images/tooltip_caption_left.png") no-repeat scroll left center transparent; -} - -.tooltipCaptionRight { - background: url("../../../images/tooltip_caption_right.png") no-repeat scroll right center transparent; -} - -.tooltipTask .tooltipCaption { - background: url("../../../images/tooltip_bg_task.png") repeat-x scroll 0% 0% transparent; -} - -.tooltipTask .tooltipCaptionLeft { - background: url("../../../images/tooltip_caption_left_task.png") no-repeat scroll left center transparent; -} - -.tooltipTask .tooltipCaptionRight { - background: url("../../../images/tooltip_caption_right_task.png") no-repeat scroll right center transparent; -} - -.tooltipForum .tooltipCaption { - background: url("../../../images/tooltip_bg_forum.png") repeat-x scroll 0% 0% transparent; -} - -.tooltipForum .tooltipCaptionLeft { - background: url("../../../images/tooltip_caption_left_forum.png") no-repeat scroll left center transparent; -} - -.tooltipForum .tooltipCaptionRight { - background: url("../../../images/tooltip_caption_right_forum.png") no-repeat scroll right center transparent; -} - -.tooltipWinner .tooltipCaption { - background: url("../../../images/tooltip_bg_winner.png") repeat-x scroll 0% 0% transparent; -} - -.tooltipWinner .tooltipCaptionLeft { - background: url("../../../images/tooltip_caption_left_winner.png") no-repeat scroll left center transparent; -} - -.tooltipWinner .tooltipCaptionRight { - background: url("../../../images/tooltip_caption_right_winner.png") no-repeat scroll right center transparent; -} - -.tooltipMilestone .tooltipCaption { - background: url("../../../images/tooltip_bg_milestone.png") repeat-x scroll 0% 0% transparent; -} - -.tooltipMilestone .tooltipCaptionLeft { - background: url("../../../images/tooltip_caption_left_milestone.png") no-repeat scroll left center transparent; -} - -.tooltipMilestone .tooltipCaptionRight { - background: url("../../../images/tooltip_caption_right_milestone.png") no-repeat scroll right center transparent; -} - -.tooltipCaptionInner { - height: 26px; - position: relative; -} - -.tooltipCaptionInner H2 { - background-color: transparent; - color: #FFFFFF; - font-size: 12px; - margin: 0px; - padding-left: 10px; - padding-top: 6px; -} - -.tooltipCaptionInner A.closeIco { - background: url("../../../images/popup_close_ico.png") no-repeat scroll 0% 0% transparent; - display: block; - height: 8px; - position: absolute; - right: 5px; - top: 5px; - width: 6px; -} - -.tooltipContent { - color: #333333; - font-size: 12px; - padding: 10px; -} - -.tooltipContent H3 { - background-color: transparent; - color: #FF0000; - font-size: 12px; - margin: 0px 0px 5px; - padding: 0px; -} - -.tooltipTask H3 { - background-color: transparent; - color: #0497EE; -} - -.tooltipForum H3 { - background-color: transparent; - color: #17C000; -} - -.tooltipMilestone H3 { - color: #BDBDBD; -} - -.tooltipWinner H3 { - color: #FF6600; -} - -.tooltipContent H4 { - font-size: 12px; - font-weight: normal; - margin: 0px 0px 4px; - padding: 0px; - text-decoration: underline; -} - -.tooltipContent P { - font-size: 11px; - margin: 0px; - padding: 0px; -} - -.tooltipContent P A { - color: #0000CC; -} - -.container2 { - -} - -.container2Left { - -} - -.container2Right { - -} - -.container2Bottom { - background: none repeat scroll 0px 0px white; -} - -.container2BottomClear { - border-bottom: 1px solid #BDBDBD; -} - -.container2BottomLeft { - background: none repeat scroll 0px 0px white; -} - -.container2BottomRight { - background: none repeat scroll 0px 0px white; -} - -.container2Content { - overflow: hidden; - padding: 10px 10px 0px; -} - -.container2Content_det { - padding: 10px 1px 0px; -} - -.panel { - font-size: 11px; - height: 100%; - overflow: hidden; - padding: 14px 0px 8px; - text-align: right; -} - -.panel SPAN { - float: right; - padding: 0px 3px; -} - -.panel A { - float: right; - height: 15px; - padding-left: 25px; - padding-right: 4px; - padding-top: 2px; - text-decoration: none; -} - -.panel A.print { - background: url("../../../images/print_ico.png") no-repeat scroll 5px 0px transparent; - font-weight: bold; -} - -.panel A.exportExcel { - background: url("../../../images/export_excel.png") no-repeat scroll 5px 0px transparent; -} - -.panel A.exportPdf { - background: url("../../../images/export_pdf.png") no-repeat scroll 5px 0px transparent; -} - -.panel A:hover { - text-decoration: underline; -} - -.panel A.addUser { - background: url("../../../images/add_user_ico.png") no-repeat scroll 5px 0px transparent; -} - -.panel A.editUser { - background: url("../../../images/edit_user_ico.png") no-repeat scroll 5px 0px transparent; -} - -.panel A.deleteUser { - background: url("../../../images/delete_user_ico.png") no-repeat scroll 5px 0px transparent; -} - -.panel2 { - font-size: 12px; - height: 100%; - overflow: hidden; - padding: 14px 0px 6px; - text-align: right; -} - -.panel2 A { - float: left; - height: 19px; - padding-top: 2px; - text-decoration: none; -} - -.panel2 A:hover { - -} - -.details { - -} - -.no_details { - -} - -.detailsContent { - -moz-border-bottom-colors: none; - -moz-border-left-colors: none; - -moz-border-right-colors: none; - -moz-border-top-colors: none; - border-color: -moz-use-text-color #BDBDBD #BDBDBD; - border-image: none; - border-style: none solid solid; - border-width: medium 1px 1px; - padding: 10px 5px; -} - -.detailsContent_det_type { - background-color: #F5F5F5; - padding: 10px 10px 20px 40px; -} - -.detailsContent_det_type_edit { - padding: 10px 10px 20px 40px; -} - -.detailsContent_det_prize { - background-color: #F5F5F5; - padding: 10px 10px 20px 40px; -} - -.detailsContent_det_files { - background-color: #F5F5F5; - padding: 10px 10px 20px 40px; -} - -.detailsContent_det_round { - padding: 10px 10px 20px 40px; -} - -.detailsContent_det_spec { - padding: 10px 10px 20px 40px; -} - -.detailsContent_det_round_edit { - padding: 10px 10px 20px 40px; -} - -.detailsContent_det_spec_edit { - padding: 10px 10px 20px 40px; -} - -.detailsContent_det_files_edit { - padding: 10px 10px 20px 40px; -} - -.detailsContent_det_prize_edit { - padding: 10px 10px 20px 40px; -} - -.message { - background-color: #FFFFCC; - margin: 3px 0px; -} - -.message .messageTop { - background: url("../../../images/message_border.png") repeat-x scroll center top transparent; -} - -.message .messageBottom { - background: url("../../../images/message_border.png") repeat-x scroll center bottom transparent; -} - -.message .messageLeft { - background: url("../../../images/message_border.png") repeat-y scroll left center transparent; -} - -.message .messageRight { - background: url("../../../images/message_border.png") repeat-y scroll right center transparent; -} - -.message .messageTopLeft { - background: url("../../../images/white_pixel.png") no-repeat scroll left top transparent; -} - -.message .messageTopRight { - background: url("../../../images/white_pixel.png") no-repeat scroll right top transparent; -} - -.message .messageBottomLeft { - background: url("../../../images/white_pixel.png") no-repeat scroll left bottom transparent; -} - -.message .messageBottomRight { - background: url("../../../images/white_pixel.png") no-repeat scroll right bottom transparent; -} - -.message .messageInner { - font-size: 11px ! important; - height: 100%; - overflow: hidden; - padding: 5px; -} - -.message .messageInner P { - margin: 0px; - padding: 0px; -} - -.message .messageInner P.note { - font-size: 14px; - margin: 12px; -} - -.search { - font-size: 12px; - height: 30px; -} - -.search LABEL { - float: right; - font-weight: bold; - padding-right: 6px; - padding-top: 6px; -} - -.search INPUT { - float: right; - margin-right: 3px; - margin-top: 3px; -} - -.search A.button1 { - float: right; -} - -#searchIn { - float: left; - margin-right: 3px; - margin-top: 3px; - width: 130px; -} - -.deleteUserInner { - height: 85px; - overflow: hidden; -} - -.deleteUserInner P { - padding-bottom: 5px; - text-align: center; -} - -.deleteUserInner .button1 { - float: right; - margin: 4px 4px 0px; -} - -.popupButtons { - overflow: hidden; - padding: 5px 0px; -} - -#TB_closeWindowButton, #TB_closeWindowButtonSingle { - background: url("../../../images/close_ico.png") no-repeat scroll 0% 0% transparent; - display: block; - height: 15px; - width: 15px; -} - -TABLE.notif { - border: medium none; - margin-bottom: 8px; -} - -TABLE.notif TH { - color: #333333; - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 13px; - line-height: 20px; - text-align: left; -} - -TABLE.notif TH A { - text-decoration: none; -} - -TABLE.notif TH A:hover { - text-decoration: underline; -} - -TABLE.notif TH STRONG { - float: right; - font-size: 12px; - padding-right: 10px; -} - -TABLE.notif THEAD TR { - background: url("../../../images/project_th_bg.png") repeat-x scroll center top transparent; - height: 25px; -} - -TABLE.notif THEAD SPAN.left { - background: url("../../../images/th_left_bg.png") no-repeat scroll left top transparent; - display: block; -} - -TABLE.notif THEAD SPAN.right { - background: url("../../../images/th_right_bg.png") no-repeat scroll right top transparent; - display: block; - height: 22px; - padding-left: 16px; - padding-top: 3px; -} - -TABLE.notif TBODY TD { - border: 1px solid #BDBDBD; - font-size: 10px; - padding: 7px 10px; -} - -TABLE.project { - border-collapse: collapse; - border: medium none; - margin-bottom: 8px; -} - -TABLE.project TH { - color: #333333; - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 13px; - line-height: 20px; - text-align: left; -} - -TABLE.project TH A { - text-decoration: none; -} - -TABLE.project TH A:hover { - text-decoration: underline; -} - -TABLE.project TH STRONG { - float: right; - font-size: 12px; - padding-right: 10px; -} - -TABLE.project THEAD TR { - /*background: url("../../../images/project_th_bg.png") repeat-x scroll center top transparent;*/ - background-color: #f5f5f5; - height: 25px; -} - -TABLE.project TR.hover { - background-color: #FFFF99; -} - -TABLE.project THEAD SPAN.left { - /*background: url("../../../images/th_left_bg.png") no-repeat scroll left top transparent;*/ - display: block; -} - -TABLE.project THEAD SPAN.right { - /*background: url("../../../images/th_right_bg.png") no-repeat scroll right top transparent;*/ - display: block; - height: 22px; - padding-left: 16px; - padding-top: 3px; -} - -TABLE.project TBODY TD { - border: 1px solid #EDEDED; - font-size: 10px; - padding: 7px 10px; -} - -TABLE.project TBODY TD.first { - padding: 0px; - width: 3px; -} - -table.project.scorecard { - margin: 0px; -} - -table.project.scorecard th { - border-left: 1px solid #EDEDED; - border-right: 1px solid #EDEDED; - border-top: 1px solid #EDEDED; - color: #333333; - font-size: 11px; - font-weight: normal; - text-align: center; -} - -table.project.scorecard tbody td { - color: #333333; - font-size: 11px; - line-height: 25px; - padding: 0px 5px; -} - -table.project.scorecard tbody td.first { - padding: 0px 9px; - width: 44%; -} - -table.project.scorecard tbody td.action { - width: 55px; -} - -table.project.scorecard tbody td a.view, table.project.scorecard tbody td a.edit { - color: #EC1C23; - text-decoration: none; -} - -table.project.scorecard tbody td a.view:hover, table.project.scorecard tbody td a.edit:hover { - text-decoration: underline; -} - -table.project.scorecard tbody td.second { - width: 18%; -} - -table.project.scorecard.view td.first { - width: 55px; -} - -TABLE.project TBODY TD.second { - width: 20%; -} - -TABLE.project TBODY TD.reviewPending { - background-color: #FF0000; -} - -TABLE.project TBODY TD.forumPost { - background-color: #17C000; -} - -TABLE.project TBODY TD.task { - background-color: #0497EE; -} - -TABLE.project A.postedBy { - color: #0000FF; -} - -TABLE.project TD.posted { - text-align: right; - width: 20%; -} - -TABLE.project TD.date { - text-align: center; - width: 11%; -} - -TABLE.project SPAN.ico { - padding: 3px 0px 3px 25px; -} - -TABLE.project SPAN.reviewPending { - background: url("../../../images/review_pending_ico.png") no-repeat scroll left center transparent; - color: #FF0009; -} - -TABLE.project SPAN.forumPost { - background: url("../../../images/forum_post_ico.png") no-repeat scroll left center transparent; - color: #17C000; -} - -TABLE.project SPAN.task { - background: url("../../../images/task_ico.png") no-repeat scroll left center transparent; - color: #0497EE; -} - -TABLE.project SPAN.contestLaunch { - background: url("../../../images/contest_launch_ico.png") no-repeat scroll left center transparent; - color: #FF0009; -} - -TABLE.project SPAN.reviewComplete { - background: url("../../../images/review_complete_ico.png") no-repeat scroll left center transparent; - color: #FF0009; -} - -TABLE.project SPAN.specPosted { - background: url("../../../images/spec_posted_ico.png") no-repeat scroll left center transparent; - color: #FF0009; -} - -.activity { - padding: 10px 0px; -} - -.activity TABLE { - border-bottom: 1px solid #EDEDED; - margin-bottom: 0px; -} - -.activity TABLE TD.posted { - text-align: left; - width: 32%; -} - -.tableFooter { - background: url("../../../images/table_footer.png") repeat-x scroll 0% 0% transparent; -} - -.tableFooterLeft { - background: url("../../../images/table_footer_left.png") no-repeat scroll left center transparent; -} - -.tableFooterRight { - background: url("../../../images/table_footer_right.png") no-repeat scroll right center transparent; -} - -.tableFooterInner { - height: 23px; - text-align: right; -} - -A.viewMore { - background: url("../../../images/view_more_ico.png") no-repeat scroll right top transparent; - float: right; - font-size: 10px; - height: 13px; - margin-right: 10px; - margin-top: 3px; - padding-right: 20px; - text-decoration: none; -} - -A.less { - background-position: right bottom; -} - -TABLE.projectStats { - border-collapse: collapse; - border: 1px solid #BDBDBD; - width: 100%; -} - -TABLE.projectStats TH { - background-color: #F5F5F5; - color: #333333; - font-size: 11px; - height: 33px; -} - -TABLE.projectStats TH.first { - -} - -TABLE.projectStats TD { - border: 1px solid #EDEDED; - font-size: 30px; - font-weight: bold; - padding: 13px 0px; - text-align: center; - width: 10%; -} - -TABLE.projectStats TD.action a { - color: #0088CC; - text-decoration: none; -} - -TABLE.projectStats TD.action a.edit span.disabled { - color: gray; - cursor: default; - font-weight: normal; - padding: 0px; -} - -TABLE.projectStats TD.date { - font-size: 12px; - font-weight: normal; - width: 14%; -} - -TABLE.projectStats TD.fees { - font-size: 12px; - width: 20%; -} - -TABLE.projectStats TD.fees P { - margin: 0px 0px 4px; -} - -TABLE.projectStats TR.even TD { - background-color: #F3F3F3; -} - -TABLE.projectStats TR.noStrips TD { - background-color: #FFFFFF ! important; -} - -TABLE.projectStats TD.checkbox { - width: 4%; -} - -TABLE.projectStats TH INPUT { - height: 13px; - width: 13px; -} - -#searchResult tr:nth-child(2n) { - background: none repeat scroll 0px 0px #F5F5F5; -} - -#searchResult tr:nth-child(2n+1) { - background: none repeat scroll 0% 0% #FFFFFF; -} - -TABLE.contests { - border: 1px solid #EDEDED; -} - -TABLE.contests TD { - color: #333333; - font-size: 12px; - font-weight: normal; -} - -TABLE.contests TD SPAN { - font-weight: bold; - padding-left: 14px; -} - -TABLE.contests TD SPAN.draft { - background: url("../../../images/draft_ico.png") no-repeat scroll left center transparent; - color: #00C600; -} - -TABLE.contests TD SPAN.running { - background: url("../../../images/running_ico.png") no-repeat scroll left center transparent; - color: #177DE3; -} - -TABLE.contests TD SPAN.awarding { - background: url("../../../images/awarding_ico.png") no-repeat scroll left center transparent; - color: #FFB000; -} - -TABLE.contests TD SPAN.milestone { - background: url("../../../images/milestone_ico.png") no-repeat scroll left center transparent; - color: #DC0000; -} - -TABLE.contests A.button { - margin: 0px 3px; -} - -TABLE.contests A.button SPAN { - text-align: center; - width: 60px; -} - -TABLE.contests A.group { - font-weight: bold; - padding-left: 18px; - text-decoration: none; -} - -TABLE.contests A.expand { - background: url("../../../images/expand_ico.png") no-repeat scroll left center transparent; -} - -TABLE.contests A.collapse { - background: url("../../../images/collapse_ico.png") no-repeat scroll left center transparent; -} - -TABLE.contests TBODY.checkPermissions LABEL { - margin-left: 2px; - margin-right: 8px; -} - -TABLE.contests TH.permCol { - width: 19%; -} - -TABLE.notifications { - border: 1px solid #A8ABAD; -} - -TABLE.notifications TR.applyForAll { - background-color: #FFFFCC; -} - -TABLE.notifications TR.applyForAll TD.markRed { - color: #C60000; - font-size: 12px; - font-weight: bold; -} - -TABLE.notifications TR.alternate { - background-color: #F3F3F3; -} - -TABLE.notifications TD { - color: #333333; - font-size: 11px; - font-weight: normal; - line-height: 18px; - padding-left: 10px; - text-align: left; -} - -TABLE.notifications TD SPAN { - font-weight: bold; - padding-left: 14px; -} - -TABLE.notifications TD.checkbox { - color: #333333; - font-size: 11px; - font-weight: normal; - text-align: center; -} - -TABLE.notifications A.button { - margin: 0px 3px; -} - -TABLE.notifications A.button SPAN { - text-align: center; - width: 60px; -} - -TABLE.notifications A.group { - font-weight: bold; - padding-left: 22px; - text-decoration: none; -} - -TABLE.notifications A.subgroup { - font-weight: bold; - padding-left: 32px; - text-decoration: underline; -} - -TABLE.notifications A.expand { - background: url("../../../images/notification_expand_ico.png") no-repeat scroll left center transparent; -} - -TABLE.notifications A.collapse { - background: url("../../../images/notification_collapse_ico.png") no-repeat scroll left center transparent; -} - -TABLE.notifications .group { - font-weight: bold; - padding-left: 22px; - text-decoration: none; -} - -TABLE.notifications .expand { - background: url("../../../images/notification_expand_ico.png") no-repeat scroll left center transparent; - text-decoration: none; -} - -TABLE.notifications .collapse { - background: url("../../../images/notification_collapse_ico.png") no-repeat scroll left center transparent; - text-decoration: none; -} - -TABLE.notifications TH.permCol { - width: 19%; -} - -TABLE.notifications TH.permCol2 { - width: 5%; -} - -.pagination { - background-color: #f5f5f5; - color: #000000; - font-size: 12px; - height: 25px; - padding-top: 7px; - text-align: right; -} - -.pagination A { - background-color: transparent; - color: #FF8A00; - padding: 0px 3px; - text-decoration: none; -} - -.pagination A.current { - font-weight: bold; - color: #000000; -} - -.pagination A.prev { - background: url("../../../images/page_prev.png") no-repeat scroll left center transparent; - padding-left: 10px; -} - -.pagination A.next { - background: url("../../../images/page_next.png") no-repeat scroll right center transparent; - padding-right: 10px; -} - -.pagination SPAN.prev { - background: url("../../../images/page_prev_nactive.png") no-repeat scroll left center transparent; - padding-left: 10px; -} - -.pagination SPAN.next { - background: url("../../../images/page_next_nactive.png") no-repeat scroll right center transparent; - padding-right: 10px; -} - -.pagination .pages { - float: right; - padding-top: 2px; - margin-right: 5px; - margin-left: 10px; -} - -.pagination .showPages { - float: right; - left: 0px; - top: 0px; -} - -.pagination .showPages .normalOption { - font-size: 12px; - font-weight: normal; -} - -.form { - padding: 10px; -} - -.form P { - margin: 0px; - overflow: hidden; - padding: 5px 0px; - width: 100%; -} - -.form LABEL { - float: left; - font-size: 12px; - width: 170px; -} - -.form .buttons { - padding: 10px 0px; -} - -.form .buttons .button7 SPAN, .form .buttons .button6 SPAN { - padding-left: 0px; - padding-right: 0px; - text-align: center; - width: 100%; -} - -.form .buttons .leftButton { - width: 93px; -} - -.form .buttons .middleButton { - width: 220px; -} - -.form .buttons .rightButton { - width: 82px; -} - -.permissionForm { - overflow: hidden; - padding: 4px 0px; - width: 100%; -} - -.permissionForm .permissionLabel { - float: left; - height: 100px; -} - -.permissionForm .checkboxesArea { - float: left; - width: 78%; -} - -.permissionForm .checkboxesArea INPUT { - float: left; - height: 13px; - margin-right: 3px; - margin-top: 3px; - width: 13px; -} - -.permissionForm .checkboxesArea LABEL { - width: 90%; -} - -.permissionForm .permissionLabel, .permissionPopupInner LABEL { - width: 20%; -} - -.permissionPopupInner .buttons { - overflow: hidden; - width: 100%; -} - -.permissionPopupInner .buttons A { - float: right; - margin: 0px 3px; -} - -.backToTop { - margin-top: 5px; -} - -#footer { - border-top: 1px solid #E7E7E7; - color: #666666; - font-size: 12px; - margin: 0px auto; - padding: 20px 21px; - position: relative; -} - -#footer A { - text-decoration: none; -} - -#footer H2 { - font-family: Geneva,"Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 14px; - font-weight: normal; - margin: 0px 0px 7px; -} - -#footer P { - margin: 2px; -} - -#footer .poweredBy { - position: absolute; - right: 21px; - top: 20px; -} - -IMG { - border: medium none; -} - -A { - color: #333333; -} - -.hide { - display: none; -} - -.warning-box { - display: block; - margin: 0px 0px 5px; - width: 100%; -} - -.warning-box-top { - background: url("../../../images/warningbox-tl.png") no-repeat scroll left top transparent; -} - -.warning-box-top-outside { - background: url("../../../images/warningbox-tr.png") no-repeat scroll right top transparent; -} - -.warning-box-top-inside { - background: url("../../../images/warningbox-tc.png") repeat-x scroll left top transparent; - height: 2px; - margin: 0px 2px; -} - -.warning-box-mid { - background: url("../../../images/warningbox-ml.png") repeat-y scroll left top transparent; -} - -.warning-box-mid-outside { - background: url("../../../images/warningbox-mr.png") repeat-y scroll right top transparent; -} - -.warning-box-mid-inside { - background: url("../../../images/warningbox-mc.png") repeat scroll left top transparent; - color: #000001; - font-size: 12px; - margin: 0px 2px; - overflow: hidden; - padding: 5px; -} - -.warning-box-bottom { - background: url("../../../images/warningbox-bl.png") no-repeat scroll left bottom transparent; -} - -.warning-box-bottom-outside { - background: url("../../../images/warningbox-br.png") no-repeat scroll right bottom transparent; -} - -.warning-box-bottom-inside { - background: url("../../../images/warningbox-bc.png") repeat-x scroll left bottom transparent; - height: 2px; - margin: 0px 2px; -} - -.warning-box-content { - line-height: 17px; - padding: 2px 0px 0px; -} - -.warning-box-content span { - color: #A20000; - font-weight: bold; -} - -.error { - background: url("../../../images/ico-error.png") no-repeat scroll left top transparent; - padding: 2px 0px 0px 20px ! important; -} - -.success { - background: url("../../../images/ico-success.png") no-repeat scroll left top transparent; - padding: 2px 0px 0px 20px ! important; -} - -.submission-gallery-row { - border-bottom: 1px solid #EBEBEB; - height: 200px; - margin: 10px 0px; - width: 100%; -} - -.submission-gallery-row.no-border { - border: medium none; -} - -.submission-item { - float: left; - font-size: 12px; - padding: 0px 0px 0px 5%; - width: 15%; -} - -.submission-item .thumbnail { - display: block; - height: 100%; - width: 100%; -} - -.submission-item .thumbnail img { - margin: 0px; - padding: 0px; -} - -.submission-item .number { - display: block; - font-weight: bold; - margin: 0px 0px 5px; -} - -.submission-button { - margin: 10px 0px 20px 10px; - overflow: hidden; - width: 100%; -} - -.submission-button ul li { - float: left; - list-style-type: none; -} - -.submission-button a { - display: block; - height: 17px; - margin: 0px 5px; - position: relative; - width: 17px; - z-index: 4; -} - -.submission-button a:hover { - background-position: left bottom; -} - -.submission-button .zoom { - background: url("../../../images/ico-zoom.png") no-repeat scroll left top transparent; -} - -.submission-button .flag { - background: url("../../../images/ico-flag.png") no-repeat scroll left top transparent; -} - -.submission-button .cancel { - background: url("../../../images/ico-cancel.png") no-repeat scroll left top transparent; -} - -.pagination-wrapper { - border-bottom: 1px solid #EBEBEB; - display: block; - margin: 20px 0px; - overflow: hidden; - padding: 0px 0px 10px; - width: 100%; -} - -.pagination { - float: right; - width: 100%; -} - -.pagination ul li { - display: inline; - float: right; - list-style-type: none; - margin: 0px; -} - -.pagination ul li a { - color: #000001; - float: left; - font-size: 12px; - height: 9px; - line-height: 10px; - padding: 0px 4px; - text-decoration: none; -} - -.pagination ul li a:hover { - text-decoration: none; -} - -.pagination ul li.current a { - font-weight: bold ! important; -} - -.pagination ul li.next a { - background: url("../../../images/arrow-pagination-next.png") no-repeat scroll right top transparent; - padding: 0px 10px 0px 4px; -} - -.pagination ul li.next a:hover { - background-position: right bottom; -} - -.pagination ul li.prev a { - background: url("../../../images/arrow-pagination-prev.png") no-repeat scroll left top transparent; - padding: 0px 4px 0px 10px; -} - -.pagination ul li.prev a:hover { - background-position: left bottom; -} - -.dialog-mini-wrapper { - display: none; - margin: -22px -4px; - position: absolute; - z-index: 0; -} - -.dialog-mini { - margin: 25px 0px 0px; - position: absolute; - width: 150px; - z-index: 1; -} - -.dialog-mini-outside { - background: url("../../../images/dialog-mini-big-left.png") no-repeat scroll left top transparent; -} - -.dialog-mini-inside { - background: url("../../../images/dialog-mini-big-right.png") no-repeat scroll right top transparent; - line-height: 21px; - margin: 0px 0px 0px 2px; - text-align: center; -} - -.dialog-mini .question { - color: #A8ABAD; - display: block; - font-weight: bold; - margin: 0px ! important; -} - -.dialog-mini .question a { - color: #A8ABAD; - display: inline; - font-size: 11px; - font-weight: bold; - margin: 0px; - padding: 0px; - text-align: center; - text-decoration: none; -} - -.dialog-mini .question a:hover { - text-decoration: underline; -} - -.redtext { - color: #EC1C23 ! important; -} - -.greentext { - color: #108300 ! important; -} - -.greenDarktext { - color: #367C59 ! important; -} - -.dialog-mini-arrow { - background: url("../../../images/dialog-mini-arrow.png") no-repeat scroll left top transparent; - height: 25px; - margin: 2px 0px 0px 5px; - position: absolute; - width: 25px; - z-index: 2; -} - -.dialog-mini-sm { - margin: 25px 0px 0px; - position: absolute; - width: 120px; - z-index: 1; -} - -.dialog-mini-sm-outside { - background: url("../../../images/dialog-mini-left.png") no-repeat scroll left top transparent; -} - -.dialog-mini-sm-inside { - background: url("../../../images/dialog-mini-right.png") no-repeat scroll right top transparent; - height: 23px; - line-height: 23px; - margin: 0px 0px 0px 2px; - text-align: center; -} - -.display-perpage { - float: left; - font-size: 12px; -} - -.display-perpage label { - font-weight: bold; -} - -#select-project-wrapper { - margin: 10px 0px; -} - -#select-project-wrapper label { - color: #F8EFE5; - display: block; - font-size: 12px; - font-weight: bold; - margin: 0px 0px 10px; -} - -.project-box-top { - background: url("../../../images/bg-projectbox-tl.png") no-repeat scroll left top transparent; - height: 3px; -} - -.project-box-top-outside { - background: url("../../../images/bg-projectbox-tr.png") no-repeat scroll right top transparent; - height: 3px; -} - -.project-box-top-inside { - background: url("../../../images/bg-projectbox-tc.png") repeat-x scroll left top transparent; - height: 3px; - margin: 0px 4px; - overflow: hidden; -} - -.project-box-mid { - background: url("../../../images/bg-projectbox-ml.png") repeat-y scroll left top transparent; -} - -.project-box-mid-outside { - background: url("../../../images/bg-projectbox-mr.png") repeat-y scroll right top transparent; -} - -.project-box-mid-inside { - background: none repeat scroll 0% 0% #FFFFFF; - color: #000000; - margin: 0px 1px; - min-height: 130px; - overflow: hidden; -} - -.white { - background: none repeat scroll 0% 0% #FFFFFF ! important; -} - -.project-box-bottom { - background: url("../../../images/bg-projectbox-bl.png") no-repeat scroll left bottom transparent; - height: 3px; -} - -.project-box-bottom-outside { - background: url("../../../images/bg-projectbox-br.png") no-repeat scroll right bottom transparent; -} - -.project-box-bottom-inside { - background: url("../../../images/bg-projectbox-bc.png") repeat-x scroll left bottom transparent; - height: 3px; - margin: 0px 3px; -} - -.projects-box-title { - background: url("../../../images/ico-project.png") no-repeat scroll left top transparent; - float: left; - margin: 0px 0px 10px; - padding: 0px 0px 0px 40px; -} - -.projects-box-title h2 { - color: #FFFFFE; - font-family: "Myriad Pro","Source Sans Pro",Arial; - font-size: 20px; -} - -#projects-box .button-med { - clear: both; - display: block; -} - -#projects-box label { - color: #F8EFE5; - font-size: 12px; - font-weight: bold; -} - -#projects-box a { - font-weight: normal; -} - -#contest-sort { - background: none repeat scroll 0% 0% #FFFFFF; - border-bottom: 1px solid #D0D2D3; - color: #FF0000 ! important; - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 11px; - line-height: 33px; - overflow: hidden; - padding: 2px 10px; -} - -#contest-sort label { - color: #333333 ! important; - font-size: 12px; - font-weight: normal ! important; -} - -.table-sidebar { - background: none repeat scroll 0% 0% #F8F8F8; - border-collapse: collapse; - float: left; - margin: 0px ! important; - overflow: hidden; - text-align: left; - width: 100% ! important; - z-index: 1; -} - -.table-sidebar td { - background: none repeat scroll 0% 0% #F8F8F8; - border-bottom: 1px solid #D0D2D3; - color: #333333; - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 11px; - padding: 2px 5px; -} - -.table-sidebar tr.alt td { - background: none repeat scroll 0% 0% #ECECEC; -} - -.table-sidebar a { - color: #333333; - font-weight: bold; - text-decoration: none; -} - -.table-sidebar a:hover { - color: #EC1C23; -} - -.table-sidebar tr:hover td, .table-sidebar tr:hover td a { - background: none repeat scroll 0% 0% #FFFFCC ! important; - font-weight: bold ! important; -} - -span.dot { - display: block; - height: 12px; - margin: 0px auto; - width: 12px; -} - -span.dot.green { - background: url("../../../images/dot-green.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -span.dot.blue { - background: url("../../../images/dot-blue.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -span.dot.yellow { - background: url("../../../images/dot-yellow.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -span.dot.red { - background: url("../../../images/dot-red.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -.rounded { - display: block; - height: 16px; - margin: 0px auto; - width: 16px; -} - -.rounded.p { - background: url("../../../images/rounded-p.png") no-repeat scroll left top transparent; -} - -.rounded.s { - background: url("../../../images/rounded-s.png") no-repeat scroll left top transparent; -} - -.rounded.w { - background: url("../../../images/rounded-w.png") no-repeat scroll left top transparent; -} - -.rounded.l { - background: url("../../../images/rounded-l.png") no-repeat scroll left top transparent; -} - -.project-box { - float: left; - padding: 0px 12px; -} - -.button-project { - background: url("../../../images/button-project-left.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; - float: right; - height: 20px; - margin: 0px 5px 0px 0px; - padding-left: 22px; - text-decoration: none ! important; -} - -.button-project span { - background: url("../../../images/button-video-right.png") no-repeat scroll right top rgba(0, 0, 0, 0) ! important; - color: #FFFFFE; - cursor: pointer; - float: left; - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 11px; - line-height: 20px; - padding: 0px 16px 0px 0px; -} - -.button:hover, .button-big:hover, .button-video:hover, .button-med:hover, .button-project:hover, .button-sm:hover, .button-sm-red:hover, .button-med.white:hover { - background-position: left bottom ! important; -} - -.button:hover span, .button-big:hover span, .button-video:hover span, .button-med:hover span, .button-project:hover span, .button-sm:hover span, .button-sm-red:hover span, .button-med.white:hover span { - background-position: right bottom ! important; -} - -.jScrollPaneContainer { - overflow: hidden; - position: relative; - z-index: 1; -} - -.jScrollPaneTrack { - background: none repeat scroll 0% 0% #AAAAAA; - cursor: pointer; - height: 100%; - position: absolute; - right: 0px; - top: 0px; -} - -.jScrollPaneDrag { - background: none repeat scroll 0% 0% #666666; - cursor: pointer; - overflow: hidden; - position: absolute; -} - -.jScrollPaneDragTop { - left: 0px; - overflow: hidden; - position: absolute; - top: 0px; -} - -.jScrollPaneDragBottom { - bottom: 0px; - left: 0px; - overflow: hidden; - position: absolute; -} - -a.jScrollArrowUp { - display: block; - overflow: hidden; - position: absolute; - right: 0px; - text-indent: -2000px; - top: 0px; - z-index: 1; -} - -a.jScrollArrowUp:hover { - -} - -a.jScrollArrowDown { - bottom: 0px; - display: block; - overflow: hidden; - position: absolute; - right: 0px; - text-indent: -2000px; - z-index: 1; -} - -.scroll-pane table { - overflow: hidden ! important; - width: 100% ! important; -} - -#scrollbar-wrapper { - height: 350px; - margin: 0px ! important; - padding: 0px ! important; -} - -.scrollbar-custom { - background: none repeat scroll 0% 0% #F8F8F8; - position: relative; - z-index: 2; -} - -.scrollbar-custom .jScrollPaneTrack { - background: url("../../../images/scrollbar-track.png") repeat-y scroll 0% 0% transparent; -} - -.scrollbar-custom .jScrollPaneDrag { - background: url("../../../images/scrollbar-drag-middle.png") no-repeat scroll 0px 50% transparent; -} - -.scrollbar-custom .jScrollPaneDragTop { - background: url("../../../images/scrollbar-drag-top.png") no-repeat scroll 0% 0% transparent; - height: 1px; -} - -.scrollbar-custom .jScrollPaneDragBottom { - background: url("../../../images/scrollbar-drag-bottom.png") no-repeat scroll 0% 0% transparent; - height: 1px; -} - -.scrollbar-custom a.jScrollArrowUp { - background: url("../../../images/scrollbar-arrow-up.png") no-repeat scroll 0px 0px transparent; - height: 17px; -} - -.scrollbar-custom a.jScrollArrowUp:hover, .scrollbar-custom a.jScrollArrowDown:hover { - background-position: 0px -17px; -} - -.scrollbar-custom a.jScrollArrowDown { - background: url("../../../images/scrollbar-arrow-down.png") no-repeat scroll 0px 0px transparent; - height: 17px; -} - -.scrollbar-custom a.jScrollActiveArrowButton, .scrollbar-custom a.jScrollActiveArrowButton:hover { - background-position: 0px -34px; -} - -.dropdown dd, .dropdown dt, .dropdown ul { - margin: 0px; - padding: 0px; - z-index: 100; -} - -.dropdown dd { - position: relative; -} - -.dropdown a, .dropdown a:visited { - outline: medium none; - text-decoration: none; -} - -.dropdown dt a { - background: url("../../../images/select_left.png") no-repeat scroll left top transparent; - color: #333333; - display: block; - height: 28px; - width: 244px; -} - -.dropdown dt a span { - background: url("../../../images/select_right.png") no-repeat scroll right top transparent; - cursor: pointer; - display: block; - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 12px; - height: 28px; - line-height: 28px; - padding: 0px 10px; -} - -.dropdown dd ul { - background: none repeat scroll 0px 0px #FFFFFF; - border: 1px solid #000000; - color: #C5C0B0; - display: none; - left: 0px; - list-style: none outside none; - min-width: 242px; - position: absolute; - top: 0px; - width: auto; -} - -.dropdown span.value { - display: none; -} - -.dropdown dd ul li a { - border-bottom: 1px solid #D0D2D3; - color: #333333; - display: block; - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 12px; - padding: 5px; -} - -.dropdown dd ul li a:hover { - background-color: #F3F3F3; -} - -.dropdown2 { - margin: 10px 0px 0px 110px; - position: absolute; - z-index: 80; -} - -.dropdown2 dd, .dropdown2 dt, .dropdown2 ul { - margin: 0px; - padding: 0px; - z-index: 10; -} - -.dropdown2 dd { - position: relative; -} - -.dropdown2 a, .dropdown2 a:visited { - outline: medium none; - text-decoration: none; -} - -.dropdown2 dt a { - background: url("../../../images/select-sm-left.png") no-repeat scroll left top transparent; - color: #333333; - display: block; - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 10px; - height: 19px; - width: 110px; -} - -.dropdown2 dt a span { - background: url("../../../images/select-sm-right.png") no-repeat scroll right top transparent; - cursor: pointer; - display: block; - height: 19px; - line-height: 19px; - padding: 0px 10px; -} - -.dropdown2 dd ul { - background: none repeat scroll 0px 0px #FFFFFF; - border: 1px solid #BDBDBD; - color: #C5C0B0; - display: none; - left: 0px; - list-style: none outside none; - min-width: 110px; - position: absolute; - top: 0px; - width: auto; -} - -.dropdown2 span.value2 { - display: none; -} - -.dropdown2 dd ul li a { - border-bottom: 1px solid #D0D2D3; - color: #333333; - display: block; - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 10px; - padding: 5px; -} - -.dropdown2 dd ul li a:hover { - background-color: #F3F3F3; -} - -#wrapper-select-search { - float: left; - margin: 5px 0px 0px; -} - -.dropdown3 dd, .dropdown3 dt, .dropdown3 ul { - margin: 0px; - padding: 0px; - z-index: 100; -} - -.dropdown3 dd { - position: relative; -} - -.dropdown3 a, .dropdown3 a:visited { - outline: medium none; - text-decoration: none; -} - -.dropdown3 dt a { - background: url("../../../images/select_alt_left.png") no-repeat scroll left top transparent; - color: #333333; - display: block; - font-size: 12px ! important; - height: 25px; - width: 200px; -} - -.dropdown3 dt a span { - background: url("../../../images/select_alt_right.png") no-repeat scroll right top transparent; - cursor: pointer; - display: block; - height: 25px; - line-height: 25px; - padding: 0px 10px; -} - -.dropdown3 dd ul { - background: none repeat scroll 0px 0px #FFFFFF; - border: 1px solid #BDBDBD; - color: #C5C0B0; - display: none; - left: 0px; - list-style: none outside none; - min-width: 200px; - position: absolute; - top: 0px; - width: auto; -} - -.dropdown3 span.value3 { - display: none; -} - -.dropdown3 dd ul li { - padding: 0px; -} - -.dropdown3 dd ul li a { - border-bottom: 1px solid #D0D2D3; - color: #333333; - display: block; - font-size: 12px ! important; - height: 16px; - line-height: 16px; - margin: 0px ! important; - padding: 5px ! important; -} - -.dropdown3 dd ul li a:hover { - background-color: #F3F3F3; -} - -.dropdown4 { - margin: 10px 0px 0px 110px; - position: absolute; - z-index: 80; -} - -.dropdown4 dd, .dropdown2 dt, .dropdown2 ul { - margin: 0px; - padding: 0px; - z-index: 10; -} - -.dropdown4 dd { - position: relative; -} - -SELECT.dropdown4 { - background: url("../../../images/select-sm-left.png") no-repeat scroll left top transparent; - border-color: -moz-use-text-color #CCCCCC -moz-use-text-color -moz-use-text-color; - border-style: none solid none none; - border-width: 0px 1px 0px 0px; - color: #333333; - display: block; - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 10px; - height: 19px; - width: 110px; -} - -.dropdown4 span { - background: url("../../../images/select-sm-left.png") no-repeat scroll right top transparent; - cursor: pointer; - display: block; - height: 19px; - line-height: 19px; - padding: 0px 10px; -} - -.dropdown4 span.value2 { - display: none; -} - -.dropdown4 option { - border-bottom: 1px solid #D0D2D3; - color: #333333; - display: block; - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 10px; - padding: 5px; -} - -.dropdown4 option:hover { - background-color: #F3F3F3; -} - -.contestsContent1 { - background: url("../../../images/contest_list_bg.png") repeat-y scroll 0% 0% transparent; - height: auto; - overflow: auto; - padding-right: 1px; - width: 245px; -} - -.contestsContent1 TABLE { - border-collapse: collapse; - font-size: 11px; -} - -.contestsContent1 TABLE TD { - background-color: #FCFCFC; - padding: 5px 0px; - width: 110px; -} - -.contestsContent1 TABLE TR { - border-bottom: 1px solid #D0D2D3; - border-top: 1px solid #D0D2D3; -} - -.contestsContent1 TABLE TR.last { - border-bottom: medium none; -} - -.contestsContent1 TABLE TR TD { - background-color: #FCFCFC; - cursor: pointer; -} - -.contestsContent1 TABLE TR.even TD { - background-color: #ECECEC; -} - -.contestsContent1 TD.status { - width: 20px; -} - -.contestsContent1 .status SPAN { - display: block; - height: 11px; - margin-left: 10px; - width: 11px; -} - -.contestsContent1 .status SPAN SPAN { - display: none; -} - -.contestsContent1 .draft { - background: url("../../../images/draft_ico.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent1 .running { - background: url("../../../images/running_ico.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent1 .milstone { - background: url("../../../images/milestone_ico.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent1 .awarding { - background: url("../../../images/awarding_ico.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent1 .highlight TD { - background-color: #FFFFCC ! important; - color: #FF0000; - font-weight: bold; -} - -.contestsContent1 TD.type { - padding-left: 7px; - width: 25px; -} - -.contestsContent1 .type SPAN { - display: block; - height: 16px; - width: 16px; -} - -.contestsContent1 .type SPAN SPAN { - display: none; -} - -.contestsContent1 .wType { - background: url("../../../images/w_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent1 .pType { - background: url("../../../images/p_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent1 .lType { - background: url("../../../images/l_type.png") no-repeat scroll 0% 0% transparent; -} - -.contestsContent1 .sType { - background: url("../../../images/s_type.png") no-repeat scroll 0% 0% transparent; -} - -.project-box { - position: relative; -} - -.bottom-review { - margin: auto; - text-align: center; - width: 445px; -} - -.bottom-review a { - color: #FF0001; - display: block; - font-size: 17px; - font-weight: bold; - margin-top: 5px; - text-decoration: none; -} - -.bottom-review a.button { - background: url("../../../images/specrev_go.gif") no-repeat scroll left top transparent; - height: 28px; - margin: auto; - width: 28px; -} - -.bottom-review p { - color: #747474; - font-size: 12px; - margin-top: 10px; -} - -.containerNoPadding { - overflow: hidden; - padding: 0px; -} - -.containerNoPadding #warningWrapper { - padding: 0px 10px; -} - -#wb-like, #wb-dislike { - margin: 10px 0px 0px; -} - -.containerNoPadding h2 { - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 18px; - font-weight: normal; - margin: 20px 15px; -} - -#dropdownWrapper { - float: right; - position: relative; -} - -TABLE.softwareStats { - border-collapse: collapse; - border: 1px solid #BDBDBD; - margin-bottom: 15px; - width: 100%; -} - -TABLE.softwareStats TH { - background: url("../../../images/calendar_header.png") repeat-x scroll left top #37302E; - color: #CACACA; - font-size: 11px; - height: 22px; -} - -TABLE.softwareStats TD { - color: #464646; - font-size: 11px; - font-weight: normal; - padding: 8px 0px; - text-align: center; -} - -TABLE.softwareStats TD.left, TABLE.softwareStats TH.left { - text-align: left; -} - -TABLE.softwareStats TR.alt td { - background: none repeat scroll 0% 0% #F5F5F5; -} - -TABLE.softwareStats .reviewerScoreBg { - background: none repeat scroll 0% 0% #7D7D7D ! important; -} - -TABLE.softwareStats tr.reviewerScoreBg th { - background: none repeat scroll 0% 0% #7D7D7D ! important; - font-weight: normal; -} - -TABLE.softwareStats .reviewerScoreBg.title span { - background: none repeat scroll 0% 0% #929292; - color: #FFFFFF; - display: block; - font-weight: bold; - line-height: 22px; - margin: 2px; -} - -a.handle { - color: #464646; - font-weight: bold; - text-decoration: none; -} - -a.handle:hover { - text-decoration: underline; -} - -p.information { - color: #464646; - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 11px; - line-height: 18px; -} - -.informationWrapper { - display: block; - margin: 10px 0px 20px 10px; -} - -span.icoTHDownload { - background: url("../../../images/ico_th_download.png") no-repeat scroll left top transparent; - display: block; - height: 11px; - margin: 0px auto; - width: 14px; -} - -.containerNoPadding .pagination { - clear: both; - float: none; - margin: 15px 10px; -} - -.icoZip { - display: block; - height: 16px; - margin: 0px auto; - width: 22px; -} - -.icoZip.normal { - background: url("../../../images/ico_zip_normal.png") no-repeat scroll left top transparent; -} - -.icoZip.gold { - background: url("../../../images/ico_zip_gold.png") no-repeat scroll left top transparent; -} - -.icoZip.silver { - background: url("../../../images/ico_zip_silver.png") no-repeat scroll left top transparent; -} - -.icoTrue { - background: url("../../../images/ico_true.png") no-repeat scroll right 0px transparent; - height: 30px; - line-height: 14px; - padding: 0px 22px 0px 0px; -} - -.icoFalse { - background: url("../../../images/ico_false.png") no-repeat scroll right 0px transparent; - height: 30px; - line-height: 14px; - padding: 0px 22px 0px 0px; -} - -.icoTrue, .icoFalse, a.scores { - color: #0072BC; - text-decoration: none; -} - -.icoTrue:hover, .icoFalse:hover, a.scores:hover { - text-decoration: underline; -} - -#winnerPanel { - border-bottom: 1px solid #BDBDBD; - clear: both; - overflow: hidden; - padding: 25px 0px 20px; -} - -.winnerCol { - float: left; - width: 50%; -} - -a.downloadFile { - background: url("../../../images/ico_big_download_zip.png") no-repeat scroll left top transparent; - float: left; - height: 78px; - margin: 0px 15px 0px 35px; - width: 64px; -} - -a.downloadFile:hover { - background: url("../../../images/ico_big_download_zip_hover.png") no-repeat scroll left top transparent; -} - -.winnerData { - margin: 10px 0px 0px; -} - -.winnerData h3 { - color: #000001; - font-size: 18px; - font-weight: bold; - margin: 0px 0px 3px; -} - -.winnerData a.handle { - color: #FF0001; - font-size: 18px; - font-weight: bold; -} - -.winnerData label { - color: #959595; - display: block; - font-size: 11px; - margin: 3px 0px; -} - -.winnerData label span { - color: #000001; - font-weight: bold; -} - -#bankSelection { - margin: 20px 0px 0px; -} - -#bankSelectionHead { - background: url("../../../images/calendar_header.png") repeat-x scroll left top #37302E; - color: #CACACA; - font-size: 11px; - height: 35px; -} - -#bankSelectionHead h3 { - background: url("../../../images/ico_bank_selection_head.png") no-repeat scroll left top transparent; - color: #FFFFFE; - float: left; - font-size: 12px; - font-weight: bold; - height: 16px; - line-height: 17px; - margin: 10px 0px 0px 20px; - padding: 0px 0px 0px 20px; -} - -#bankSelectionHead ul { - float: right; - margin: 0px 20px 0px 0px; -} - -#bankSelectionHead ul li { - float: left; - list-style: none outside none; -} - -#bankSelectionTab LI A, #bankSelectionTab LI div.tabOff { - background: url("../../../images/bank_selection_tab_left.png") no-repeat scroll left top transparent; - color: #000002; - float: left; - font-size: 11px; - line-height: 25px; - margin: 10px 3px 0px 0px; - padding: 0px 0px 0px 4px; - text-decoration: none; -} - -#bankSelectionTab LI A SPAN, #bankSelectionTab LI div.tabOff SPAN { - background: url("../../../images/bank_selection_tab_right.png") no-repeat scroll right top transparent; - cursor: pointer; - float: left; - height: 25px; - text-align: center; - width: 100px; -} - -#bankSelectionTab LI div.tabOff SPAN { - cursor: default ! important; -} - -#bankSelectionTab LI.off A, #bankSelectionTab LI.off div.tabOff { - background-position: left bottom; -} - -#bankSelectionTab LI.off SPAN, #bankSelectionTab LI.off div.tabOff SPAN { - background-position: right bottom; -} - -#bankSelectionContent { - background: url("../../../images/bank_selection_content.png") repeat-x scroll left bottom transparent; - border-bottom: 1px solid #BDBDBD; - display: block; - margin: 0px 1px; - overflow: hidden; - padding: 10px 20px; -} - -#bankSelectionSlotsContainer { - float: left; - margin: 15px 0px; - overflow: hidden; - width: 100%; -} - -#bankSelectionFolder { - float: right; -} - -#bankSelectionFolder li { - display: block; - list-style: none outside none; - margin: 4px 0px; -} - -#bankSelectionFolder li a { - background: url("../../../images/ico_folder.png") no-repeat scroll left top transparent; - display: block; - font-size: 11px; - height: 20px; - line-height: 20px; - padding: 0px 0px 0px 30px; - text-decoration: none; -} - -#bankSelectionFolder li a:hover { - text-decoration: underline; -} - -#likeFolder .drophover, #dislikeFolder .drophover { - background: url("../../../images/ico_folder_hover.png") no-repeat scroll left top transparent; -} - -#bankSelectionButton { - clear: both; -} - -.bankSelectionButtonBottom { - clear: both; - margin: 10px 20px 40px; - overflow: hidden; -} - -A.buttonBankSelection { - background: url("../../../images/btn_selection_bg.png") repeat-x scroll center top transparent; - color: #DBD9D9; - float: right; - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 11px; - margin: 0px 3px; - text-decoration: none; -} - -A.buttonBankSelection SPAN { - cursor: pointer; - float: left; -} - -A.buttonBankSelection SPAN.left { - background: url("../../../images/btn_selection_left.png") no-repeat scroll left top transparent; - padding: 0px; -} - -A.buttonBankSelection SPAN.right { - background: url("../../../images/btn_selection_right.png") no-repeat scroll right top transparent; - height: 18px; - padding: 4px 17px 0px; -} - -A.buttonBankSelection:hover { - background-position: left bottom; - text-decoration: none ! important; -} - -A.buttonBankSelection:hover SPAN { - background-position: right bottom; -} - -A.buttonBankSelection:hover SPAN.left { - background-position: left bottom; -} - -A.buttonBankSelection:hover SPAN.right { - background-position: right bottom; -} - -A.buttonBankSelection:hover SPAN.left { - background-position: left bottom; -} - -A.buttonBankSelection:hover SPAN.right { - background-position: right bottom; -} - -A.buttonBankSelection:hover SPAN.left { - background-position: left bottom; -} - -A.buttonBankSelection:hover SPAN.right { - background-position: right bottom; -} - -#bankSelectionSlots { - display: block; - width: 100%; -} - -#bankSelectionItem { - background: url("../../../images/bank_selection_bg.png") no-repeat scroll left top transparent; - float: left; - height: 85px; -} - -#bankSelectionItem li { - float: left; - list-style: none outside none; - margin: 0px 3px 0px 0px; - position: relative; - width: 66px; -} - -#bankSelectionItem li.drophover { - background: url("../../../images/prize_drop.png") no-repeat scroll left top transparent; -} - -.excerpt { - border: 1px dotted #999999; - float: left; -} - -.excerpt img { - float: left; - overflow: hidden; -} - -#bankSelectionItem li a.btn_remove { - background: url("../../../images/bank_selection_remove.png") no-repeat scroll left top transparent; - display: block; - height: 15px; - position: absolute; - right: 5px; - top: 5px; - width: 15px; - z-index: 10; -} - -#bankSelectionItem li label { - color: #7A7A7A; - display: block; - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 11px; - margin: 2px 0px 0px; - text-align: center; -} - -#bankSelectionItem li a.thumb { - display: block; - height: 66px; - overflow: hidden; - text-decoration: none; - width: 66px; -} - -#bankSelectionItem li a.thumb span { - background: url("../../../images/bank_selection_slot.png") no-repeat scroll left top transparent; - display: block; - height: 66px; - position: absolute; - width: 66px; - z-index: 5; -} - -#extraPrize { - background: url("../../../images/prize_extra.png") no-repeat scroll left top transparent; - margin: 0px 0px 0px 17px ! important; -} - -#extraPrize strong { - color: #7A7A7A; - display: block; - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 10px; - line-height: 12px; - margin: 15px auto 0px; - text-align: center; - text-decoration: none; - width: 50px; -} - -#numExtra { - color: #7A7A7A; - font-size: 10px; - padding: 42px 0px 0px; - text-align: center; -} - -.SubmissionSlotTitle { - float: left; - margin: 15px 0px 0px 20px; -} - -.SubmissionSlotTitle h3 { - font-size: 18px; - font-weight: normal; -} - -h3.red { - color: #CF0B0F; -} - -a.toggleViewList { - background: url("../../../images/ico_list.png") no-repeat scroll left 2px transparent; - font-size: 11px; - font-weight: normal; - padding: 0px 0px 0px 13px; - text-decoration: none; -} - -a.toggleViewGrid { - background: url("../../../images/ico_grid.png") no-repeat scroll left 2px transparent; - font-size: 11px; - font-weight: normal; - padding: 0px 0px 0px 13px; - text-decoration: none; -} - -a.toggleViewPrev { - background: url("../../../images/ico_prev.png") no-repeat scroll left 2px transparent; - font-size: 11px; - font-weight: normal; - padding: 0px 0px 0px 9px; - text-decoration: none; -} - -a.toggleViewMilestone { - background: url("../../../images/ico_milestone.png") no-repeat scroll left 2px transparent; - display: block; - font-size: 11px; - font-weight: normal; - margin: 3px 0px 0px; - padding: 0px 0px 0px 12px; - text-decoration: none; -} - -a.toggleViewList:hover, a.toggleViewGrid:hover, a.toggleViewPrev:hover, a.toggleViewMilestone:hover { - text-decoration: underline; -} - -.pagination.slotTitle { - display: block; - margin: 20px 15px 15px; -} - -.pagination.slotTitle .showPages { - margin: 0px 20px 0px 0px; -} - -#submissionGrid { - clear: both; - float: left; - margin: 30px 0px; - width: 100%; -} - -#submissionGrid ul { - float: left; - width: 100%; -} - -#submissionGrid li { - float: left; - list-style: none outside none; - margin: 0px 1% 40px 0px; - position: relative; - width: 32%; -} - -#submissionGrid li.last { - margin: 0px 0px 40px ! important; - width: 33%; -} - -.statusSubmissionWrap { - display: block; - margin: 0px auto; - position: relative; - width: 206px; -} - -#submissionGrid li label { - color: #333333; - display: block; - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 12px; - font-weight: bold; - margin: 2px 0px 0px; - text-align: center; -} - -#submissionGrid li label span { - font-weight: normal; -} - -#submissionGrid li a.thumbGrid { - display: block; - height: 206px; - overflow: hidden; - padding: 3px; - text-decoration: none; - width: 206px; -} - -#submissionGrid li a.thumbGrid span { - background: url("../../../images/thumb_big_slot_bg.png") repeat scroll left top transparent; - display: block; - height: 206px; - position: absolute; - width: 206px; - z-index: 5; -} - -#submissionGrid li a.thumbGrid img { - margin: 3px; -} - -.statusSubmission { - display: block; - height: 40px; - left: 6px; - position: absolute; - top: 20px; - width: 38px; - z-index: 5; -} - -.statusSubmission.firstSlot { - background: url("../../../images/btn_legend_1st.png") no-repeat scroll left top transparent; -} - -.statusSubmission.secondSlot { - background: url("../../../images/btn_legend_2nd.png") no-repeat scroll left top transparent; -} - -.statusSubmission.thirdSlot { - background: url("../../../images/btn_legend_3rd.png") no-repeat scroll left top transparent; -} - -.statusSubmission.fourthSlot { - background: url("../../../images/btn_legend_4th.png") no-repeat scroll left top transparent; -} - -.statusSubmission.fifthSlot { - background: url("../../../images/btn_legend_5th.png") no-repeat scroll left top transparent; -} - -.statusSubmission.likeSlot { - background: url("../../../images/btn_legend_like.png") no-repeat scroll left top transparent; -} - -.statusSubmission.dislikeSlot { - background: url("../../../images/btn_legend_dislike.png") no-repeat scroll left top transparent; -} - -.statusSubmission.dollarSlot { - background: url("../../../images/btn_legend_dollar.png") no-repeat scroll left top transparent; -} - -.submissionAction { - background: url("../../../images/submission_grid_action_bg.png") no-repeat scroll left top transparent; - display: none; - height: 35px; - left: 13px; - position: absolute; - top: 188px; - width: 187px; - z-index: 20; -} - -.submissionAction ul { - float: left; - margin: 10px 0px 0px 30px; -} - -.submissionAction li { - float: left; - list-style: none outside none; - margin: 0px 10px 0px 0px ! important; - width: 18px ! important; -} - -a.actButton { - display: block; - height: 17px; - position: relative; - width: 18px; - z-index: 11; -} - -a.actButtonlike { - display: block; - height: 17px; - position: relative; - width: 18px; - z-index: 11; -} - -a.actButtonlike span { - background: url("../../../images/btn_legend_sm_like.png") no-repeat scroll left top transparent; - cursor: pointer; - display: block; - height: 17px; - width: 18px; -} - -a.actButtonlike span.hover { - background: url("../../../images/btn_legend_sm_like_hover.png") no-repeat scroll left top transparent; -} - -a.actButtondislike { - display: block; - height: 17px; - position: relative; - width: 18px; - z-index: 11; -} - -a.actButtondislike span { - background: url("../../../images/btn_legend_sm_dislike.png") no-repeat scroll left top transparent; - cursor: pointer; - display: block; - height: 17px; - width: 18px; -} - -a.actButtondislike span.hover { - background: url("../../../images/btn_legend_sm_dislike_hover.png") no-repeat scroll left top transparent; -} - -a.actButtonzoom { - display: block; - height: 17px; - position: relative; - width: 18px; - z-index: 11; -} - -a.actButtonzoom span { - background: url("../../../images/btn_legend_sm_zoom.png") no-repeat scroll left top transparent; - cursor: pointer; - display: block; - height: 17px; - width: 18px; -} - -a.actButtonzoom span.hover { - background: url("../../../images/btn_legend_sm_zoom_hover.png") no-repeat scroll left top transparent; -} - -a.actButtondollar { - display: block; - height: 17px; - position: relative; - width: 18px; - z-index: 11; -} - -a.actButtondollar span { - background: url("../../../images/btn_legend_sm_dollar.png") no-repeat scroll left top transparent; - cursor: pointer; - display: block; - height: 17px; - width: 18px; -} - -a.actButtondollar span.hover { - background: url("../../../images/btn_legend_sm_dollar_hover.png") no-repeat scroll left top transparent; -} - -a.actButtonstar { - display: block; - height: 17px; - position: relative; - width: 18px; - z-index: 11; -} - -a.actButtonstar span { - background: url("../../../images/btn_legend_sm_star.png") no-repeat scroll left top transparent; - cursor: pointer; - display: block; - height: 17px; - width: 18px; -} - -a.actButtonstar span.hover { - background: url("../../../images/btn_legend_sm_star_hover.png") no-repeat scroll left top transparent; -} - -.submissionAction .dialog-mini-wrapper { - display: none; - margin: -22px -7px; - position: absolute; - z-index: 10; -} - -.submissionAction .dialog-mini.last { - left: -46px; -} - -.submissionAction .dialog-mini { - left: -40px; - margin: 25px 0px 0px; - position: absolute; - width: 120px; - z-index: 1; -} - -.submissionAction .dialog-mini-outside { - background: url("../../../images/dialog-mini-big-left.png") no-repeat scroll left top transparent; -} - -.submissionAction .dialog-mini-inside { - background: url("../../../images/dialog-mini-big-right.png") no-repeat scroll right top transparent; - font-size: 11px; - line-height: 21px; - margin: 0px 0px 0px 2px; - text-align: center; -} - -.submissionAction .dialog-mini strong, .submissionAction .dialog-mini-sm strong { - font-size: 11px; -} - -.submissionAction .dialog-mini .question { - color: #A8ABAD; - display: block; - font-size: 11px; - font-weight: bold; - margin: 0px ! important; -} - -.submissionAction .dialog-mini .question a { - color: #A8ABAD; - font-size: 11px; - font-weight: bold; - text-align: center; - text-decoration: none; -} - -.submissionAction .dialog-mini .question a:hover { - text-decoration: underline; -} - -.submissionAction .dialog-mini-arrow { - background: url("../../../images/dialog-mini-arrow-alt.png") no-repeat scroll left top transparent; - height: 25px; - margin: 2px 0px 0px 5px; - position: absolute; - width: 25px; - z-index: 2; -} - -.submissionAction .dialog-mini-sm { - left: -40px; - margin: 25px 0px 0px; - position: absolute; - width: 120px; - z-index: 1; -} - -.submissionAction .dialog-mini-sm-outside { - background: url("../../../images/dialog-mini-left.png") no-repeat scroll left top transparent; -} - -.submissionAction .dialog-mini-sm-inside { - background: url("../../../images/dialog-mini-right.png") no-repeat scroll right top transparent; - font-size: 11px; - height: 23px; - line-height: 23px; - margin: 0px 0px 0px 2px; - text-align: center; -} - -.blackLink { - background: none repeat scroll 0% 0% transparent; - color: #000002 ! important; - margin: 0px 5px 0px 0px ! important; -} - -.extraLink { - margin: 0px 0px 0px 4px ! important; -} - -#submissionList { - clear: both; - float: left; - margin: 20px 0px; - width: 100%; -} - -#submissionList table { - border-collapse: collapse; - margin: 0px 1%; - width: 98%; -} - -#submissionList table th { - background: url("../../../images/submission_list_th.png") repeat-x scroll left -29px transparent; - color: #FFFFFE; - font-size: 12px; - font-weight: normal; - height: 29px; - line-height: 29px; - text-align: center; -} - -#submissionList table th.first { - background: url("../../../images/submission_list_th.png") no-repeat scroll left 0px rgba(0, 0, 0, 0) ! important; - width: 4px; -} - -#submissionList table th.last { - background: url("../../../images/submission_list_th.png") no-repeat scroll right -58px rgba(0, 0, 0, 0) ! important; - width: 6px; -} - -#submissionList table .left { - text-align: left; -} - -#submissionList table td { - color: #333333; - font-size: 12px; - font-weight: normal; - padding: 10px 0px; - text-align: center; - vertical-align: middle; -} - -span.ascending { - background: url("../../../images/submission_list_asc.png") no-repeat scroll right 5px transparent; - padding: 0px 10px 0px 0px; -} - -span.icoBankLocation { - display: block; - height: 31px; - margin: 0px auto; - width: 31px; -} - -#submissionList span.icoBankLocation.firstSlots { - background: url("../../../images/btn_legend_list_1st.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -#submissionList span.icoBankLocation.secondSlots { - background: url("../../../images/btn_legend_list_2nd.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -#submissionList span.icoBankLocation.thirdSlots { - background: url("../../../images/btn_legend_list_3rd.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -#submissionList span.icoBankLocation.fourthSlots { - background: url("../../../images/btn_legend_list_4th.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -#submissionList span.icoBankLocation.fifthSlots { - background: url("../../../images/btn_legend_list_5th.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -#submissionList span.icoBankLocation.nullSlots { - background: url("../../../images/btn_legend_list_null.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -#submissionList span.icoBankLocation.likeSlots { - background: url("../../../images/btn_legend_list_like.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -#submissionList span.icoBankLocation.dislikeSlots { - background: url("../../../images/btn_legend_list_dislike.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -#submissionList span.icoBankLocation.dollarSlots { - background: url("../../../images/btn_legend_list_dollar.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -a.thumbList { - display: block; - height: 136px; - margin: 0px auto; - overflow: hidden; - position: relative; - text-decoration: none; - width: 136px; -} - -a.thumbList span { - background: url("../../../images/thumb_list_bg.png") repeat scroll left top transparent; - display: block; - height: 137px; - left: 0px; - position: absolute; - width: 136px; - z-index: 5; -} - -a.thumbList img { - margin: 3px; -} - -#submissionList .submissionListAction { - display: block; - height: 35px; - margin: 0px auto; - width: 187px; -} - -.submissionListAction ul { - float: left; - margin: 10px 0px 0px 30px; -} - -.submissionListAction li { - float: left; - list-style: none outside none; - margin: 0px 10px 0px 0px ! important; - width: 18px ! important; -} - -.submissionListAction .dialog-mini-wrapper { - display: none; - margin: -22px -8px; - position: absolute; - z-index: 10; -} - -.submissionListAction .dialog-mini { - left: -39px; - margin: 25px 0px 0px; - position: absolute; - width: 120px; - z-index: 1; -} - -.submissionListAction .dialog-mini-sm { - left: -40px; - margin: 25px 0px 0px; - position: absolute; - width: 120px; - z-index: 1; -} - -.submissionListAction li a.actButtonlike span { - background: url("../../../images/btn_legend_sm_like_hover.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -.submissionListAction li a.actButtondislike span { - background: url("../../../images/btn_legend_sm_dislike_hover.png") no-repeat scroll left top transparent; -} - -.submissionListAction li a.actButtonzoom span { - background: url("../../../images/btn_legend_sm_zoom_hover.png") no-repeat scroll left top transparent; -} - -.submissionListAction li a.actButtondollar span { - background: url("../../../images/btn_legend_sm_dollar_hover.png") no-repeat scroll left top transparent; -} - -.submissionListAction li a.actButtonstar span { - background: url("../../../images/btn_legend_sm_star_hover.png") no-repeat scroll left top transparent; -} - -.submissionListAction .dialog-mini-inside, #submissionList .submissionListAction .dialog-mini-sm-inside { - font-size: 11px; -} - -#singleSubmissionContainer { - clear: both; - float: left; - margin: 30px 0px; - overflow: hidden; - width: 100%; -} - -#submissionData { - clear: both; - display: block; - font-size: 12px; - margin: 40px auto 0px; - width: 700px; -} - -#submissionData table { - clear: both; - float: left; - line-height: 20px; - margin: 0px 30px; -} - -#submissionData .label { - float: left; - font-weight: bold; - width: 110px; -} - -#submissionFeedback { - clear: both; - display: block; - line-height: 20px; - margin: 40px auto 0px; - padding-top: 20px; - width: 635px; -} - -#submissionFeedback h4 { - color: #484848; - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 14px; - font-weight: bold; -} - -#submissionFeedback textarea { - background: url("../../../images/single_submission_textarea.png") repeat-x scroll left top transparent; - border: 1px solid #979797; - color: #686868; - display: block; - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 12px; - height: 80px; - padding: 4px; - width: 600px; -} - -.containerNoPadding .panel { - clear: both; - margin: 10px 10px 0px 0px ! important; -} - -#submissionFeedback .button6 { - float: left; - margin: 10px 0px; -} - -#submissionFeedback .button6 span.left, #submissionFeedback .button6 span.right { - float: left ! important; -} - -#navSubmissionSlideshowTop { - float: right; - margin: 20px 10px 0px; -} - -#navSubmissionSlideshowTop li { - color: #333333; - float: left; - font-size: 11px; - list-style: none outside none; -} - -#navSubmissionSlideshowTop li.dot { - background: url("../../../images/dot.png") no-repeat scroll center 4px transparent; - display: block; - padding: 10px; -} - -#navSubmissionSlideshowTop li a { - text-decoration: none; -} - -#navSubmissionSlideshowTop li a:hover { - text-decoration: underline; -} - -#navSubmissionSlideshowTopPrev { - background: url("../../../images/submission_arrow_prev.png") no-repeat scroll left 2px transparent; - padding: 0px 0px 0px 10px; -} - -#navSubmissionSlideshowTopNext { - background: url("../../../images/submission_arrow_next.png") no-repeat scroll right 2px transparent; - padding: 0px 10px 0px 0px; -} - -#singleSubmissionSlide { - clear: both; - display: block; - margin: 0px auto; - position: relative; - width: 665px; -} - -#singleSubmissionSlide ul { - height: 560px; -} - -#singleSubmissionSlide ul li { - float: left; - list-style: none outside none; -} - -a.thumbSingle { - display: block; - height: 484px; - margin: 0px auto; - overflow: hidden; - text-decoration: none; - width: 665px; -} - -a.thumbSingle span { - background: url("../../../images/submission_single_bg.png") repeat scroll left top transparent; - display: block; - height: 484px; - position: absolute; - width: 665px; - z-index: 5; -} - -a.thumbSingle img { - margin: 3px; -} - -#navSingleSubmissionSlidePrev { - background: url("../../../images/single_submission_prev.png") repeat scroll left top transparent; - display: block; - height: 50px; - position: absolute; - top: 220px; - width: 33px; - z-index: 100; -} - -#navSingleSubmissionSlideNext { - background: url("../../../images/single_submission_next.png") repeat scroll left top transparent; - display: block; - height: 50px; - position: absolute; - right: 0px; - top: 220px; - width: 33px; - z-index: 100; -} - -#singleSubmissionSlide .submissionAction { - background: url("../../../images/single_submission_action_bg.png") no-repeat scroll left top transparent; - display: block; - height: 47px; - margin: 0px auto; - overflow: visible; - position: static; - width: 187px; - z-index: 20; -} - -#singleSubmissionSlide .submissionAction ul { - float: left; - margin: 15px 0px 0px; -} - -#singleSubmissionSlide .submissionAction ul li { - margin: 0px 8px 0px 0px ! important; -} - -#singleSubmissionSlide .submissionAction ul li.last { - margin: 0px ! important; -} - -span.icoSingleSubmissionBankLocation { - float: left; - height: 31px; - margin: 6px 10px 0px; - width: 31px; -} - -span.icoSingleSubmissionBankLocation.firstSlots { - background: url("../../../images/btn_legend_single_1st.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -span.icoSingleSubmissionBankLocation.secondSlots { - background: url("../../../images/btn_legend_single_2nd.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -span.icoSingleSubmissionBankLocation.thirdSlots { - background: url("../../../images/btn_legend_single_3rd.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -span.icoSingleSubmissionBankLocation.fourthSlots { - background: url("../../../images/btn_legend_single_4th.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -span.icoSingleSubmissionBankLocation.fifthSlots { - background: url("../../../images/btn_legend_single_5th.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -span.icoSingleSubmissionBankLocation.nullSlots { - background: url("../../../images/btn_legend_single_null.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -span.icoSingleSubmissionBankLocation.likeSlots { - background: url("../../../images/btn_legend_single_like.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -span.icoSingleSubmissionBankLocation.dislikeSlots { - background: url("../../../images/btn_legend_single_dislike.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -span.icoSingleSubmissionBankLocation.dollarSlots { - background: url("../../../images/btn_legend_single_dollar.png") no-repeat scroll left top rgba(0, 0, 0, 0) ! important; -} - -textarea.txtFeedback { - background: url("../../../images/single_submission_textarea.png") repeat-x scroll left top transparent; - border: 1px solid #979797; - clear: both; - color: #686868; - display: block; - font-family: "Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 12px; - height: 80px; - padding: 4px; - width: 350px; -} - -.bankSelectionButtonMilestone { - margin: 20px; - overflow: hidden; -} - -#submissionList td a.button6 { - float: left; - margin: 5px 0px; -} - -#submissionList td .button6 span.left, #submissionList td .button6 span.right { - float: left ! important; -} - -.warningMilestone { - background: url("../../../images/warning_milestone.png") no-repeat scroll left 4px transparent; - display: block; - padding: 0px 0px 0px 50px; - text-align: left; - width: 330px; -} - -.warningMilestone a { - color: #FF0002; - font-weight: bold; -} - -.warningMilestone a:hover { - text-decoration: none; -} - -.posAbsolute { - position: absolute; - top: 55px; - z-index: 15; -} - -.thumbCheckout { - display: block; - margin: 0px auto; - position: relative; - width: 166px; -} - -.finalGrid .submissionAction { - background: url("../../../images/final_grid_action_bg.png") no-repeat scroll left top transparent; - display: none; - height: 47px; - left: 13px; - position: absolute; - top: 173px; - width: 187px; - z-index: 20; -} - -.finalGrid .submissionAction ul { - float: left; - margin: 13px 0px 0px; - width: 130px ! important; -} - -.finalGrid .submissionAction ul li { - margin: 0px 8px 0px 0px ! important; -} - -.finalGrid .submissionAction ul li .dialog-mini.last { - left: -60px; -} - -#additionalPurchase { - clear: both; -} - -#additionalPurchase h3 { - font-size: 18px; - font-weight: normal; - margin: 15px 0px 15px 20px; -} - -.additionalPurchaseTitle { - background: url("../../../images/purchase_title.png") repeat-x scroll left top #37302E; - color: #FFFFFF; - font-size: 12px; - font-weight: normal; - height: 35px; - line-height: 35px; - text-align: left; -} - -.additionalPurchaseTitle p { - background: url("../../../images/purchase_dollar.png") no-repeat scroll left 9px transparent; - margin: 0px 0px 0px 20px; - padding: 0px 0px 0px 20px; -} - -#additionalPurchase p.information { - color: #333333; - display: block; - font-size: 11px; - margin: 5px 0px 0px 20px; -} - -.additionalPurchaseContent { - background: url("../../../images/bank_selection_content.png") repeat-x scroll left bottom transparent; - border-bottom: 1px solid #BDBDBD; - display: block; - margin: 0px 1px 15px; - overflow: hidden; - padding: 10px 0px; -} - -.additionalButton { - clear: both; - margin: 10px 0px 0px 18px; -} - -.additionalButton a { - float: left; -} - -.additionalPreview { - clear: both; - float: left; - margin: 20px 0px 10px 25px; -} - -.additionalCol { - float: left; - margin: 0px 20px 0px 0px; - overflow: hidden; -} - -.additionalCol label { - float: left; - font-size: 11px; -} - -.additionalCol input { - float: right; -} - -.additionalCol .thumbList { - clear: both; - display: block; - float: left; - margin: 5px 0px 0px; -} - -#purchaseSummary { - clear: both; - display: block; - overflow: hidden; - padding: 10px 10px 40px; -} - -.selectPaymentTitle { - border-bottom: 1px solid #BDBDBD; - border-top: 1px solid #BDBDBD; - color: #333333; - float: left; - padding: 7px 0px; - width: 100%; -} - -.selectPaymentTitle h3 { - color: #000002; - float: left; - font-size: 18px; - font-weight: normal; - margin: 2px 0px 0px 10px; -} - -.paymentMethod { - float: right; - margin: 0px 10px 0px 0px; -} - -.paymentMethod label { - float: left; - font-size: 12px; - font-weight: normal; - margin: 7px 10px; -} - -#selectPaymentWrapper { - float: left; - position: relative; -} - -#purchaseSummary table { - border-collapse: collapse; - float: left; - width: 100%; -} - -#purchaseSummary table td { - font-size: 12px; - padding: 5px 10px; -} - -#purchaseSummary table th { - border-bottom: 1px solid #BDBDBD; - border-top: 1px solid #BDBDBD; - color: #333333; - padding: 12px 10px; -} - -#purchaseSummary table td.label { - font-weight: bold; -} - -#purchaseSummary table td.sum { - font-weight: bold; - text-align: right; -} - -#purchaseSummary table tr.total { - border-top: 3px solid #BDBDBD; - color: #333333; -} - -#purchaseSummary table tr.total td.label { - font-size: 24px; - font-weight: bold; -} - -#purchaseSummary table tr.total td.sum { - font-size: 24px; - font-weight: bold; -} - -.submissionDetails label { - color: #333333; - font-size: 14px; - font-weight: bold; -} - -.submissionDetails .submissionDetailsContent { - color: #686868; - margin: 7px 0px; -} - -a.downloadSubmission { - background: url("../../../images/checkout_download.png") no-repeat scroll left top transparent; - color: #FFFFFE; - float: left; - font-family: "Myriad Pro","Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 12px; - font-weight: bold; - line-height: 24px; - padding: 0px 0px 0px 27px; - text-decoration: none; -} - -a.downloadSubmission span { - background: url("../../../images/checkout_download_right.png") no-repeat scroll right top transparent; - cursor: pointer; - float: left; - height: 24px; - line-height: 24px; - padding: 0px 10px; -} - -a.downloadSubmission:hover { - background: url("../../../images/checkout_download.png") no-repeat scroll left -24px transparent; -} - -a.downloadSubmission:hover span { - background: url("../../../images/checkout_download_right.png") no-repeat scroll right -24px transparent; -} - -#sortable { - list-style-type: none; - margin: 0px; - padding: 0px; - width: 60%; -} - -#sortable li { - font-size: 1.2em; - height: 1.5em; - margin: 0px 5px 5px; - padding: 5px; -} - -html > body #sortable li { - height: 1.5em; - line-height: 1.2em; -} - -.ui-state-highlight { - height: 1.5em; - line-height: 1.2em; -} - -.labelPerPageClear { - color: #999999; - margin: 0px 0px 0px 65px; -} - -p.foundText { - color: #333333; - font-size: 12px; - margin-top: 15px; - padding-bottom: 8px; - padding-left: 10px; -} - -p.view, p.pagination { - background-color: inherit; - color: #000000; - float: left; - font-size: 11px; - margin: 5px 0px; -} - -p.view { - background-color: inherit; - line-height: 27px; -} - -p.pagination { - float: right; -} - -p.view select { - font-size: 11px; - height: 20px; - padding-left: 5px; - padding-top: 2px; - width: 50px; -} - -p.view select option { - padding-left: 5px; -} - -p.pagination span { - background-color: inherit; - color: #000000; - font-weight: bold; -} - -p.pagination a { - color: #EC1C23; -} - -table.scorecard.view2 { - border-collapse: collapse; - color: #333333; - font-size: 12px; -} - -table.scorecard.view2 thead th { - background-color: #f5f5f5; - color: #333333; - font-size: 13px; - font-weight: normal; - height: 29px; - padding-left: 10px; - text-align: left; -} - -table.scorecard.view2 tr.questionHead td { - background-color: #F0F0F0; -} - -table.scorecard.view2 th.first, table.scorecard.view2 td.first { - width: 63%; -} - -table.scorecard.view2 tbody tr { - border: 1px solid #EDEDED; -} - -table.scorecard.view2 thead tr { - border: 1px solid #EDEDED; -} - -table.scorecard.view2 tfoot th { - background: none repeat scroll 0% 0% #FFFFFF; - border: 1px solid #EDEDED; - padding: 5px 0px 5px 10px; -} - -table.scorecard.view2 td.right, table.scorecard.view2 tfoot th.right { - padding-right: 10px; - text-align: right; -} - -table.scorecard.view2 tfoot th.left { - padding-left: 10px; - text-align: left; -} - -table.scorecard.view2 tfoot th.left span, table.scorecard.view2 tbody td.left span { - font-weight: normal; - margin-left: 10px; -} - -table.scorecard.view2 td { - background: none repeat scroll 0% 0% #FFFFFF; - border: 1px solid #EDEDED; - padding: 5px 0px 5px 10px; - vertical-align: top; -} - -table.scorecard.view2 td.btn { - padding-left: 5px; - width: 24px; -} - -table.scorecard.view2.edit td { - vertical-align: middle; -} - -table.scorecard.view2 .group { - float: left; - font-weight: bold; - height: 16px; - padding-left: 22px; - padding-right: 10px; - text-decoration: none; -} - -table.scorecard.view2 .expand { - background: url("../../../images/notification_expand_ico.png") no-repeat scroll left center transparent; - text-decoration: none; -} - -table.scorecard.view2 .collapse { - background: url("../../../images/minimize.png") no-repeat scroll 0% 0% transparent; -} - -div.ratings { - margin-top: 15px; -} - -div.rating { - float: left; - position: relative; -} - -div.ratingText { - margin-left: 60px; -} - -div.rating span { - background: url("../../../images/rating-bg.png") repeat-x scroll center center transparent; - color: #FFFFFF; - display: block; - height: 18px; - line-height: 18px; - padding: 0px 5px; -} - -table.scorecard.view2 div.tl, table.scorecard.view2 div.tr, table.scorecard.view2 div.bl, table.scorecard.view2 div.br { - background-color: #FFFFFF; - background-image: url("none"); - display: block; - height: 1px; - position: absolute; - width: 1px; -} - -table.scorecard.view2 div.tl { - left: 0px; - top: 0px; -} - -table.scorecard.view2 div.tr { - right: 0px; - top: 0px; -} - -table.scorecard.view2 div.bl { - bottom: 0px; - left: 0px; -} - -table.scorecard.view2 div.br { - bottom: 0px; - right: 0px; -} - -#sumOfGroups, .biggroup { - padding: 2px; -} - -#sumOfGroups { - margin-top: 0px; - padding-top: 0px; -} - -.biggroup.hover { - border-color: #E86200; - border-style: solid; - border-width: 2px; - padding: 0px; -} - -table.scorecard.view2.section.hover { - border: 2px solid #E86200; -} - -table.scorecard.view2.section.edit.hover tr td { - background-color: #FDFFCF; - padding-left: 9px; -} - -table.scorecard.view2 tr.question.hover { - border: 2px solid #E86200; -} - -table.scorecard.view2 tr.question.hover td { - background-color: #FDFFCF; - padding: 4px 0px 4px 9px; -} - -.expandCollapse { - float: right; - margin-top: 5px; -} - -.expandCollapse a.expandAll, .expandCollapse a.collapseAll { - color: #08c; - font-size: 12px; - text-decoration: none; -} - -.expandCollapse a.expandAll:hover, .expandCollapse a.collapseAll:hover { - text-decoration: underline; -} - -.expandCollapse a.button6 { - margin-left: 10px; -} - -.expandCollapse a.button6 span.right { - padding-left: 20px; - padding-right: 20px; -} - -input.longText { - color: #333333; - font-size: 11px; - height: 20px; - margin: 3px 0px; - padding: 0px 5px; - width: 354px; -} - -input.mediumText { - color: #333333; - font-size: 11px; - height: 20px; - margin: 3px 0px; - padding: 0px 5px; - width: 154px; -} - -input.shortText { - color: #333333; - font-size: 11px; - height: 20px; - margin: 3px 0px; - padding: 0px 5px; - width: 29px; -} - -input.red { - background-color: #FF0000; -} - -input.green { - background-color: #95C448; -} - -select.edit { - color: #333333; - font-size: 11px; - height: 20px; - line-height: 20px; - margin: 3px 0px; - width: 93%; -} - -select.shortedit { - color: #333333; - font-size: 11px; - height: 20px; - line-height: 20px; - margin: 3px 0px; - width: 93%; -} - -textarea.question { - color: #333333; - font-family: "Source Sans Pro",Arial; - font-size: 11px; - height: 30px; - padding: 0px 5px; - width: 96%; -} - -textarea.guideline { - color: #333333; - font-family: "Source Sans Pro",Arial; - font-size: 11px; - height: 130px; - padding: 0px 5px; - width: 96%; -} - -.relative { - position: relative; -} - -.move { - background: url("../../../images/move-icon.png") no-repeat scroll 0% 0% transparent; - cursor: pointer; - display: block; - height: 19px; - left: -29px; - position: absolute; - top: 0px; - width: 18px; -} - -tr.section .move, tr.section .move:hover { - background: url("../../../images/move-icon-disabled.png") no-repeat scroll 0% 0% transparent; -} - -tr.section .move.handle { - background: url("../../../images/move-icon.png") no-repeat scroll 0% 0% transparent; -} - -tr.section .move.handle:hover { - background: url("../../../images/move-icon-hover.png") no-repeat scroll 0% 0% transparent; -} - -.checkMatch { - background: url("../../../images/check-match.png") no-repeat scroll 0% 0% transparent; - cursor: pointer; - display: block; - height: 19px; - left: -29px; - position: absolute; - top: -6px; - width: 19px; - z-index: 1000; -} - -.checkMatch.hover { - background: url("../../../images/check-match-hover.png") no-repeat scroll 0% 0% transparent; -} - -table.group .checkMatch { - top: -8px; -} - -table.section tr.section .checkMatch { - top: -7px; -} - -.checkMatch input { - cursor: pointer; - margin: 2px 3px; -} - -.card { - padding: 2px; -} - -.card.hover, table.scorecard.view2.checks.section.hover, table.scorecard.view2.checks tr.question.hover { - border: 2px solid #007500; - padding: 0px; -} - -table.scorecard.view2.checks tbody.hover tr { - border-left: 2px solid #007500; - border-right: 2px solid #007500; -} - -table.scorecard.view2.checks.section.hover tr.section td, table.scorecard.view2.checks tr.question.hover td { - background-color: #EFF8DE; -} - -.move:hover { - background: url("../../../images/move-icon-hover.png") no-repeat scroll 0% 0% transparent; -} - -table.scorecard.view2 .relative .move.group { - height: 19px; - padding: 0px; - top: -1px; - width: 18px; -} - -table.scorecard.view2.hover .relative .move.group { - top: -2px; -} - -.move.question { - top: -6px; -} - -.move.section { - top: -6px; -} - -#sortable, tbody { - width: 100%; -} - -a.remIcon, a.addIcon { - background: url("../../../images/add-icon.png") no-repeat scroll 0% 0% transparent; - display: block; - float: right; - height: 19px; - margin: 4px 5px 4px 0px; - width: 19px; -} - -a.remIcon { - background: url("../../../images/remove-icon.png") no-repeat scroll 0% 0% transparent; -} - -tr.questionHead a.addIcon.hover, a.addIcon:hover { - background: url("../../../images/add-icon-hover.png") no-repeat scroll 0% 0% transparent; -} - -a.remIcon:hover { - background: url("../../../images/remove-icon-hover.png") no-repeat scroll 0% 0% transparent; -} - -a.remIcon.onlyOne, a.remIcon.onlyOne:hover { - background: url("../../../images/remove-icon-disabled.png") no-repeat scroll 0% 0% transparent; -} - -.addmenu { - background: url("../../../images/addmenu.png") no-repeat scroll 0% 0% transparent; - color: #FFFFFF; - display: none; - height: 70px; - position: absolute; - width: 160px; - z-index: 999; -} - -.addmenu a { - background-color: inherit; - color: #FFFFFF; - font-size: 11px; - line-height: 24px; - margin-left: 10px; - text-decoration: none; -} - -.addmenu a:hover { - text-decoration: underline; -} - -#addScorecard2 .scorecardFind .row div.caption, #addScorecard .scorecardFind .row div.caption { - color: #333333; - display: inline; - float: left; - font-family: "Source Sans Pro",Arial; - font-size: 14px; - font-weight: bold; - line-height: 28px; - margin-right: 20px; - text-align: right; - width: 220px; -} - -a.multiSelect { - margin: 5px; - border: 1px solid #EDEDED !important; -} - -a.modalTitleBtn { - margin-top: 5px; -} - -.box .contestsList { - position: relative; - z-index: 10; -} - -.box .selectMask { - position: relative; -} - -.box .customerSelectMask { - z-index: 99; -} - -.box .projectSelectMask { - z-index: 98; -} - -.box .selectMask .contestsDropDown { - max-height: 200px; - overflow: auto; -} - -#area2 .contestsDropDown .longWordsBreak { - display: block ! important; - padding-left: 1px; - padding-top: 2px; -} -.newSidebar .topBtns { - background: url(../../images/sidebar-top-bg.gif) no-repeat 0 0; - padding: 16px 0 8px 10px; - overflow: hidden; -} - -.newSidebar .topBtns a { - float: left; - color: #fffffe; - padding-top: 67px; - background-repeat: no-repeat; - background-position: 0 0; - margin-right: 9px; - text-decoration: none; - font-size: 11px; - text-align: center; -} - -.newSidebar .topBtns a:hover { - text-decoration: none; - color: #ff0000; -} - -.newSidebar .topBtns a.copilot { - background-image: url(../../images/copilot-icon.png); - width: 76px; -} - -.newSidebar .topBtns a.copilot:hover { - background-image: url(../../images/copilot-icon-hover.png); -} - -.newSidebar .topBtns a.start { - background-image: url(../../images/start-project-icon.png); - width: 80px; -} - -.newSidebar .topBtns a.start:hover { - background-image: url(../../images/start-project-icon-hover.png); -} - -.newSidebar .topBtns a.launch { - background-image: url(../../images/launch-contest-icon.png); - width: 78px; -} - -.newSidebar .topBtns a.launch:hover { - background-image: url(../../images/launch-contest-icon-hover.png); - color: #ff0000; -} - -.newSidebar .contestList { - background: url(../../images/sidebar-top-bg.gif) no-repeat 0 0; - padding: 16px 0 4px; - position: relative; -} - -.newSidebar .contestListMask { - border: 1px solid #E7E7E7; - background-color: #fff; - width: 252px; - margin: 0 auto; - padding-bottom: 3px; - position: relative; -} - -.newSidebar .contestList .filter { - padding: 0 0 14px 14px; -} - -.newSidebar .contestList .filter label { - color: #333; - font-weight: bold; - font-size: 11px; - display: block; - padding: 12px 0 5px; -} - -.newSidebar .contestList .filter .dropdownWidget { - height: 22px; - width: 195px; - position: relative; - padding: 0 2px; - border: 1px solid #E7E7E7; - border-radius: 4px; -} - -.newSidebar .contestList .filter .dropdownWidget.searchMask { - width: 220px; -} - -.newSidebar .contestList .filter .dropdownWidget input[type='text'] { - border: 0; - height: 18px; - line-height: 18px; - padding: 0 2px; - width: 177px; - color: #333; - font-size: 11px; - font-family: "Source Sans Pro", Arial, Helvetica, sans-serif; -} - -.newSidebar .contestList .filter .dropdownWidget.searchMask input[type='text'] { - width: 217px; -} - -.newSidebar .contestList .filter .selectProjectBtn { - position: absolute; - top: 87px; - right: 3px; -} - -.newSidebar .contestList .filter .dropdownWidget a.arrow { - background: url(../../images/dropdown-box-arrow.gif) no-repeat 0 0; - height: 20px; - width: 20px; - position: absolute; - right: 3px; - top: 1px; -} - -.newSidebar .contestList .filter .dropdownWidget .dropList { - position: absolute; - top: 22px; - width: 202px; - max-height: 200px; - overflow: auto; - border: 1px solid #D0D2D3; - left: 0; - display: none; -} - -.newSidebar .contestList .filter .dropdownWidget .dropList li { - background-color: #FFFFFF; - font-size: 11px; - cursor: pointer; -} - -.newSidebar .contestList .filter .dropdownWidget .dropList a { - display: block; - padding: 3px 5px; - text-decoration: none; -} - -.newSidebar .contestList .dropdownWidget .dropList .even a { - background: #F3F3F3; - width: 100%; - margin-left: -4px !important; - padding-left: 5px !important; - height: 100%; -} - -.newSidebar .contestList .dropdownWidget .dropList .even { - background: #F3F3F3 !important; -} - -.newSidebar .contestList .dropdownWidget .dropList .even:hover, -.newSidebar .contestList .dropdownWidget .dropList li.hover { - background: #ffffcc !important; -} - -.newSidebar .contestList .dropdownWidget .dropList li.hover a, -.newSidebar .contestList .dropdownWidget .dropList a:hover, -.newSidebar .contestList .dropdownWidget .dropList .even a:hover { - background: #ffffcc; -} - -.newSidebar .contestList .tableHeader { - height: 33px; - border-top: 1px solid #d2d2d2; - background: #F1F1F1; -} - -.newSidebar .contestList .tableHeader span { - text-align: center; - font-size: 12px; - font-weight: bold; - color: #666666; - float: left; - height: 25px; - padding-top: 8px; - cursor: pointer -} - -.newSidebar .contestList .tableHeader span.down { - background: url(../../images/arrow-down.png) no-repeat center 23px; -} - -.newSidebar .contestList .tableHeader span.up { - background: url(../../images/arrow-up.png) no-repeat center 23px; -} - -.newSidebar .contestList .tableHeader span.statusTh { - width: 42px; -} - -.newSidebar .contestList .tableHeader span.titleTh { - width: 142px; -} - -.newSidebar .contestList .tableHeader span.typeTh { - width: 46px; -} - -.newSidebar .contestList .tableBody { - background: #fffffe; - max-height: 500px; - overflow: auto; -} - -.newSidebar .contestList .tableBody table { - width: 100%; - font-size: 12px; - color: #343436; - border: none; -} - -.newSidebar .contestList .tableBody table td { - cursor: pointer; - padding: 5px 3px; - border-bottom: 1px solid #E7E7E7; - vertical-align: middle; - text-align: center; -} - -.newSidebar .contestList .tableBody table td.leftAlign { - text-align: left; -} - -.newSidebar .contestList .tableBody table .even td { - background: #F1F1F1; -} - -.newSidebar .contestList .tableBody table .hover td { - background: #ffffcc; - font-weight: bold; - color: #ff0000; -} - -.newSidebar .contestList .tableBody table span.running { - background: url("/images/active_status_ico.png") no-repeat 0 0; - display: inline-block; - width: 12px; - height: 12px; -} - -.newSidebar .contestList .tableBody table span.draft { - background: url("/images/draft_status_ico.png") no-repeat 0 0; - display: inline-block; - width: 12px; - height: 12px; -} - -.newSidebar .contestList .tableBody table span.scheduled { - background: url("/images/active_status_ico.png") no-repeat 0 0; - display: inline-block; - width: 12px; - height: 12px; -} - -.newSidebar .contestList .tableBody table span.cancelled { - background: url("/images/cancelled_status_ico.png") no-repeat 0 0; - display: inline-block; - width: 12px; - height: 12px; -} - -.newSidebar .contestList .tableBody table span.completed { - background: url("/images/completed_status_ico.png") no-repeat 0 0; - display: inline-block; - width: 12px; - height: 12px; -} - -.newSidebar .archiveLink { - text-align: right; - padding: 0 11px 12px 0; -} - -.newSidebar .archiveLink a { - background: url(../../images/archive.png) no-repeat 0 center; - padding-left: 35px; - display: inline-block; - color: #FF8A00; - text-decoration: none; - font-size: 12px; - font-weight: bold; -} - -.newSidebar .archiveLink a:hover { - text-decoration: underline; -} - -#helpCenterWidget { - background: url("../../../images/sidebar-top-bg.gif") no-repeat scroll 0px 0px transparent; - padding-top: 9px; -} - -.multiSelect, .multiSelectOptions { - font-size: 12px; -} - -.multiSelectOptions { - margin-left: 5px; - margin-top: 4px; -} - - -a.multiSelect.active, a.multiSelect { - background-image: url("../../images/dropdown-box-arrow.gif") ! important; - border: 1px solid #EDEDED; -} - -#newHeader { - position: relative; - z-index: 1100; -} - -#newHeader li { - list-style: none outside none; -} - -#newHeader a { - text-decoration: none; -} - -#newHeader a:hover { - text-decoration: underline; -} - -#newHeader a.logo:hover { - text-decoration: none; -} - -#newHeader .logo { - color: #666666; - font-family: "Source Sans Pro",Geneva,Arial,Helvetica,sans-serif; - font-size: 18px; - font-weight: 600; - left: 27px; - position: absolute; - text-decoration: none; - top: 60px; -} - -#newHeader .logo img.copilotTitle { - vertical-align: bottom; -} - -#newHeader .logo img.projectTitle { - vertical-align: top; -} - -#newHeader .logo span { - font-weight: bold; - line-height: 39px; -} - -#newHeader .logo #projectTitleSpan { - line-height: 32px; - padding-left: 10px; -} - -#newHeader .topMenu { - background: none repeat scroll 0% 0% #F1F1F1; - height: 39px; - padding: 0px 25px; -} - -#newHeader .topMenu .menus { - background: url("../../images/menu-line.png") no-repeat scroll right center transparent; - float: left; - height: 40px; - position: relative; -} - -#newHeader .topMenu .menus .t { - display: block; - line-height: 20px; - padding: 10px 0px; - position: relative; -} - -#newHeader .topMenu .menus li { - background: url("../../images/menu-line.png") no-repeat scroll 0px center transparent; - float: left; - position: relative; -} - -#newHeader .topMenu .menus li.current { - -} - -#newHeader .topMenu .menus .noBg { - background: none repeat scroll 0% 0% transparent; -} - -#newHeader .topMenu .menus a { - color: #666666; - font-size: 14px; - font-weight: bold; - padding: 0px 30px; -} - -#newHeader .topMenu .menus a:hover { - text-decoration: none; -} - -#newHeader .topMenu .menus li.current .t a, #newHeader .topMenu .menus li.current .t a:visited, #newHeader .topMenu .menus li.current .t a:hover { - color: #FF6000; -} - -#newHeader .topMenu .flyout { - display: none; - left: 0px; - position: absolute; - top: 4px; - width: 210px; -} - -#newHeader .topMenu .flyoutWide { - width: 300px ! important; -} - -#newHeader .topMenu .lv2, #newHeader .topMenu .lv3 { - left: 208px; - top: 0px; -} - -#newHeader .topMenu .lv3Wide { - left: 298px ! important; -} - -#newHeader .topMenu .flyout .h { - border-bottom: 0px none; - display: inline-block; - position: relative; - z-index: 1; -} - -#newHeader .topMenu .flyout ul { - margin-right: 2px; - position: relative; -} - -#newHeader .topMenu .lv2 ul, #newHeader .topMenu .lv3 ul { - -} - -#newHeader .topMenu .flyout li { - background: none repeat scroll 0% 0% transparent; - border-bottom: 1px solid #FF6000; - border-left: 1px solid #FF8B03; - float: none; - padding: 0px; - z-index: 2; -} - -#newHeader .topMenu .flyout li:last-child { - border-bottom: medium none; -} - -#newHeader .topMenu .flyout a { - background-color: #FF8B03; - color: #FFFFFF; - display: block; - font-size: 12px; - height: 34px; - line-height: 34px; - padding: 0px 16px; - position: relative; -} - -#newHeader .topMenu .flyout a.first { - border-top: 0px none; -} - -#newHeader .topMenu .flyout a.last { - border-bottom: 0px none; -} - -#newHeader .topMenu .flyout .h a { - font-size: 14px; - line-height: 32px; - padding: 0px 29px; -} - -#newHeader .topMenu .flyout .liIcons a { - padding-left: 42px; -} - -#newHeader .topMenu .flyout .liIcons .icon { - background: url("../../images/menu-sprites.png") no-repeat scroll 0px 0px transparent; - height: 24px; - left: 10px; - position: absolute; - top: 5px; - width: 25px; -} - -#newHeader .topMenu .flyout .liIcons .costsI { - background-position: 0px -138px; -} - -#newHeader .topMenu .flyout .liIcons .pipelineI { - background-position: 0px -172px; -} - -#newHeader .topMenu .flyout .liIcons .proMetricsI { - background-position: 0px -206px; -} - -#newHeader .topMenu .flyout .liIcons .parMetricsI { - background-position: 0px -240px; -} - -#newHeader .topMenu .flyout .liIcons .issMetricsI { - background-position: 0px -274px; -} - -#newHeader .topMenu .flyout .liIcons .profileI { - background-position: 0px -308px; -} - -#newHeader .topMenu .flyout .liIcons .notifyI { - background-position: 0px -342px; -} - -#newHeader .topMenu .flyout .liIcons .groupsI { - background-position: 0px -376px; -} - -#newHeader .topMenu .flyout .liIcons .overviewI { - background-position: 0px -36px; -} - -#newHeader .topMenu .flyout .liIcons .gameI { - background-position: 0px -70px; -} - -#newHeader .topMenu .flyout .liIcons .settinsI { - background-position: 0px -104px; -} - -#newHeader .topMenu .flyout .liIcons .feeI { - background-position: 0px -410px; -} - -#newHeader .topMenu .flyout .liIcons .vmI { - background-position: 0px -444px; -} - -#newHeader .topMenu .flyout .liIcons .feedbackI { - background-position: 0px -478px; -} - -#newHeader .topMenu .flyout .liIcons .badgesI { - background-position: 0px -512px; -} - -#newHeader .topMenu .flyout .liIcons .scorecardI { - background-position: 0px -546px; -} - -#newHeader .topMenu .flyout .liIcons .costAnal { - background-position: 0px -578px; -} - -#newHeader .topMenu .flyout .liIcons .syncUser { - background-position: 0px -612px; -} - -#newHeader .topMenu .flyout .liIcons .permissions { - background-position: 0px -646px; -} - -#newHeader .topMenu .flyout li a:hover, #newHeader .topMenu .flyout .trigger.on, #newHeader .topMenu .flyout .on .triggerlv2 { - background-color: #FF6000; -} - -#newHeader .topMenu .flyout .arrow { - background: url("../../images/menu-sprites.png") no-repeat scroll 0px -18px transparent; - height: 8px; - overflow: hidden; - position: absolute; - right: 10px; - top: 13px; - width: 5px; -} - -#newHeader .topMenu .flyout a:hover .arrow, #newHeader .topMenu .flyout .on .trigger .arrow { - background-position: 0px 0px; -} - -#newHeader .topMenu .flyout > ul > .trigger.on > a { - background-color: #FF6000; -} - -#newHeader .topMenu .flyout > ul > .trigger.on > a > .arrow { - background-position: 0px 0px; -} - -#newHeader .topMenu .flyout ul .trigger.on .arrow { - background-position: 0px -18px; -} - -#newHeader .helloUser { - float: right; - font-size: 12px; - margin-top: 8px; -} - -#newHeader .helloUser .instantSearch { - background: none repeat scroll 0% 0% #FFFFFF; - border: 1px solid #C2C2C2; - display: block; - float: left; - height: 21px; - padding: 0px 0px 0px 10px; - position: relative; - width: 306px; -} - -#newHeader .helloUser .instantSearch .instantSearchBg { - display: block; - height: 21px; - padding: 2px 28px 0px 0px; - position: relative; - width: 278px; -} - -#newHeader .helloUser .instantSearch span.searchIcon { - background: url("../../images/instantSearch.png") no-repeat scroll 0px 0px transparent; - display: block; - height: 23px; - padding: 0px; - position: absolute; - right: 0px; - top: 0px; - width: 23px; -} - -#newHeader .helloUser .instantSearch input { - border: 0px none; - color: #999999; - display: block; - float: left; - font-family: "Source Sans Pro","Source Sans Pro",Arial,Helvetica,sans-serif; - font-size: 11px; - height: 18px; - line-height: 16px; - margin: 0px; - padding: 0px; - width: 278px; -} - -#newHeader .helloUser .instantSearch input.focused { - color: #666666; -} - -#newHeader .helloUser UL { - display: block; - float: left; - list-style: none outside none; - padding: 3px 0px 0px 10px; -} - -#newHeader .helloUser LI { - color: #444444; - float: left; - line-height: 20px; - padding: 0px 10px; -} - -#newHeader .helloUser .helloUserLink { - background: url("../../images/menu-line.png") no-repeat scroll 0px center transparent; -} - -#newHeader .helloUser LI strong { - color: #666666; -} - -#newHeader .helloUser LI.helloUserLink A { - color: #666666; - display: inline-block; - text-decoration: none; -} - -#newHeader .helloUser A:hover { - color: #666666; -} - -#newHeader .helloUser A.user { - color: #00AEFF ! important; - font-weight: bold; - padding-left: 0px; -} - -#newHeader .helloUser A.help { - background: url("../../images/help_ico6.png") no-repeat scroll right 0px transparent; - font-weight: bold; - padding-right: 20px; - padding-top: 2px; -} - -#newHeader .helloUser A.help:hover { - background: url("../../images/help_ico6.png") no-repeat scroll right -17px transparent; -} - -#newHeader .midarea { - background: none repeat scroll 0% 0% #FFFFFF; - border-bottom: 1px solid #E0E0E0; - height: 88px; - padding: 0px 25px; -} - -#newHeader h1 { - color: #666666; - font-size: 24px; - font-weight: bold; - line-height: 30px; - padding-left: 18px; - padding-top: 24px; -} - -#newHeader h1 a { - color: #666666; - float: left; -} - -#newHeader h1 a span { - cursor: pointer; - float: left; -} - -#newHeader .mainMenu { - background: none repeat scroll 0% 0% #F1F1F1; - border-bottom: 1px solid #E0E0E0; - height: 42px; - padding: 0px 24px; -} - -#newHeader .mainMenu .menus { - float: left; - font-size: 14px; - font-weight: bold; - height: 40px; -} - -#newHeader .mainMenu .menus li { - float: left; - height: 40px; - line-height: 40px; - list-style: none outside none; - position: relative; -} - -#newHeader .mainMenu .menus li a { - color: #666666; - display: inline-block; - padding: 0px 20px 0px 44px; - position: relative; -} - -#newHeader .mainMenu .menus li a:hover, #newHeader .mainMenu .menus .on a, #newHeader .mainMenu .menus .active a { - border-bottom: 3px solid #FF6000; - text-decoration: none; -} - -#newHeader .mainMenu .menus .active a, #newHeader .mainMenu .menus .active a:hover { - border-bottom: 3px solid #FF6000; -} - -#newHeader .mainMenu .menus .gam { - padding-right: 32px; -} - -#newHeader .mainMenu .menus .arrow { - background: url("../../images/menu-arrow-down.png") no-repeat scroll 0px 0px transparent; - cursor: pointer; - height: 5px; - overflow: hidden; - position: absolute; - right: 20px; - top: 18px; - width: 7px; -} - -#newHeader .mainMenu .menus li .icon { - background: url("../../images/menu-sprites.png") no-repeat scroll -100px 0px transparent; - cursor: pointer; - height: 21px; - left: 20px; - overflow: hidden; - position: absolute; - top: 10px; - width: 19px; -} - -#newHeader .mainMenu .menus .mil .icon { - background-position: -100px -31px; - left: 21px; -} - -#newHeader .mainMenu .menus .gam .icon { - background-position: -100px -62px; -} - -#newHeader .mainMenu .menus .iss .icon { - background-position: -100px -93px; -} - -#newHeader .mainMenu .menus .ass .icon { - background-position: -100px -124px; -} - -#newHeader .mainMenu .menus .tas .icon { - background-position: -100px -155px; -} - -#newHeader .mainMenu .menus .vm .icon { - background-position: -100px -186px; -} - -#newHeader .mainMenu .flyout { - -moz-border-bottom-colors: none; - -moz-border-left-colors: none; - -moz-border-right-colors: none; - -moz-border-top-colors: none; - background: url("../../images/flyout-gray-bg.gif") repeat-x scroll 0px 0px #E8E8E8; - border-color: #E7E7E7 #E7E7E7 -moz-use-text-color; - border-image: none; - border-radius: 2px; - border-style: solid solid none; - border-width: 1px 1px medium; - color: #242424; - display: none; - left: -1px; - line-height: 18px; - position: absolute; - top: 39px; - width: 190px; - z-index: 1000; -} - -#newHeader .mainMenu .flyout .section { - border-bottom: 1px solid #E7E7E7; - border-top: 1px solid #FFFFFF; - padding: 9px; -} - -#newHeader .mainMenu .flyout .section h3 { - font-size: 12px; - font-weight: bold; -} - -#newHeader .mainMenu .flyout .section a { - background: url("../../images/dropdown-icon.png") no-repeat scroll 3px 5px transparent; - border: 0px none; - color: #242424; - float: none; - font-size: 13px; - font-weight: normal; - padding-left: 13px; - text-decoration: underline; -} - -#newHeader .mainMenu .flyout .section a:hover { - background: url("../../images/dropdown-icon.png") no-repeat scroll 3px 5px transparent; - border: 0px none; - text-decoration: none; -} - -#newHeader .midarea2 { - background: none repeat scroll 0% 0% #FFFFFF; - border-bottom: 1px solid #E7E7E7; - height: 87px; - padding: 0px 25px; - position: relative; -} - -#newHeader .logo { - display: inline-block; - left: 27px; - position: absolute; -} - -#newHeader .logo span { - color: #666666; - font-size: 24px; - font-weight: bold; - line-height: 39px; - overflow: hidden; - padding-left: 18px; - padding-top: 24px; -} - -#newHeader .midarea2 .logo span { - padding-top: 15px; -} - -a.newButtonGreen { - display: inline-block; - font-size: 12px !important; - font-family: "Source Sans Pro", Arial, Helvetica, sans-serif !important; - font-weight: bold !important; - overflow: hidden !important; - padding: 0 4px !important; - text-align: center !important; - text-decoration: none !important; - white-space: nowrap !important; - height: 21px !important; - line-height: 21px !important; - background: #81bc01 !important; - border-bottom: 3px solid #5ba801 !important; - border-radius: 4px !important; - behavior: url(/css/PIE.htc) !important; - color: #ffffff !important; - min-width: 50px; -} - -a.newButtonGreen:hover { - border-bottom: 3px solid #81bc01 !important; -} - -a.newButtonGreen span { - background:none !important; - padding-top: 0 !important; -} - -a.newButtonOrange { - display: inline-block !important; - font-size: 12px !important; - font-family: "Source Sans Pro", Arial, Helvetica, sans-serif !important; - font-weight: bold !important; - overflow: hidden !important; - padding: 0 4px !important; - text-align: center !important; - text-decoration: none !important; - white-space: nowrap !important; - height: 21px !important; - line-height: 21px !important; - background: #FF8A00 !important; - border-bottom: 3px solid #FF6700 !important; - border-radius: 4px !important; - behavior: url(/css/PIE.htc) !important; - color: #ffffff !important; - min-width: 50px; -} - -a.newButtonOrange:hover { - border-bottom: 3px solid #FF8A00 !important; -} - -a.newButtonOrange span { - background:none !important; - padding-top: 0 !important; -} - -a.newButtonBlue { - display: inline-block !important; - font-size: 12px !important; - font-family: "Source Sans Pro", Arial, Helvetica, sans-serif !important; - font-weight: bold !important; - overflow: hidden !important; - padding: 0 4px !important; - text-align: center !important; - text-decoration: none !important; - white-space: nowrap !important; - height: 21px !important; - line-height: 21px !important; - background: #00AEFF !important; - border-bottom: 3px solid #0096FF !important; - border-radius: 4px !important; - behavior: url(/css/PIE.htc) !important; - color: #ffffff !important; - min-width: 50px; -} - -a.newButtonBlue:hover { - border-bottom: 3px solid #00AEFF !important; -} - -a.newButtonBlue span { - background:none !important; - padding-top: 0 !important; -} - -#area2 { - padding-left: 30px; - width: 271px; - position: relative; - z-index: 2; -} - -.newSidebarCollapse #area2 { - width: 50px; -} - -#area1 { - padding-left: 35px; - padding-right: 301px; -} - -.newSidebarCollapse #area1 { - padding-right: 80px; -} - - -#mainContent { - background: url("../../images/sidebar-bg.gif") #fff repeat-y right center; -} - -#mainContent.newSidebarCollapse { - background-image: url("../../images/sidebar-bg-collapse.gif") -} - -.newSidebar { - position: relative; -} - - -.newSidebar .topBtns a.copilot { - background-image: url(/images/copilot-icon-new.png); - width: 79px; -} - -.newSidebar .topBtns a.copilot:hover { - background-image: url(/images/copilot-icon-new-hover.png); -} - -.newSidebar .topBtns a.start { - background-image: url(/images/start-project-icon-new.png); - width: 79px; -} - -.newSidebar .topBtns a.start:hover { - background-image: url(/images/start-project-icon-new-hover.png); -} - -.newSidebar .topBtns a.launch { - background-image: url(/images/launch-contest-icon-new.png); - width: 79px; -} - -.newSidebar .topBtns a.launch:hover { - background-image: url(/images/launch-contest-icon-new-hover.png); - color: #fff; -} - -.newSidebar .topBtns { - background: none; - background: #e7e7e7; - padding: 12px 0 10px 10px; -} -.newSidebarCollapse .topBtns{ - background: #f1f1f1; - -} - -.newSidebar .switchBtn { - background: url(../../images/sidebar-sprites.png) repeat 0 -94px; - position: absolute; - height: 37px; - width: 40px; - left: -38px; - top: 9px; -} - - - -.newSidebar .switchBtn:hover { - background-position: 0 -141px; -} - -.newSidebarCollapse .switchBtn { - background-position: 0px -790px; -} - -.newSidebarCollapse .switchBtn:hover { - background-position: 0px -837px; -} - -.newSidebarCollapse .topBtns { - border-bottom: 0; - padding: 12px 0 8px 7px; -} - -.newSidebarCollapse .topBtns a.copilot, -.newSidebarCollapse .topBtns a.start, -.newSidebarCollapse .topBtns a.launch { - background: url(../../images/sidebar-sprites.png) no-repeat 0 -188px; - height: 36px; - width: 36px; - overflow: hidden; - padding-top: 0; - margin-bottom: 7px; -} - -.newSidebarCollapse .topBtns a.copilot:hover { - background-image: url(../../images/sidebar-sprites.png); - background-position: 0 -233px; -} - -.newSidebarCollapse .topBtns a.start { - background-position: 0 -278px; -} - -.newSidebarCollapse .topBtns a.start:hover { - background-image: url(../../images/sidebar-sprites.png); - background-position: 0 -323px; -} - -.newSidebarCollapse .topBtns a.launch { - background-position: 0 -368px; -} - -.newSidebarCollapse .topBtns a.launch:hover { - background-image: url(../../images/sidebar-sprites.png); - background-position: 0 -413px; -} - -.newSidebar .sideBoxes { - background: #f1f1f1; - padding: 9px 10px; -} - -.newSidebarCollapse .sideBoxes { - display: none; -} - -.newSidebarCollapse .sideBoxes, .newSidebarCollapse .contestList, .newSidebarCollapse .archiveLink { - display: none; -} - -.newSidebar .sideBox { - background:#fff; - border:1px solid #c2c2c2; - font-size: 11px; - position: relative; - margin-bottom: 11px; -} - - -.newSidebar .sideBox .icon { - background: url(../../images/sidebar-sprites.png) no-repeat 0 0; - position: absolute; - overflow: hidden; -} - -.newSidebar .sideBox .toggle { - height: 21px; - width: 21px; - right: 10px; - top: 7px; - background: url(../../images/sidebar-sprites.png) no-repeat 0 -458px; - position: absolute; - overflow: hidden; -} - -.newSidebar .sideBox.collapse .toggle { - background-position: 0 -520px; -} - -.newSidebar .sideBox .alert { - background-position: 0 -582px; -} - -.newSidebar .sideBox .tasks { - background-position: 0 -614px; -} - -.newSidebar .sideBox .notify { - background-position: 0 -646px; -} - -.newSidebar .sideBox .stalled { - background-position: 0 -678px; -} - -.newSidebar .sideBox .date { - background-position: 0 -706px; -} - -.newSidebar .sideBox .posts { - background-position: 0 -734px; -} - -.newSidebar .sideBox .dot { - background-position: 0 -762px; -} - -.newSidebar .sideBox dt { - position: relative; - height: 37px; - background: #f1f1f1; - border-bottom:1px solid #c2c2c2; - font-size: 14px; - color: #232323; - line-height: 36px; - font-weight: bold; - padding: 0 38px; - cursor: pointer; -} - -.newSidebar .sideBox.collapse dt { - background-position: 0 -122px; -} - -.newSidebar .sideBox dt .icon { - height: 22px; - width: 22px; - left: 10px; - top: 7px; -} - -.newSidebar .sideBox dd { - position: relative; - padding: 13px 15px 12px 38px; - line-height: 15px; - border-top: 1px solid #d2d2d2; -} - -.newSidebar .sideBox.collapse dd { - display: none; -} - -.newSidebar .sideBox .multiLine { - padding: 5px 15px 5px 38px; -} - -.newSidebar .sideBox .first { - border-top: 0; -} - -.newSidebar .sideBox .even { - background: #fff; -} - -.newSidebar .sideBox dd .icon { - height: 18px; - width: 18px; - left: 12px; - top: 11px; -} - -.newSidebar .sideBox dd a { - font-weight: bold; - color: #fe8f0b; - text-decoration: none; -} - -.newSidebar .sideBox dd a:hover { - text-decoration: underline; -} - -.newSidebar .topBtns a { - margin-right: 8px; - padding-top: 27px; - height: 18px; - line-height: 16px; - color: #fff; - text-indent: -999999px; -} - -.newSidebar .topBtns a:hover { - color: #fff; -} - - -input[type=text], textarea, select { - font-size: 12px !important; - font-family: "Source Sans Pro", Arial, Helvetica, sans-serif !important; -} - -.ui-widget { - font-family: "Source Sans Pro", Arial, Helvetica, sans-serif !important; -} - -.ui-widget-content { - border: 1px solid #ededed !important; -} - -.ui-dialog { - padding: 0 !important; -} diff --git a/src/web/css/scorecard/launchcontest.css b/src/web/css/scorecard/launchcontest.css deleted file mode 100644 index 0e8ec0562..000000000 --- a/src/web/css/scorecard/launchcontest.css +++ /dev/null @@ -1,1996 +0,0 @@ -@charset "utf-8"; - -#launchContestOut h2 { - font-family: Arial,Helvetica,sans-serif; - font-size: 14px; - line-height: 36px; - padding-top: 18px; -} - -#launchContestOut .intro { - color: #999999; - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - line-height: 14px; -} - -#launchContestOut .lcc { - color: #333333; - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - padding-right: 5px; - vertical-align: baseline; -} - -#launchContestOut .lcc_chk { - display: inline; - float: left; - height: 28px; - padding-left: 24px; - padding-top: 5px; - width: 120px; -} - -#launchContestOut .hide { - display: none; -} - -#launchContestOut .tabOut { - padding-top: 10px; - text-align: left; -} - -#launchContestOut .tabOut ul { - margin: 0px; - padding: 0px; - position: absolute; - width: auto; -} - -#launchContestOut .tabOut li { - cursor: pointer; - list-style: none outside none; - margin: 0px; - padding: 0px; -} - -#launchContestOut .tabOut li a { - font-family: Arial,Helvetica,sans-serif; - text-align: center; -} - -#launchContestOut .tabOut li.top { - height: 34px; -} - -#launchContestOut .tabOut li.bottom { - height: 33px; -} - -#launchContestOut .tabOut li.top a { - background: url("../../../images/tabTop.gif") no-repeat scroll 0% 0% transparent; - color: #000000; - display: block; - font-size: 12px; - font-weight: bold; - height: 34px; - line-height: 34px; - text-decoration: none; - width: 106px; -} - -#launchContestOut .tabOut li.bottom a { - background: url("../../../images/tabBottom.gif") no-repeat scroll 0% 0% transparent; - color: #000000; - display: block; - font-size: 12px; - font-weight: bold; - height: 33px; - line-height: 33px; - text-decoration: none; - width: 106px; -} - -#launchContestOut .tabOut li.top a.current { - background: url("../../../images/tabTop_current.gif") no-repeat scroll 0% 0% transparent; - color: #FFFFFE; - font-size: 14px; - width: 111px; -} - -#launchContestOut .tabOut li.bottom a.current { - background: url("../../../images/tabBottom_current.gif") no-repeat scroll 0% 0% transparent; - color: #FFFFFE; - font-size: 14px; - width: 111px; -} - -#launchContestOut .tabContest { - -moz-border-bottom-colors: none; - -moz-border-left-colors: none; - -moz-border-right-colors: none; - -moz-border-top-colors: none; - border-color: #BDBDBD #BDBDBD #BDBDBD -moz-use-text-color; - border-image: none; - border-style: solid solid solid none; - border-width: 1px 1px 1px 0px; - height: 65px; - position: relative; -} - -#launchContestOut .tabContest1 { - border: medium none; - height: 35px; -} - -#launchContestOut .selectX { - height: 28px; - padding-top: 10px; -} - -#launchContestOut .tabContest .tr { - background: url("../../../images/launchContest_corcen_tr.gif") no-repeat scroll 0% 0% transparent; - height: 4px; - position: absolute; - right: -1px; - top: -1px; - width: 4px; -} - -#launchContestOut .tabContest .br { - background: url("../../../images/launchContest_corcen_br.gif") no-repeat scroll 0% 0% transparent; - bottom: -1px; - height: 4px; - position: absolute; - right: -1px; - width: 4px; -} - -#launchContestOut .selectDesign, #launchContestOut .selectSoftware { - background: url("../../../images/launchContest_tabOut_tab.gif") no-repeat scroll 0px 0px transparent; - height: 100%; - margin-top: -1px; - overflow: visible; - padding-left: 29px; - padding-top: 9px; - position: absolute; - width: 100%; -} - -#launchContestOut .selectDesign1 { - background: none repeat scroll 0% 0% transparent; - padding-left: 0px; -} - -#launchContestOut .selectDesign .selectOut, #launchContestOut .selectSoftware .selectOut { - display: inline; - float: left; - margin-right: 10px; - width: auto; -} - -#launchContestOut .selectDesign .help, #launchContestOut .selectSoftware .help { - background: url("../../../images/iconI.png") no-repeat scroll left center transparent; - float: right; - font-size: 11px; - height: 28px; - padding-left: 34px; - padding-right: 10px; - width: 108px; -} - -#launchContestOut .selectDesign .new_style { - font-weight: bold; -} - -#launchContestOut .selectDesign .moreLink, #launchContestOut .selectSoftware .moreLink { - background: url("../../../images/moreLink_icon.gif") no-repeat scroll left center transparent; - font-size: 11px; - height: 28px; - line-height: 28px; - padding-left: 10px; - text-decoration: none; -} - -#launchContestOut .selectDesign .moreLink:hover, #launchContestOut .selectSoftware .moreLink:hover { - text-decoration: underline; -} - -#launchContestOut .addNewContest { - border: 1px solid #BDBDBD; - height: 154px; - margin-top: 34px; -} - -#launchContestOut .addNewContest .row { - height: 28px; - margin-top: 17px; -} - -#launchContestOut .addNewContest label { - display: inline; - float: left; - font-family: Geneva,Arial,Helvetica,sans-serif; - font-size: 14px; - line-height: 28px; - margin-left: 14px; - width: 118px; -} - -#launchContestOut .addNewContest .projectSelect { - height: 28px; -} - -#launchContestOut .addNewContest .text { - background: url("../../../images/addNew_input.gif") no-repeat scroll 0% 0% transparent; - border: 0px none; - height: 25px; - line-height: 25px; - padding: 0px 5px; - width: 494px; -} - -#launchContestOut .addNewContest .projectSelect .text { - background: url("../../../images/tabContest_input.gif") no-repeat scroll 0% 0% transparent; - border: 0px none; - height: 25px; - line-height: 25px; - padding: 0px 5px; - width: 362px; -} - -#launchContestOut .addNewContest .projectSelect, #launchContestOut .addNewContest .billingSelect { - display: inline; - float: left; - margin-right: 26px; - width: auto; -} - -#launchContestOut .addNewContest .button6 { - display: inline; - float: left; - margin-top: 1px; - width: auto; -} - -#launchContestOut .addNewContest .button6 span.left { - display: inline; - float: left; - width: auto; -} - -#launchContestOut .addNewContest .button6 span.right { - display: inline; - float: left; - padding: 4px 21px 0px 24px; - width: auto; -} - -#area1 .paymentMethod { - -} - -#area1 .paymentMethod .paymentColumn { - float: left; - width: 480px; -} - -#area1 .paymentMethod .paymentColumn h3 { - margin-top: 20px; -} - -#area1 .paymentMethod .paypalColumn { - background: url("../../../images/horizontal_solution_PPeCheck_tc.png") no-repeat scroll left top transparent; - float: right; - height: 60px; - width: 200px; -} - -#area1 .paymentMethod .message { - clear: left; -} - -#launchContestOut.paymentMethod .buttonBox { - clear: left; - float: right; - margin: 0px 20px 24px 50px; -} - -#launchContestOut.paymentMethod .buttonBox .contiune, #launchContestOut.paymentMethod .buttonBox .draft, .paymentMethod .buttonBox .preview { - margin-left: 10px; - margin-right: 3px; -} - -#launchContestOut.paymentMethod .supRow { - bottom: 10px; - display: inline; - float: right; - font: 13px normal; - height: 1px; - position: relative; - right: 15px; - z-index: 400; -} - -#launchContestOut.paymentMethod .row { - border: 1px solid transparent; -} - -#launchContestOut.paymentMethod label { - float: left; - font-family: Geneva,Arial,Helvetica,sans-serif; - font-size: 14px; - line-height: 28px; - margin-left: 0px; - margin-top: 3px; - width: 140px; -} - -#launchContestOut.paymentMethod .text { - background: url("../../../images/paymentMethod_input.gif") no-repeat scroll 0% 0% transparent; - border: 0px none; - height: 25px; - line-height: 25px; - margin-top: 6px; - padding: 0px 0px 0px 5px; - width: 324px; -} - -#launchContestOut.paymentMethod .text.medium { - background: url("../../../images/paymentMethod_input_medium.gif") no-repeat scroll 0% 0% transparent; - width: 160px; -} - -#launchContestOut.paymentMethod .text.small { - background: url("../../../images/paymentMethod_input_small.gif") no-repeat scroll 0% 0% transparent; - width: 65px; -} - -#launchContestOut.paymentMethod .redTip { - color: red; - font: 14px bold; - text-decoration: none; -} - -#launchContestOut.paymentMethod .row { - clear: left; -} - -span.starNotice { - display: block; - float: left; - height: 28px; - width: 1px; -} - -.cardSelect { - float: left; - width: 335px; -} - -.selectMonth { - float: left; - width: 65px; -} - -.selectYear { - float: left; - margin-left: 5px; - width: 250px; -} - -.cardSelect .newListSelected, .selectMonth .newListSelected, .selectYear .newListSelected { - border: 0px none; - color: #333333; - cursor: pointer; - float: left; - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - height: 28px; - line-height: 28px; - padding: 0px 5px; -} - -.cardSelect .newListSelected { - background: url("../../../images/cardSelect_select.gif") no-repeat scroll 0% 0% transparent; - width: 324px; -} - -.selectMonth .newListSelected { - background: url("../../../images/selectMonth_select.gif") no-repeat scroll 0% 0% transparent; - width: 48px; -} - -.selectYear .newListSelected { - background: url("../../../images/selectYear_select.gif") no-repeat scroll 0% 0% transparent; - width: 70px; -} - -.cardSelect .selectedTxt { - width: 321px; -} - -.selectMonth .selectedTxt { - width: 48px; -} - -.selectYear .selectedTxt { - width: 70px; -} - -.cardSelect .newList, .selectMonth .newList, .selectYear .newList { - background: none repeat scroll 0% 0% #FFFFFF; - border: 1px solid #CCCCCC; - margin-top: -3px ! important; - position: absolute ! important; - z-index: 600; -} - -.cardSelect .newList { - width: 324px ! important; -} - -.selectMonth .newList { - width: 48px ! important; -} - -.selectYear .newList { - width: 70px ! important; -} - -#launchContestOut.paymentMethod .rowElem { - display: inline; - float: left; - font-size: 20px; - height: 25px; - margin: 3px 5px 0px 0px; - text-align: center; - width: 1px; -} - -#launchContestOut h2.sectionHead { - font-size: 20px; -} - -#launchContestOut .orderReview .overviewBox { - border: 0px none; -} - -#launchContestOut .orderReview .overviewData th { - text-align: left; - width: 160px; -} - -#launchContestOut .orderReview .overviewData td { - font-weight: bold; -} - -#launchContestOut.orderReview .buttonBox { - clear: left; - float: right; - margin: 0px 20px 24px 50px; -} - -#launchContestOut.orderReview .buttonBox .contiune, #launchContestOut.orderReview .buttonBox .draft, .paymentMethod .buttonBox .preview { - margin-left: 10px; - margin-right: 3px; -} - -#launchContestOut.orderReview .message { - clear: right; -} - -#launchContestOut .contestDetails .sectionHead { - padding: 10px 0px 0px; -} - -#launchContestOut .contestDetails h3 { - margin-top: 15px; -} - -.prizesTable { - border-spacing: 0px; - border: 1px solid #C1C1C1; - width: 100%; -} - -.prizesTable tbody { - margin: 0px; - padding: 0px; -} - -.prizesTable td { - font-size: 14px; - font-weight: bold; - text-align: center; - width: auto; -} - -.prizesTable td.large { - padding-left: 20px; - text-align: left; - width: auto; -} - -.prizesTable td.last { - background: url("../../../images/table_last_cell_background.gif") repeat-x scroll 0% 0% transparent; - font-size: 20px; - height: 57px; - margin: 0px; - padding: 0px; - width: 90px; -} - -hr.dualDivider { - -moz-border-bottom-colors: none; - -moz-border-left-colors: none; - -moz-border-right-colors: none; - -moz-border-top-colors: none; - border-color: #CCCCCC -moz-use-text-color; - border-image: none; - border-left: 0px none; - border-right: 0px none; - border-style: solid none; - border-width: 1px 0px; - height: 3px; - margin: 15px 5px; -} - -table.total { - border: 0px none; - margin: 10px 0px 0px; - width: 100%; -} - -table.total td { - font-size: 20px; - font-weight: bold; -} - -table.total td.toLeft { - text-align: left; -} - -table.total td.toRight { - padding-right: 10px; - text-align: right; -} - -.paymentNumBox { - float: right; - font-size: 16px; - font-weight: bold; - position: relative; - top: 27px; -} - -.redAlert { - color: red; - display: block; - font-family: Arial,Helvetica,sans-serif; - font-size: 18px; - font-weight: bold; - line-height: 36px; - padding-top: 5px; -} - -.message .rbContainer { - -} - -.message .rbContainer .redButton { - float: right; - margin: 5px 10px 15px 25px; -} - -#launchContestOut h3 { - font-size: 14px; - height: 26px; - margin-bottom: 2px; - margin-top: 34px; -} - -#launchContestOut h3 span.icon { - display: inline; - float: left; - width: auto; -} - -#launchContestOut .schedule { - border: 1px solid #BDBDBD; - height: 165px; -} - -#launchContestOut .schedule1 { - border: medium none; -} - -#launchContestOut .schedule .row { - height: 22px; - margin-top: 16px; -} - -#launchContestOut .schedule .selectrow { - height: 28px; - margin-top: 12px; -} - -#launchContestOut .schedule label { - display: inline; - float: left; - font-family: Tahoma,Arial,Helvetica,sans-serif; - font-size: 14px; - line-height: 28px; - margin-left: 14px; - width: 118px; -} - -#launchContestOut .schedule .name_label { - color: #3B3B3B; - display: inline; - float: left; - font-family: Arial,Helvetica,sans-serif; - font-size: 14px; - line-height: 28px; - margin-left: 14px; - width: 118px; -} - -#launchContestOut .schedule .startSelect, #launchContestOut .schedule .milestoneSelect, #launchContestOut .schedule .endSelect { - display: inline; - float: left; - margin-right: 7px; - width: auto; -} - -#launchContestOut .schedule .text { - background: url("../../../images/date_input.gif") no-repeat scroll 0% 0% transparent; - border: 0px none; - color: #6C6C6C; - display: inline; - float: left; - height: 22px; - line-height: 22px; - padding: 0px 5px; - width: 80px; -} - -#launchContestOut .schedule .startEtSelect, #launchContestOut .schedule .checkpointEtSelect, #launchContestOut .schedule .endEtSelect { - display: inline; - float: left; - margin-right: 4px; - width: auto; -} - -#launchContestOut .schedule span { - color: #6C6C6C; - font-size: 12px; -} - -#launchContestOut .bottomButton { - height: 24px; - margin-top: 18px; -} - -#launchContestOut .bottomButton .conditions { - color: #FF0000; - display: inline; - float: left; - font-size: 14px; - line-height: 28px; - width: auto; -} - -.upload { - padding: 10px 0px; -} - -.upload .uploadInner { - height: 25px; -} - -.upload .uploadInput { - border: 1px solid #A8ABAD; - color: #C4C4C4; - display: inline; - float: left; - height: 17px; - padding: 3px 5px; - width: 230px; -} - -.upload .uploadInner .fileIn { - height: 25px; - position: absolute; - width: 72px; -} - -.upload .button6 { - background: url("../../../images/grey_button_bg.gif") repeat-x scroll center top transparent; - display: inline; - float: left; - margin-right: 14px; - width: auto; -} - -.upload a.button6 span.left { - background: url("../../../images/grey_button_left.gif") no-repeat scroll left top transparent; - display: inline; - float: left; - padding: 0px; - width: auto; -} - -.upload a.button6:hover span.left { - background: url("../../../images/grey_button_left.gif") no-repeat scroll left bottom transparent; -} - -.upload a.button6 span.right { - background: url("../../../images/grey_button_right.gif") no-repeat scroll right top transparent; - display: inline; - float: left; - height: 20px; - padding: 4px 13px 0px 10px; - width: auto; -} - -.upload a.button6:hover span.right { - background: url("../../../images/grey_button_right.gif") no-repeat scroll right bottom transparent; -} - -.upload .fileInput { - border: 1px solid #A8ABAD; - color: #C4C4C4; - display: inline; - float: left; - height: 17px; - padding: 3px 5px; - width: 272px; -} - -.upload .removeButton { - background: url("../../../images/removeButton.gif") no-repeat scroll 0% 0% transparent; - display: inline; - float: left; - height: 21px; - margin-left: 7px; - margin-top: 2px; - width: 22px; -} - -.upload .removeButton:hover { - background: url("../../../images/removeButton_hover.gif") no-repeat scroll 0% 0% transparent; -} - -.upload .addButton { - background: url("../../../images/addButton.gif") no-repeat scroll 0% 0% transparent; - display: inline; - float: left; - height: 21px; - margin-left: 7px; - margin-top: 2px; - width: 22px; -} - -.upload .addButton:hover { - background: url("../../../images/addButton_hover.gif") no-repeat scroll 0% 0% transparent; -} - -.removeButton { - background: url("../../../images/removeButton.gif") no-repeat scroll 0% 0% transparent; - display: inline; - float: left; - height: 21px; - margin-left: 15px; - margin-top: 10px; - width: 22px; -} - -.removeButton:hover { - background: url("../../../images/removeButton_hover.gif") no-repeat scroll 0% 0% transparent; -} - -.addButton { - background: url("../../../images/addButton.gif") no-repeat scroll 0% 0% transparent; - display: inline; - float: left; - height: 21px; - margin-left: 10px; - margin-top: 10px; - width: 22px; -} - -.addButton:hover { - background: url("../../../images/addButton_hover.gif") no-repeat scroll 0% 0% transparent; -} - -#button_tech { - float: left; - height: 90px; - margin-left: 20px; - margin-right: 20px; - padding-bottom: 20px; - padding-left: 15px; - padding-top: 40px; - width: 45px; -} - -#add { - cursor: pointer; -} - -#remove { - cursor: pointer; -} - -#add_categories { - cursor: pointer; -} - -#remove_categories { - cursor: pointer; -} - -.head_font { - color: #333333; - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - font-weight: bold; -} - -.head_font_space { - color: #333333; - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - font-weight: bold; - padding-left: 260px; -} - -.head_font_space_categories { - color: #333333; - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - font-weight: bold; - padding-left: 275px; -} - -#select1, #select1_categories { - float: left; - height: 150px; - overflow: scroll; - width: 285px; -} - -#select2, #select2_categories { - float: left; - height: 150px; - overflow: scroll; - width: 285px; -} - -.prizesInner { - border: 1px solid #C1C1C1; - height: 28px; - padding: 5px 0px; -} - -.prizesInner1 { - border: medium none; - padding: 0px; -} - -.prizesInner_software { - height: 180px; - padding: 5px; -} - -.prizesInner_tech { - height: 180px; - padding: 5px; -} - -.mid_info { - margin-left: 7px; -} - -.last_info { - float: right; - padding-top: 3px; -} - -.head { - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; -} - -.radio_font { - color: #666666; - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - font-weight: bold; -} - -.place { - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - font-weight: bold; -} - -.details { - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - font-weight: bold; - padding-left: 20px; - padding-top: 25px; -} - -IMG.new_cur { - cursor: pointer; -} - -.place_info { - padding-left: 200px; -} - -.place_par { - margin-top: 10px; -} - -.prizesInner_software .placeInput { - border: 1px solid #A8ABAD; - color: #C4C4C4; - display: inline; - height: 17px; - margin-left: 5px; - padding: 3px 5px; - text-align: right; - width: 150px; -} - -.space_radio { - margin-left: 20px; -} - -.extra_info { - background-color: #DDDDDD; - height: 120px; - margin-top: 10px; -} - -.prizesInner label { - color: #6C6C6C; - display: inline; - float: left; - font-family: Tahoma,Arial,Helvetica,sans-serif; - font-size: 12px; - font-weight: bold; - line-height: 22px; - margin-top: 4px; - width: auto; -} - -.prizesInner label.first { - margin-left: 12px; -} - -.prizesInner label.second, .prizesInner label.third { - margin-left: 60px; -} - -.prizesInner .numberDor { - color: #6C6C6C; - display: inline; - float: left; - font-family: Tahoma,Arial,Helvetica,sans-serif; - font-size: 16px; - font-weight: normal; - line-height: 22px; - margin-top: 4px; - width: auto; -} - -.prizesInner .dw { - color: #6C6C6C; - display: inline; - float: left; - font-family: Tahoma,Arial,Helvetica,sans-serif; - font-size: 12px; - line-height: 22px; - margin-left: 18px; - margin-right: 4px; - margin-top: 4px; - width: auto; -} - -.prizesInner .prizesInput { - background: url("../../../images/prizesInput.gif") no-repeat scroll 0% 0% transparent; - border: 0px none; - color: #6C6C6C; - display: inline; - float: left; - font-weight: bold; - height: 16px; - margin-top: 4px; - padding: 3px 9px; - text-align: right; - width: 46px; -} - -.prizesInner .addButton { - background: url("../../../images/addButton.gif") no-repeat scroll 0% 0% transparent; - display: inline; - float: left; - height: 21px; - margin-left: 77px; - width: 22px; -} - -.prizesInner .addButton:hover { - background: url("../../../images/addButton_hover.gif") no-repeat scroll 0% 0% transparent; -} - -.prizesInner .removeButton { - background: url("../../../images/removeButton.gif") no-repeat scroll 0% 0% transparent; - display: inline; - float: left; - height: 21px; - margin-left: 77px; - width: 22px; -} - -.prizesInner .removeButton:hover { - background: url("../../../images/removeButton_hover.gif") no-repeat scroll 0% 0% transparent; -} - -.mPrizesInner { - border: 1px solid #C1C1C1; - height: 28px; - padding: 5px 0px; -} - -.mPrizesInner label { - color: #6C6C6C; - display: inline; - float: left; - font-family: Tahoma,Arial,Helvetica,sans-serif; - font-size: 12px; - font-weight: bold; - line-height: 28px; - width: auto; -} - -.mPrizesInner .numberDor { - color: #6C6C6C; - display: inline; - float: left; - font-family: Tahoma,Arial,Helvetica,sans-serif; - font-size: 16px; - font-weight: normal; - line-height: 28px; - width: auto; -} - -.mPrizesInner label.first { - margin-left: 22px; -} - -.mPrizesInner .dw { - color: #6C6C6C; - display: inline; - float: left; - font-family: Tahoma,Arial,Helvetica,sans-serif; - font-size: 12px; - line-height: 28px; - margin-left: 18px; - margin-right: 12px; - width: auto; -} - -.mPrizesInner .prizesInput { - background: url("../../../images/prizesInput.gif") no-repeat scroll 0% 0% transparent; - border: 0px none; - color: #6C6C6C; - display: inline; - float: left; - font-weight: bold; - height: 16px; - margin-top: 3px; - padding: 3px 9px; - text-align: right; - width: 46px; -} - -.mPrizesInner strong { - color: #6C6C6C; - display: inline; - float: left; - font-family: Tahoma,Arial,Helvetica,sans-serif; - font-size: 12px; - line-height: 28px; - margin-left: 13px; - margin-right: 16px; - width: auto; -} - -A.link { - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; -} - -.deliverablesInner { - border: 1px solid #C1C1C1; - padding: 5px 0px; -} - -.deliverablesInner1 { - border: medium none; -} - -.deliverablesInner .checkInput { - display: inline; - float: left; - margin-top: 4px; - width: auto; -} - -.deliverablesInner label { - color: #6C6C6C; - font-size: 12px; - padding-left: 2px; - padding-right: 50px; -} - -.deliverablesInner .text { - background: url("../../../images/prizesInput.gif") no-repeat scroll 0% 0% transparent; - border: 0px none; - color: #6C6C6C; - font-weight: bold; - height: 16px; - margin-right: 30px; - padding: 3px 9px; - width: 46px; -} - -.deliverablesInner .fileType { - background: url("../../../images/addButton.gif") no-repeat scroll left center transparent; - color: #AB0000; - display: inline; - float: left; - font-size: 12px; - height: 22px; - line-height: 22px; - margin-top: 4px; - padding-left: 28px; - text-decoration: underline; - width: auto; -} - -.deliverablesInner .fileType:hover { - background: url("../../../images/addButton_hover.gif") no-repeat scroll left center transparent; - text-decoration: none; -} - -.buttonBox { - padding-top: 24px; -} - -a.contiune { - margin-left: 10px; - margin-right: 0px; -} - -a.contiune span.left { - display: inline; - float: left; - width: auto; -} - -a.contiune span.right { - display: inline; - float: left; - padding: 4px 22px 0px 18px; - width: auto; -} - -a.draft, a.preview { - background: url("../../../images/grey_button_bg.gif") repeat-x scroll left top transparent; - margin-right: 24px; -} - -.tabHead a.draft, .tabHead a.draft { - margin-right: 12px; - margin-top: 6px; -} - -a.draft:hover, a.preview:hover { - background: url("../../../images/grey_button_bg.gif") repeat-x scroll left bottom transparent; -} - -a.draft span.left, a.preview span.left { - background: url("../../../images/grey_button_left.gif") no-repeat scroll left top transparent; - display: inline; - float: left; - width: auto; -} - -a.draft:hover span.left, a.preview:hover span.left { - background: url("../../../images/grey_button_left.gif") no-repeat scroll left bottom transparent; -} - -.tabHead a.draft span.right, .tabHead a.preview span.right { - padding: 4px 15px 0px; -} - -a.draft span.right, a.preview span.right { - background: url("../../../images/grey_button_right.gif") no-repeat scroll right top transparent; - display: inline; - float: left; - padding: 4px 19px 0px 15px; - width: auto; -} - -a.draft:hover span.right, a.preview:hover span.right { - background: url("../../../images/grey_button_right.gif") no-repeat scroll right bottom transparent; -} - -#launchContestOut .contestDetail h3 { - margin-top: 18px; -} - -#launchContestOut .helpIcon { - background: url("../../../images/help_ico4.gif") no-repeat scroll 0% 0% transparent; - display: inline; - float: left; - height: 15px; - margin-left: 6px; - width: 16px; -} - -#launchContestOut .helpIcon:hover { - background: url("../../../images/help_ico4.gif") no-repeat scroll left bottom transparent; -} - -#launchContestOut .contestDetail .prizes .catalogSelect { - display: block; - float: left; - margin: 10px 0px; - width: 100%; -} - -#launchContestOut .contestDetail .prizes .catalogSelect label { - display: block; - float: left; - font-family: Geneva,Arial,Helvetica,sans-serif; - font-size: 14px; - font-weight: bold; - line-height: 28px; - margin-left: 3px; -} - -#launchContestOut .contestDetail .prizes .catalogSelect .newListSelected { - display: block; - float: left; - height: 28px; - margin-left: 10px; -} - -#launchContestOut .contestDetail .textarea { - border: 1px solid #C4C4C4; - height: 250px; - padding-left: 10px; -} - -#launchContestOut .contestDetail .textarea1 { - border: 1px solid #C4C4C4; - height: 150px; - padding-left: 10px; -} - -#launchContestOut .editor { - background-color: #DDDDDD; - border: 1px solid #666666; - color: #333333; - float: right; - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - padding: 3px 10px; -} - -#launchContestOut .editor A { - padding-left: 5px; -} - -#launchContestOut .contestDetail .textarea textarea { - border: 0px none; - color: #333333; - font-size: 14px; - height: 239px; - padding: 5px 0px; - width: 100%; -} - -#launchContestOut .contestDetail .textarea1 textarea { - border: 0px none; - color: #333333; - font-size: 14px; - height: 130px; - padding: 5px 0px; - width: 100%; -} - -#launchContestOut .contestDetail .bottomTextarea { - background: url("../../../images/textarea_bottom_bg.gif") repeat-x scroll 0% 0% transparent; - border: 1px solid #DDDDDD; - height: 22px; - position: relative; -} - -#launchContestOut .contestDetail .bottomTextarea p { - color: #494949; - font-size: 13px; - line-height: 22px; - margin-left: 10px; -} - -#launchContestOut .contestDetail .bottomTextarea .icon { - background: url("../../../images/textarea_bottom.gif") no-repeat scroll 0% 0% transparent; - bottom: 1px; - height: 11px; - overflow: hidden; - position: absolute; - right: 1px; - width: 11px; -} - -.tabHead { - height: 34px; - margin-top: 25px; - position: relative; -} - -.tabHead.head { - background-color: #F5F5F5; - height: 36px; - margin-top: 10px; -} - -.tabHead ul { - margin-left: 0px; -} - -.tabHead li { - color: #333333; - display: inline; - float: left; - font-size: 12px; - font-weight: 400; - height: 34px; - line-height: 34px; - list-style-type: none; - padding-left: 30px; - width: 250px; -} - -.tabHead li.current { - background: url("../../../images/tabTop_current.gif") no-repeat scroll 0px 0px transparent; - color: #FFFFFE; - font-size: 14px; - font-weight: 700; - width: 111px; -} - -.tabHead .tr { - background: url("../../../images/tabHead-tr.gif") no-repeat scroll 0% 0% transparent; - height: 34px; - position: absolute; - right: 0px; - top: 0px; - width: 4px; -} - -.tabHead .tl { - background: url("../../../images/tabHead-tl.gif") no-repeat scroll 0% 0% transparent; - height: 34px; - left: 0px; - position: absolute; - top: 0px; - width: 4px; -} - -.tabHead .tr2 { - height: 36px; - position: absolute; - right: 0px; - top: 0px; - width: 4px; -} - -.tabHead .tl2 { - height: 36px; - left: 0px; - position: absolute; - top: 0px; - width: 4px; -} - -.tabHead a.button6 span.right { - padding-left: 15px; - padding-right: 15px; -} - -.tabHead a { - margin-right: 5px; - margin-top: 6px; -} - -.tabHead.head .group { - float: left; - font-weight: bold; - height: 16px; - margin-left: 5px; - margin-top: 9px; - padding-left: 22px; - text-decoration: none; -} - -.tabHead.head .expand { - background: url("../../../images/notification_expand_ico.png") no-repeat scroll left center transparent; - text-decoration: none; -} - -.tabHead.head .collapse { - background: url("../../../images/minimize.png") no-repeat scroll 0% 0% transparent; -} - -.tabHead .editButton { - background: url("../../../images/editButton.gif") no-repeat scroll 0px 0px transparent; - color: #FFFFFE; - float: right; - font-size: 12px; - font-weight: 700; - height: 24px; - line-height: 24px; - margin: 5px 10px 0px 0px; - text-align: center; - text-decoration: none; - width: 57px; -} - -.tabHead .editButton:hover { - background: url("../../../images/editButton.gif") no-repeat scroll 0px -24px transparent; -} - -.overviewBox { - border: 1px solid #CCCCCC; - padding: 10px 0px; -} - -.overviewData { - font-size: 14px; - line-height: 35px; - text-align: left; -} - -.overviewData th { - font-weight: 400; - text-align: right; - width: 110px; -} - -.overviewData td { - color: #333333; - font-family: Geneva,Arial,Helvetica,sans-serif; - font-size: 14px; - padding-left: 15px; -} - -.overviewData td img { - vertical-align: middle; -} - -.contentList { - margin: 10px 0px; -} - -.contentList dt { - font-size: 12px; - font-weight: bold; - line-height: 18px; -} - -.contentList dd { - font-family: Geneva,Arial,Helvetica,sans-serif; - font-size: 14px; - line-height: 20px; - margin-bottom: 20px; - margin-left: 0px; -} - -.contentList dd img { - vertical-align: middle; -} - -.cbox { - border: 1px solid #CCCCCC; - margin-bottom: 15px; - padding: 12px 17px 12px 12px; -} - -#cboxFiles { - height: 48px; - padding-right: 0px; -} - -#cboxFiles .tipLink, .deliverablesInner .tipLink, .mPrizesInner .tipLink, .prizesInner .tipLink { - display: inline; - float: right; - margin-right: 12px; - margin-top: 18px; - width: auto; -} - -.deliverablesInner .tipLink, .mPrizesInner .tipLink, .prizesInner .tipLink { - margin-top: 6px; -} - -#cboxFiles dl { - display: inline; - float: left; - width: 90%; -} - -#cboxFiles dt, #cboxFiles dd { - display: inline; - float: left; - font-size: 14px; - line-height: 24px; - margin-left: 0px; - text-align: left; - width: 45%; -} - -.buttonBox .launchContest { - float: right; - width: 150px; -} - -.saveButton a { - background: url("../../../images/saveButton.gif") no-repeat scroll 0px 0px transparent; - color: #FFFFFE; - float: right; - font-size: 12px; - font-weight: 700; - height: 24px; - line-height: 24px; - margin-right: 20px; - text-align: center; - text-decoration: none; - width: 116px; -} - -.saveButton a:hover { - background: url("../../../images/saveButton.gif") no-repeat scroll 0px -24px transparent; -} - -.tipLink { - margin-left: 8px; -} - -.roundelect { - display: inline; - float: left; - width: auto; -} - -.tabContest .visibility { - visibility: hidden; -} - -.tabContest .newListSelected, .projectSelect .newListSelected { - background: url("../../../images/tabContest_select.gif") no-repeat scroll 0% 0% transparent; - border: 0px none; - color: #333333; - cursor: pointer; - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - height: 28px; - line-height: 28px; - padding: 0px 5px; - width: 362px; -} - -.tabContest .selectedTxt, .projectSelect .selectedTxt { - width: 359px; -} - -.tabContest .newList, .projectSelect .newList { - background: none repeat scroll 0% 0% #FFFFFF; - border: 1px solid #CCCCCC; - position: absolute ! important; - width: 370px ! important; - z-index: 999 ! important; -} - -div.newListSelected ul.newList a { - text-decoration: none; -} - -.billingSelect .newListSelected, .roundelect .newListSelected { - background: url("../../../images/billing_select.gif") no-repeat scroll 0% 0% transparent; - border: 0px none; - color: #333333; - cursor: pointer; - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - height: 28px; - line-height: 28px; - padding: 0px 5px; - width: 283px; -} - -.roundelect .newListSelected { - color: #6C6C6C; - font-family: Tahoma,Arial,Helvetica,sans-serif; -} - -.billingSelect .selectedTxt, .roundelect .selectedTxt { - width: 281px; -} - -.billingSelect .newList, .roundelect .newList { - background: none repeat scroll 0% 0% #FFFFFF; - border: 1px solid #CCCCCC; - position: absolute; - width: 290px; - z-index: 999 ! important; -} - -.roundelect .newList { - overflow: hidden; -} - -.startSelect .newListSelected, .milestoneSelect .newListSelected, .endSelect .newListSelected { - background: url("../../../images/startSelect.gif") no-repeat scroll 0% 0% transparent; - border: 0px none; - color: #6C6C6C; - cursor: pointer; - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - height: 22px; - line-height: 22px; - padding: 0px 5px; - width: 196px; -} - -.startSelect .selectedTxt, .milestoneSelect .selectedTxt, .endSelect .selectedTxt { - width: 196px; -} - -.startSelect .newList, .milestoneSelect .newList, .endSelect .newList { - background: none repeat scroll 0% 0% #FFFFFF; - border: 1px solid #CCCCCC; - margin-top: -3px; - position: absolute; - width: 203px; -} - -.startEtSelect .newListSelected, .checkpointEtSelect .newListSelected, .endEtSelect .newListSelected { - background: url("../../../images/timeSelect.gif") no-repeat scroll 0% 0% transparent; - border: 0px none; - color: #6C6C6C; - cursor: pointer; - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - height: 22px; - line-height: 22px; - padding: 0px 5px; - position: relative; - width: 49px; - z-index: 100 ! important; -} - -.startEtSelect .selectedTxt, .checkpointEtSelect .selectedTxt, .endEtSelect .selectedTxt { - width: 49px; -} - -.startEtSelect .newList, .checkpointEtSelect .newList, .endEtSelect .newList { - background: none repeat scroll 0% 0% #FFFFFF; - border: 1px solid #CCCCCC; - margin-top: -3px; - position: absolute; - width: 56px; -} - -.numSelect { - display: inline; - float: left; - width: auto; -} - -.numSelect .newListSelected { - background: url("../../../images/numSelect.gif") no-repeat scroll 0% 0% transparent; - border: 0px none; - color: #545B66; - cursor: pointer; - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - height: 28px; - line-height: 22px; - padding: 0px 5px; - width: 52px; -} - -.numSelect .selectedTxt { - font-family: Tahoma,Arial,Helvetica,sans-serif; - font-weight: bold; - line-height: 28px; - text-indent: 19px; - width: 52px; -} - -.numSelect .newList { - background: none repeat scroll 0% 0% #FFFFFF; - border: 1px solid #CCCCCC; - color: #6C6C6C; - list-style: none outside none; - margin-top: -3px; - position: absolute; - width: 59px; -} - -.numSelect .newList li { - color: #6C6C6C; - font-family: Tahoma,Arial,Helvetica,sans-serif; - font-weight: bold; - text-indent: 19px; -} - -.catalogSelect .newListSelected { - background: url("../../../images/tabCatalog_select.gif") no-repeat scroll 0% 0% transparent; - border: 0px none; - color: #333333; - cursor: pointer; - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - height: 28px; - line-height: 28px; - padding: 0px 5px; - width: 300px; -} - -.catalogSelect .selectedTxt { - width: 298px; -} - -.catalogSelect .newList { - background: none repeat scroll 0% 0% #FFFFFF; - border: 1px solid #CCCCCC; - margin-top: -3px ! important; - position: absolute ! important; - width: 298px ! important; -} - -.newList li { - height: 22px; - line-height: 22px; - overflow: hidden; - text-align: left; - text-indent: 5px; - width: 100%; -} - -.newList li.current { - background: none repeat scroll 0% 0% #EEEEEE; -} - -.newListHover { - background: none repeat scroll 0% 0% #CCCCCC; -} - -a.dp-choose-date { - background: url("../../../images/date_icon.gif") no-repeat scroll 0% 0% transparent; - display: inline; - float: left; - height: 19px; - margin-left: 6px; - margin-right: 22px; - margin-top: 1px; - overflow: hidden; - text-indent: -2000px; - width: 21px; -} - -.dp-choose-date { - display: none; -} - -table.jCalendar { - background: none repeat scroll 0% 0% #EDEDED; -} - -table.jCalendar th { - color: #2F3338; - font-family: "Arial Rounded MT Bold"; - padding: 8px 3px; -} - -table.jCalendar td { - background: none repeat scroll 0% 0% #DFE1E3; - border: 1px solid #BDC2C5; - color: #333333; - font-family: "Arial Rounded MT Bold"; - font-weight: bold; - padding: 6px; - text-align: center; -} - -table.jCalendar tr td.other-month { - background: none repeat scroll 0% 0% #DFE1E3; - color: #BDC2C5; -} - -table.jCalendar td.today { - background: none repeat scroll 0% 0% #4C92D8; - color: #FFFFFF; - font-weight: bold; -} - -table.jCalendar td.selected { - background: none repeat scroll 0% 0% #FF6666; - color: #FFFFFF; -} - -table.jCalendar td.selected.dp-hover { - background: none repeat scroll 0% 0% #CCCCCC; - color: #000000; -} - -table.jCalendar td.dp-hover, table.jCalendar tr.activeWeekHover td { - background: none repeat scroll 0% 0% #CCCCCC; - color: #FFFFFF; -} - -table.jCalendar tr.selectedWeek td { - background: none repeat scroll 0% 0% #FF6666; - color: #FFFFFF; -} - -table.jCalendar td.disabled, table.jCalendar td.disabled.dp-hover { - background: none repeat scroll 0% 0% #DFE1E3; - color: #888888; -} - -table.jCalendar td.unselectable, table.jCalendar td.unselectable:hover, table.jCalendar td.unselectable.dp-hover { - background: none repeat scroll 0% 0% #CCCCCC; - color: #000000; -} - -div.dp-popup { - background: none repeat scroll 0% 0% #EDEDED; - border: 1px solid #333333; - font-family: arial,sans-serif; - font-size: 10px; - line-height: 1.2em; - padding: 1px; - position: relative; -} - -div#dp-popup { - position: absolute; - z-index: 199; -} - -div.dp-popup h2 { - font-size: 12px; - margin: 4px 0px; - padding: 0px; - text-align: center; -} - -a#dp-close { - display: block; - font-size: 11px; - padding: 4px 0px; - text-align: center; -} - -a#dp-close:hover { - text-decoration: underline; -} - -div.dp-popup a { - color: #000000; - padding: 3px 2px 0px; - text-decoration: none; -} - -div.dp-popup div.dp-nav-prev { - left: 4px; - position: absolute; - top: 2px; - width: 100px; -} - -div.dp-popup div.dp-nav-prev a { - display: inline; - float: left; - width: auto; -} - -div.dp-popup div.dp-nav-prev a, div.dp-popup div.dp-nav-next a { - cursor: pointer; -} - -div.dp-popup div.dp-nav-prev a.disabled, div.dp-popup div.dp-nav-next a.disabled { - cursor: default; -} - -div.dp-popup div.dp-nav-next { - position: absolute; - right: 4px; - top: 2px; - width: 100px; -} - -div.dp-popup div.dp-nav-next a { - display: inline; - float: right; - width: auto; -} - -div.dp-popup a.disabled { - color: #AAAAAA; - cursor: default; -} - -div.dp-popup td { - cursor: pointer; -} - -div.dp-popup td.disabled { - cursor: default; -} - -.dp-nav-prev-year, .dp-nav-next-year { - display: none; -} - -.date .text { - display: inline; - float: left; - width: auto; -} - -#placeHolder { - font-size: 36px; - font-weight: bold; - line-height: 350px; - text-align: center; -} - -.clear { - clear: both; - height: 1px; - overflow: hidden; - width: 1px; -} - -.selectDesign .newList { - background: url("../../../images/list_vert_line.gif") no-repeat scroll 184px 0px white; -} - -.selectDesign li.newListOptionTitle { - display: block; - float: left; - font-weight: bold; - width: 185px; -} - -.selectDesign .newListOptionTitle li { - font-weight: normal; - width: 185px; -} - -.selectDesign .moreLink { - float: left; -} diff --git a/src/web/css/scorecard/modal.css b/src/web/css/scorecard/modal.css deleted file mode 100644 index 16a973c85..000000000 --- a/src/web/css/scorecard/modal.css +++ /dev/null @@ -1,307 +0,0 @@ -*{padding: 0; margin: 0;} -#TB_window { - font: 12px Arial, Helvetica, sans-serif; - color: #333333; -} - -#TB_secondLine { - font: 10px Arial, Helvetica, sans-serif; - color:#666666; -} - - -/* ----------------------------------------------------------------------------------------------------------------*/ -/* ---------->>> modal settings <<<-----------------------------------------------------------------------------*/ -/* ----------------------------------------------------------------------------------------------------------------*/ -#TB_overlay { - position:absolute; - z-index:100; - top: 0px; - left: 0px; - height:100%; - width:100%; - display:none; -} - -.TB_overlayMacFFBGHack {background: url(macFFBgHack.png) repeat;} -.TB_overlayBG { - background:#000000; -} - -* html #TB_overlay { /* ie6 hack */ - position: absolute; -} - -#TB_window { - width:830px; - height:424px !important; - position:absolute; - background: #ffffff; - z-index: 102; - color:#000000; - display:none; - top:0; - left:0; - border: 1px solid #000; - text-align:left; - overflow:hidden; -} - -* html #TB_window { /* ie6 hack */ -position: absolute; -} - -#TB_window img#TB_Image { - display:block; - margin: 15px 0 0 15px; - border-right: 1px solid #ccc; - border-bottom: 1px solid #ccc; - border-top: 1px solid #666; - border-left: 1px solid #666; -} - -#TB_caption{ - height:25px; - padding:7px 30px 10px 25px; - float:left; -} - -#TB_closeWindow{ - height:25px; - padding:11px 25px 10px 0; - float:right; -} - -#TB_closeAjaxWindow{ - padding:7px 10px 5px 0; - margin-bottom:1px; - text-align:right; - float:right; -} - -#TB_ajaxWindowTitle{ - float:left; - padding:7px 0 5px 10px; - margin-bottom:1px; -} - -#TB_title{ - background-color:#e8e8e8; - height:27px; -} - -#TB_ajaxContent{ - height:395px; - clear:both; - padding:2px 15px 0 15px; - overflow:auto; - text-align:left; - line-height:1.4em; -} - -#TB_ajaxContent.TB_modal{ - padding:15px; -} - -#TB_ajaxContent p{ - padding:5px 0px 5px 0px; -} - -#TB_load{ - position: fixed; - display:none; - height:13px; - width:208px; - z-index:103; - top: 50%; - left: 50%; - margin: -6px 0 0 -104px; /* -height/2 0 0 -width/2 */ -} - -* html #TB_load { /* ie6 hack */ -position: absolute; -} - -#TB_HideSelect{ - z-index:99; - position:fixed; - top: 0; - left: 0; - background-color:#fff; - border:none; - height:100%; - width:100%; -} - -* html #TB_HideSelect { /* ie6 hack */ - position: absolute; -} - -#TB_iframeContent{ - clear:both; - border:none; - margin-bottom:-1px; - margin-top:1px; -} - -/* OVERRIDE! */ -#TB_window_custom { - position:absolute; - z-index: 102; - color:#000000; - display:none; - top:0; - left:0; - overflow:hidden; - background-color: inherit; -} - -* html #TB_window_custom { /* ie6 hack */ -position: absolute; -} - .specrev-window { - width:360px !important; - height:211px !important; - border: none !important; - background: transparent url(../../../images/specplan_window.gif) no-repeat top left !important; - text-align:center !important; - position:absolute; - overflow:hidden; - } - .specrev-window a { - display: block; - margin: auto; - width: 191px; - height: 25px; - } - .specrev-window a.review-now { background: url(../../../images/specplan_btn_now.gif) no-repeat top left; } - .specrev-window a.review-later { background: url(../../../images/specplan_btn_l8r.gif) no-repeat top left; } - .specrev-window a:hover { - background-position: 0 -25px; - } - .specrev-window h1 { - font-size: 19px !important; - margin: 25px 0 20px 0; - } - .specrev-window p { - font-size: 12px; - color: #747474; - } - .specrev-window p.or { - margin: 10px 0; - } - .specrev-window p.note { - margin: 5px 0 0 0; - } - -/* add Manually window*/ -.addWindow.ui-dialog-content.ui-widget-content{ - margin: 0; - padding: 0; -} - .addWindow.ui-dialog-content.ui-widget-content .header{ - height: 42px; - background-color: #f0f0f0; - border-bottom: #ededed 1px solid; - } - .addWindow.ui-dialog-content.ui-widget-content .header p.title{ - padding: 0; - margin: 0 20px; - font-size: 16px; - color:#333; - line-height: 42px; - } - .addWindow.ui-dialog-content.ui-widget-content .body{ - padding: 20px; - color: #333; - font-size: 11px; - } - #addMatch.addWindow.ui-dialog-content.ui-widget-content .body{ - padding: 0 0 0 20px; - } - #addMatch.addWindow.ui-dialog-content.ui-widget-content .body .card{ - margin-right: 0px; - } - .addWindow.ui-dialog-content.ui-widget-content .body textarea{ - width: 400px; - padding: 0 3px; - font-family: Arial; - margin: 5px 0; - padding: 0 3px; - } - #addManually.addWindow .body textarea.question{height:30px;} - #addManually.addWindow .body textarea.guideline, - #addReq.addWindow .body textarea.guideline{height:130px;} - #addManually.addWindow .body label, - #addReq.addWindow .body label{ - display: block; - width: 70px; - float: left; - } - #addManually.addWindow .body p, - #addReq.addWindow .body p{ - line-height: 18px; - } - #addManually.addWindow .body p.higher, - #addReq.addWindow .body p.higher{ - line-height: 25px; - } - #addReq.addWindow .body p.note{ - color: #666; - } - #addScorecard2.addWindow .body select, - #addManually.addWindow .body select, - #addReq.addWindow .body select{ - height: 20px; - font-size: 11px; - color: #333; - } - #addManually.addWindow .body select.medium, - #addReq.addWindow .body select.medium{width:130px;} - #addManually.addWindow .body select.long, - #addReq.addWindow .body select.long{width:338px;} - - .addWindow.ui-dialog-content.ui-widget-content .foot{ - height: 54px; - width: 100%; - border-top: #ededed 1px solid; - } - #addScorecard2.addWindow a.clearBtn, - #addManually.addWindow a.moreQuestions, - #addReq.addWindow a.moreQuestions{ - padding: 15px 10px; - color: #08c; - font-size: 12px; - font-weight: bold; - text-decoration: none; - } - #addReq.addWindow a.moreQuestions{ - padding: 0px; - line-height: 30px; - } - #addScorecard2.addWindow a.clearBtn:hover, - #addManually.addWindow a.moreQuestions:hover, - #addReq.addWindow a.moreQuestions:hover{ - text-decoration: underline; - } - .addWindow.ui-dialog-content.ui-widget-content .foot .buttons{ - margin: 15px 15px 0 0; - padding:0; - float: right; - } -#addScorecard .tabHead a.button6 span.right{ - padding: 4px 27px 0 27px; - margin: 0; - width: 41px; - height: 20px; - border: none; -} -#addScorecard .tabHead a.button6 span.left{ - padding: 0; - margin: 0; - border: none; - height: 24px; - width: 94px; - color: #fff; - background-color: inherit; -} diff --git a/src/web/css/scorecard/permissions.css b/src/web/css/scorecard/permissions.css deleted file mode 100644 index 1ae36f4d0..000000000 --- a/src/web/css/scorecard/permissions.css +++ /dev/null @@ -1,299 +0,0 @@ -/* css for permissions.html */ - -.b{ - font-weight: bold; -} -.permissions{ - border-bottom: 1px solid #A8ABAD; -} -#users{ - display: none; -} -.permissions #tabs3 ul li{ - width:50%; -} -.permissions .container2Content{ - padding:20px 0px 40px 1px; -} - -.permissions table.notifications{ - border-left:0px solid #FFFFFF; -} - -.permissions table tr.subTr td{ - border:0px solid #FFFFFF; - padding:3px 0px 3px 10px; - font-size: 10px; - background: transparent url(../../../images/dot.png) repeat-x scroll bottom center; -} -.permissions table th.permCol{ - width:30%; -} -.permissions table th.permCol2{ - width:8%; -} -.permissions table td.permCol input{ - float:left; - margin-top:2px; - margin-right:5px; -} -.permissions table td.permCol .group{ - float:left; -} -.permissions table td.permCol{ - border-left: 0px solid #FFFFFF; -} - -.permissions table tr.applyForAll a.button1{ - margin-right:10px; -} -.permissions table td a.addUser{ - background: transparent url(../../../images/user.png) no-repeat; - display: block; - height:23px; - width:23px; - margin-left:40%; -} -.permissions table td a.addUser:hover{ - background: transparent url(../../../images/user_active.png) no-repeat; -} - -.permissions table td a.addProject{ - background: transparent url(../../../images/folder.png) no-repeat; - display: block; - height:23px; - width:23px; - margin-left:30%; - float:left; - margin-right:10px; -} -.permissions table td a.addProject:hover{ - background: transparent url(../../../images/folder_active.png) no-repeat; -} -.permissions table td a.removeProject{ - background: transparent url(../../../images/delete1.png) no-repeat; - display: block; - height:23px; - width:23px; - float:left; -} - -.permissions table td a.subgroup{ - text-decoration: none; -} -.permissionsButtons{ - overflow: hidden; - margin-top:20px; -} - -.permissions table.notifications .collapse{ - background: transparent url(../../../images/minimize.png) no-repeat; -} - -/* customized dialog css */ -.ui-dialog { - padding:0px; -} -.ui-widget-overlay{ - background: #000000 none repeat scroll 0 0; - opacity:0.6; - filter:alpha(opacity=60); -} -.ui-dialog .ui-dialog-titlebar{ - display: none; -} -.ui-dialog .header{ - height:27px; - background-color:#E8E8E8; - overflow: hidden; -} -.ui-dialog .header .title{ - float:left; - font-size: 12px; - font-weight: bold; - margin-top:5px; - margin-left:20px; -} -.ui-dialog .content{ - margin: 0 20px 0 20px; -} -.ui-dialog .areaHeader.topSpace{ - margin-top: 20px; - margin-bottom: 10px; - margin-left: 20px; -} -.ui-dialog .areaHeader.bottomSpace{ - margin-top: 10px; - margin-bottom: 20px; - margin-left: 20px; -} -.ui-dialog .areaHeader .leftAlign{ - float:left; -} -.ui-dialog .areaHeader .expandCollapse a.button6{ - font-weight: bold; - color: #fff; - background-color: inherit; -} -.ui-dialog .areaHeader .expandCollapse span.borderPipe{ - color: #333; - font-size: 11px; - font-weight: normal; -} - .ui-dialog .project.scorecard.view{ - margin-bottom: 10px; - } -.ui-dialog .body{ - overflow: hidden; -} -.ui-dialog .body .left,.ui-dialog .body .middle,.ui-dialog .body .right{ - float:left; - margin-left:20px; - margin-top:20px; -} -.ui-dialog .body .left,.ui-dialog .body .right{ - border:1px solid #CCCCCC; - width:220px; - height:300px; -} -.ui-dialog .body .middle{ - margin-top:150px; -} -.ui-dialog .body .middle a{ - display: block; - *margin-bottom: 10px; -} - - -.ui-dialog .body .list{ - overflow: auto; - height:220px; - border-top:1px solid #CCCCCC; -} - -.ui-dialog .body .list .listItem{ - padding: 3px 0px 3px 10px; - margin:1px 0px ; - font-size: 11px; - background: transparent url(../../../images/dot.png) repeat-x scroll bottom center; - cursor: pointer; -} - -.ui-dialog .body .list .listItem.active{ - background-color: #CCCCCC; -} - -.ui-dialog .body .subtitle{ - background: transparent url(../../../images/calendar_header.png) repeat-x scroll 0 0; - height:33px; - font-size: 11px; -} -.ui-dialog .body .subtitle a.leftTxt{ - display:block; - font-weight: bold; - color:#FFFFFF; - text-decoration: none; - float:left; - margin-top:10px; - margin-left:10px; - background-color: inherit; -} -.ui-dialog .body .subtitle a.rightTxt{ - display:block; - color:#CCCCCC; - text-decoration: none; - float:right; - margin-top:10px; - margin-right:5px; - background-color: inherit; -} -.ui-dialog .body .searchBox { - padding:10px 0px 10px 10px; - overflow: hidden; -} -.ui-dialog .body .searchBox a.button1{ - display: block; -} -.ui-dialog .body .searchBox .searchTxt{ - float:left; - margin-right:10px; -} -.ui-dialog .body .searchBox .searchTxt input{ - width: 110px; - height:20px; - font-size: 11px; -} -.ui-dialog .foot .buttons{ - padding-left:150px; -} -.ui-dialog .foot .buttons a.button6{ - color:#FFFFFF; - text-align: center; - background-color: inherit; -} - -.ui-dialog a.dialogClose{ - background: transparent url(../../../images/close_ico.png) no-repeat scroll 0 0; - height:15px; - width:15px; - display: block; - margin-top:5px; - margin-right:10px; - float:right; -} -#addUserDialog,#manageUserDialog,#addProjectDialog{ - padding:0px; -} - - -.pagination-info{ - margin:0px 20px; -} - -.display-perpage .selectedTxt{ - width:32px; - padding-left:5px; -} -.display-perpage .newList{ - width:40px !important; - border:#ccc solid 1px; - background:#fff; - position:absolute !important; - z-index: 999 !important; - text-align: center; -} - -.display-perpage .newList a{ - text-decoration: none; -} -.display-perpage .newList{ - overflow: hidden scroll!important; - overflow-y: scroll !important; -} -.display-perpage .newListSelected { - background:transparent url(../../../images/pagination-select.png) no-repeat scroll 0 0; - border:0 none; - color:#333333; - cursor:pointer; - font-family:Arial,Helvetica,sans-serif; - font-size:11px; - height:17px; - line-height:15px; - padding:0 5px; - float:left; -} -.display-perpage .label{ - padding-top:2px; -} - -.separator{ - border-bottom:1px solid #CCCCCC; - height:10px; - margin-bottom:20px; - margin-top:10px; - width:100%; -} -#notificationSetting .pagination{ - width:250px; -} - diff --git a/src/web/css/scorecard/screen.css b/src/web/css/scorecard/screen.css deleted file mode 100644 index 1bc39362a..000000000 --- a/src/web/css/scorecard/screen.css +++ /dev/null @@ -1,1479 +0,0 @@ -/* This file will contain css used in both the index and the other pages */ - -/* Remove Firefox button outline */ -a:hover, a:active, a:focus, a:active{ - outline: none; - /*-moz-outline-style: none; */ -} -:focus {outline: none;} -.clear{ - clear:both; - } -/**/ - -/***new_updates**/ -.status{ - font-family:Arial, Helvetica, sans-serif; - font-weight:bold; - font-size:16px; - color:#F00; - padding-left:10px; -} -.reviewer_text{ - font-family:Arial, Helvetica, sans-serif; - font-weight:bold; - font-size:0.9em; - color: #000; - float: right; - padding-right:10px; -} -.reviewer_handle_text{ - font-family:Arial, Helvetica, sans-serif; - font-weight:bold; - font-size:0.9em; - color:#666; - float: right; - padding-right:10px; -} - -.edit_type{ - float:right; - padding-right:5px; -} - -.edit_prize{ - - float:right; - padding-right:5px; -} - -.edit_round{ - - float:right; - padding-right:5px; -} - -.edit_spec{ - - float:right; - padding-right:5px; -} - -.edit_files{ - - float:right; - padding-right:5px; -} - -.sr_question_showdetail { - float:right; - margin-top: 6px; - padding-right:10px; -} - -.sr_addcomment { - float:right; - padding: 5px; - padding-right: 10px; -} - -.sr_editcomment { - float:right; - margin-top: 5px; - margin-right: -5px; -} - -.det_font{ - font-size:14px; - font-family:Arial, Helvetica, sans-serif; - color:#3B3B3B; -} - -.det_font_tab{ - font-size:12px; - font-family:Arial, Helvetica, sans-serif; - color:#3B3B3B; -} - -.srquestion_detail_font{ - font-size:0.8em; - font-family:Arial, Helvetica, sans-serif; - color:#3B3B3B; - margin-bottom: 8px; -} - .srquestion_detail_font .index{ - padding-left: 40px; - padding-right: 30px; - float:left; - font-weight: bold; - } - .srquestion_detail_font .option{ - } - - -.small_info{ - padding-left:125px; - font-size:12px; - font-weight:bold; -} - -.small_info_spec{ - - font-size:12px; - -} -.small_info_spec_last{ - - font-size:12px; - - -} - -.bottom_spec{ - height:20px; - margin-bottom:10px; - border-bottom:#999 solid 1px; - width:100%; -} -.mylist{ - font-size:12px; - margin-top:10px; - margin-bottom:10px; - margin-left:15px; -} -.name{ - - padding-right:20px; - float:left; - -} -.gray_name{ - - padding-right:20px; - float:left; - color:#666; - font-size:12px; - -} -.name2{ - - padding-right:15px; - -} -.bigin{ - width:370px; - height:25px; -} -.contest_type{ - margin-top:10px; -} - -.left_align{ - float:left; - color:#000; - font-size:12px; -} - -.contest_type_edit{ - border:#F00 solid 1px; - /*margin-top:10px;*/ -} - -.contest_files{ - /*margin-top:10px;*/ -} - - -.contest_files_edit{ - border:#F00 solid 1px; - /*margin-top:10px;*/ -} - -.contest_prize{ - /*margin-top:10px;*/ -} - - -.contest_prize_edit{ - border:#F00 solid 1px; - /*margin-top:10px;*/ -} - -.contest_round{ - /*margin-top:10px;*/ -} - -.contest_spec{ - /*margin-top:10px;*/ -} - -.contest_round_edit{ - border:#F00 solid 1px; - /*margin-top:10px;*/ -} - -.contest_spec_edit{ - border:#F00 solid 1px; - /*margin-top:10px;*/ -} - -.spec_review_question{ - margin-top:10px; -} - -.spec_review_odd_question{ - margin-top:10px; - padding-bottom: 10px; - background-color:#F5F5F5; -} - -.add_comment{ - height:10px; - padding-top:10px; -} -.add_comment a img{ - border:none; - float:right; -} -.add_comment a{ - font-size:12px; - font-weight:bold; - font-family:Verdana, Geneva, sans-serif; -} -.add_comment_cancel_text{ - color:#616161; - text-decoration:underline; - padding-left:10px; - margin-right: 12px; - float:right; -} - -.save{ - height:10px; - padding-top:10px; -} -.save a img{ - border:none; - float:right; -} - -.save a{ - font-size:12px; - font-weight:bold; - font-family:Verdana, Geneva, sans-serif; -} -.cancel_text{ - color:#616161; - text-decoration:underline; - padding-left:10px; - float:right; - -} - -.cancel_text_prize{ - color:#616161; - text-decoration:underline; - padding-left:10px; - float:right; - -} -.cancel_text_round{ - color:#616161; - text-decoration:underline; - padding-left:10px; - float:right; - -} - -.cancel_text_spec{ - color:#616161; - text-decoration:underline; - padding-left:10px; - float:right; - -} - -.cancel_text_files{ - color:#616161; - text-decoration:underline; - padding-left:10px; - float:right; - -} - - -#resubmit{ - text-align:center; - margin-top:20px; -} - -.deleteImg{ - margin-left:10px; - padding-top:5px; -} - -A.delete{ - color:#F00; - margin-left:5px; - font-size:13px; -} - -#resubmit .bottom_text{ - font-family:Verdana, Geneva, sans-serif; - font-size:12px; - color:#999; - background-color: inherit; -} - -.ip{ - float:left; - background-color:#009; - width:100px; - height:50px; -} - -.op{ - float:left; - background-color:#999; - width:100px; - height:50px; -} - -.first_tab{ - width:250px; -} -.first_tab_prize{ - width:350px; -} - -.sec_tab{ - width:70px; -} - -.sec_tab_prize{ - width:180px; -} -.sec_tab_files{ - width:480px; -} - -/*new updates end*/ -.details .caption{ /* help popup titles */ - background: url(../../../images/title_bg.png) repeat-x; -} - - -.no_details .caption_det_type{ /* help popup titles */ - /*background: url(../../../images/title_bg.png) repeat-x;*/ - - background-color:#F5F5F5; - - } - - .no_details .caption_det_prize{ /* help popup titles */ - /*background: url(../../../images/title_bg.png) repeat-x;*/ - - background-color:#F5F5F5; - - } - .no_details .caption_det_files{ /* help popup titles */ - /*background: url(../../../images/title_bg.png) repeat-x;*/ - - background-color:#F5F5F5; - - } - - .no_details .caption_det_round{ /* help popup titles */ - /*background: url(../../../images/title_bg.png) repeat-x;*/ - - - - } - .no_details .caption_det_spec{ /* help popup titles */ - /*background: url(../../../images/title_bg.png) repeat-x;*/ - - } - - .details .caption .captionLeft{ - background: url(../../../images/title_left.png) no-repeat left; - } - - .details .caption .captionRight{ - background: url(../../../images/title_right.png) no-repeat right; - } - .details .caption .captionInner{ - height: 35px; - } - .no_details .caption .captionInner{ - height: 35px; - } - - .no_details .caption_det_type .captionInner{ - height: 35px; - } - .no_details .caption_det_prize .captionInner{ - height: 35px; - } - .no_details .caption_det_type_edit .captionInner{ - height: 35px; - } - .no_details .caption_det_prize_edit .captionInner{ - height: 35px; - } - .no_details .caption_det_round .captionInner{ - height: 35px; - } - .no_details .caption_det_round_edit .captionInner{ - height: 35px; - } - - .no_details .caption_det_spec .captionInner{ - height: 35px; - } - .no_details .caption_det_spec_edit .captionInner{ - height: 35px; - } - - .no_details .caption_det_files .captionInner{ - height: 35px; - } - .no_details .caption_det_files_edit .captionInner{ - height: 35px; - } - - .details .caption .captionInner H2{ - margin: 0; - padding: 0; - font-family: Verdana, Geneva, sans-serif; - font-size: 14px; - padding-top: 8px; - padding-left:10px; - - } - - .no_details .caption_det_type .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - } - - .no_details .caption_det_prize .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - - } - .no_details .caption_det_round .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - - } - .no_details .caption_det_spec .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - - } - .no_details .caption_det_files .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - - } - .no_details .caption_det_type_edit .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - - } - .no_details .caption_det_prize_edit .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - - } - - .no_details .caption_det_round_edit .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - - } - .no_details .caption_det_spec_edit .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - - } - .no_details .caption_det_files_edit .captionInner H2{ - margin: 0; - padding: 0; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - padding-top: 8px; - padding-left:10px; - - } - - .no_details .caption_specreview { - padding:10px; - } - .no_details .det_specreview { - padding:10px; - } - .no_details .comment_specreview { - padding:0px 10px 1px 10px; - } - .no_details .comment_specreview .old_comment{ - margin-left: 40px; - margin-right: 12px; - /*height:70px;*/ - padding: 10px 20px 10px 20px; - font-size:0.75em; - background: #ffc; - color: #777; - border:#fc0 solid 1px; - } - .no_details .comment_specreview .old_comment p{ - margin-bottom: 7px; - } - .no_details .comment_specreview .old_comment .text_comment{ - font-size:1em; - font-weight: bold; - color: #444; - margin-bottom: 10px; - } - .no_details .comment_specreview .old_comment span.text_reviewer_handle{ - font-size:1em; - font-weight: bold; - color: #ca0; - } - .no_details .to_add_your_comment { - padding:10px; - padding-bottom:0px; - } - .no_details .add_your_comment { - padding:10px; - padding-bottom: 25px; - } - .no_details .add_your_comment .textarea1{ - height:90px; - margin-left: 40px; - margin-right: 35px; - } - .no_details .add_your_comment .textarea1 textarea{ - width:100%; - height:70px; - padding: 10px; - font-size: 12px; - background: #fff; - color:#999; - border:#c4c4c4 solid 1px; - overflow: hidden; - - } - - .no_details .captionInner{ - padding: 5px 0px 10px 0px; - } - .no_details .captionInner H2 { - margin: 0px; - padding: 0px; - font-family: Arial, Helvetica, sans-serif; - font-size: 0.9em; - font-weight: bold; - } - .no_details .captionInner H2 span { - margin-top: -19px; - margin-left: 35px; - margin-right: 80px; - line-height: 1.3em; - } - .no_details .captionInner H2 span span.normal_text{ - font-weight: normal; - } - .no_details .captionInner H2.red { - color: red; - } - .no_details .captionInner H2 img.icon_status{ - top: 5px; - position: relative; - margin-right: 10px; - } - -/* popups */ - -.deleteUserInner P{ - text-align: center; - padding-bottom: 5px; -} - -.deleteUserInner .button1{ - float: right; - margin: 4px 4px 0 4px; -} - -.popupButtons{ - height: 100%; - overflow: hidden; - padding: 5px 0; -} - -#TB_closeWindowButton{ - width: 15px; - height: 15px; - background: url(../../../images/close_ico.png) no-repeat; - display: block; -} - -/* Help modal window */ - - -.helpPopupInner .caption .captionInner H2{ /* title */ - color: #333; -} - -.helpPopupInner .helpArea{ - padding-bottom: 20px; -} - -.helpPopupInner .logoArea{ - padding: 20px 0; -} - -.popupFooter{ - padding: 20px 0 0 0; - margin: 0 auto; - font-size: 11px; - color: #333; - border-top: 1px solid #bdbdbd; - background-color: #f6f6f6; - text-align: center; -} - -.popupFooter A{ - text-decoration: none; - color: #333 !important; -} - -.popupFooter H2{ - font-family: Verdana, Helvetica, sans-serif; - margin: 0 0 5px 0; - font-size: 12px; - font-weight: normal; -} - -.popupFooter P{ - margin: 0; - font-size: 11px; -} - -/*----------- - BUTTONS --------------*/ - - - -A.button1{ - float: left; - background: transparent url(../../../images/button_left.png) no-repeat left; - font-size: 12px; - font-weight: bold; - color: #362f2d; - text-decoration: none; -} - - A.button1 SPAN{ - float: left; - background: transparent url(../../../images/button_right.png) no-repeat right; - padding: 5px 10px 2px 10px; - cursor: pointer; - height: 20px; - overflow: hidden; - } - - A.button1:hover{ - color: #000; - } - -A.button2{ - display: block; - background: transparent url(../../../images/button.png) no-repeat top; - width: 253px; - height: 24px; - font-family: Arial, Helvetica, sans-serif; - font-size: 14px; - color: #FFF; - text-decoration: none; - font-weight: bold; - text-align: center; - padding-top: 6px; -} - - A.button2:hover{ - background: transparent url(../../../images/button.png) no-repeat bottom; - } - -A.button3{ - display: block; - text-align: center; - margin: 0 auto; - text-decoration: none; - background: url(../../../images/button2.png) no-repeat top; - width: 232px; - height: 23px; - color: #333333; - font-family: "Myriad pro", Arial, Helvetica, sans-serif; - font-size: 14px; - font-weight: bold; - padding-top: 7px; -} - -A.button3:hover{ - background-position: bottom; -} - -A.button4{ - display: block; - background: transparent url(../../../images/button3.png) no-repeat top; - width: 144px; - height: 18px; - padding-top: 3px; - color: #FFF; - font-size: 11px; - font-weight: bold; - margin: 0 auto; - text-decoration: none; - margin-bottom: 5px; -} - -A.button4:hover{ - background-position: bottom; -} - -A.button5{ - display: block; - background: transparent url(../../../images/button4.png) no-repeat top; - width: 144px; - height: 18px; - padding-top: 3px; - color: #000; - font-size: 11px; - font-weight: bold; - margin: 0 auto; - text-decoration: none; -} - - A.button5.back{ - display: block; - background: transparent url(../../../images/button4b.png) no-repeat top; - width: 151px; - height: 19px; - padding-top: 5px; - padding-left: 27px; - color: #666; - font-size: 11px; - font-weight: bold; - margin: 0 auto; - text-decoration: none; - font-family: Arial; - } - -A.button5:hover, -A.button5.back:hover{ - background-position: bottom; -} - -A.button6, -A.button7, -A.button8, -A.button10{ - float: right; - background: transparent url(../../../images/button5_left.png) no-repeat left top; - font-weight: bold; - font-size: 12px; - font-family: Arial, Helvetica, sans-serif; - color: #FFF; - text-decoration: none; - margin: 0 3px; -} - A.button6.green{ - background-image: url(../../../images/button11_left.png); - } - - A.button6 SPAN, - A.button7 SPAN, - A.button8 SPAN, - A.button10 SPAN{ - display: block; - cursor: pointer; - } - - A.button7 SPAN.right{ - padding: 4px 27px 0 27px; - height: 20px; - } - -A.button7{ - background: url(../../../images/button7_bg.png) repeat-x top; - color: #333; -} - - A.button7 SPAN.left{ - display: block; - background: url(../../../images/button7_left.png) no-repeat left top; - padding: 0; - } - - A.button7 SPAN.right{ - display: block; - background: url(../../../images/button7_right.png) no-repeat right top; - } - -A.button8{ - background: transparent url(../../../images/button8_bg.png) repeat-x top; - color: #FFF !important; -} - - A.button8 SPAN.left{ - background: url(../../../images/button8_left.png) no-repeat left top; - padding: 0; - } - - A.button8 SPAN.right{ - background: url(../../../images/button8_right.png) no-repeat right top; - padding: 5px 27px 0 27px; - height: 21px; - } -A.button10{ - background: transparent url(../../../images/button10_bg.png) repeat-x top; - color: #FFF !important; -} - - A.button10 SPAN.left{ - background: url(../../../images/button10_left.png) no-repeat left top; - padding: 0; - } - - A.button10 SPAN.right{ - background: url(../../../images/button10_right.png) no-repeat right top; - padding: 5px 27px 0 27px; - height: 21px; - } - -A.button6{ - background: url(../../../images/button5_bg.png) repeat-x top; -} - A.button6.green{ - background-image: url(../../../images/button11_bg.png); - } - - A.button6 SPAN.left{ - background: url(../../../images/button5_left.png) no-repeat left top; - padding: 0; - } - A.button6.green SPAN.left{ - background-image: url(../../../images/button11_left.png); - } - - A.button6 SPAN.right{ - background: url(../../../images/button5_right.png) no-repeat right top; - padding: 4px 27px 0 27px; - height: 20px; - } - A.button6.green SPAN.right{ - background-image: url(../../../images/button11_right.png); - } - -A.button6:hover, -A.button7:hover, -A.button8:hover, -A.button10:hover{ - background-position: left bottom; - text-decoration: none !important; -} - - A.button6:hover SPAN, - A.button7:hover SPAN, - A.button8:hover SPAN, - A.button10:hover SPAN{ - background-position: right bottom; - } - - A.button7:hover SPAN.left{ - background-position: left bottom; - } - - A.button7:hover SPAN.right{ - background-position: right bottom; - } - - A.button8:hover SPAN.left, - A.button10:hover SPAN.left{ - background-position: left bottom; - } - - A.button8:hover SPAN.right, - A.button10:hover SPAN.right{ - background-position: right bottom; - } - - A.button6:hover SPAN.left{ - background-position: left bottom; - } - - A.button6:hover SPAN.right{ - background-position: right bottom; - } - -A.button9{ - display: block; - background: transparent url(../../../images/button9.png) no-repeat top; - width: 126px; - height: 15px; - font-family: Arial, Helvetica, sans-serif; - font-size: 12px; - color: #FFF; - text-decoration: none; - font-weight: bold; - text-align: center; - } - - A.button9:hover{ - background: transparent url(../../../images/button9.png) no-repeat bottom; - } - -/*---------------- - MISC -----------------*/ - -IMG{ - border: none; -} - -.hide{ - display: none; -} - -.fLeft{ - float: left !important; -} - -.fRight{ - float: right !important; -} - -.lastColumn{ - text-align: left !important; - padding-left: 10px !important; -} -#loading { - background: url("../../../images/loading.gif") no-repeat scroll center center transparent; - border: 0 solid #666666; - font: 15px Tahoma,Geneva,sans-serif; - height: 100px; - left: 50%; - margin-left: -50px; - margin-top: -50px; - overflow: auto; - padding: 10px; - position: fixed; - text-align: center; - top: 50%; - width: 100px; - z-index: 100; -} -.searchRowBox { - float:left; - width:420px; -} - - -.contestsContainer { - position: relative; -} - - -/*help center widget*/ -#helpCenterWidget{ - padding:0 15px; - } - #helpCenterWidget h6{ - background:url(../../../images/questionIcon.png) no-repeat 0 center; - padding-left:32px; - line-height:22px; - font-size:17px; - color:#fffffd; - margin-top:3px; - margin-bottom:13px; - margin-left:7px; - } - .homePage #helpCenterWidget h6{ - margin-left:0px; - - } - #helpCenterWidget ul.tabList{ - float:left; - display:inline; - } - #helpCenterWidget ul.tabList li{ - float:left; - display:inline; - margin-right:3px; - } - #helpCenterWidget ul.tabList li.last{ - margin-right:0; - } - #helpCenterWidget ul.tabList a, - #helpCenterWidget ul.tabList a:visited{ - background:url(../../../images/tabListBG.png) repeat-x 100% -22px; - width:auto; - display:inline-block; - - height:22px; - line-height:22px; - overflow:hidden; - - padding:0 8px; - - text-decoration:none; - font-size:11px; - font-weight:bold; - text-decoration:none; - color:#fffffe; - } - - #helpCenterWidget ul.tabList a:hover{ - background:url(../../../images/tabListBG.png) repeat-x 0 -88px; - } - - #helpCenterWidget ul.tabList a.actived, - #helpCenterWidget ul.tabList a.actived:visited, - #helpCenterWidget ul.tabList a.actived:hover{ - background:url(../../../images/tabListBGActived.png) repeat-x 0 -23px; - position:relative; - top:1px; - height:23px; - overflow:hidden; - border-left:1px solid #5e5651; - border-right:1px solid #5e5651; - z-index:2; - } - .dashboardPage #helpCenterWidget ul.tabList a{ - padding:0 14px; - } - #helpCenterWidget ul.tabList a.tabMore, - #helpCenterWidget ul.tabList a.tabMore:visited{ - display:none; - } - #helpCenterWidget ul.tabList a#moreTab, - #helpCenterWidget ul.tabList a#lessTab{ - padding:0 14px; - } - .dashboardPage #helpCenterWidget ul.tabList a#moreTab, - .dashboardPage #helpCenterWidget ul.tabList a#lessTab{ - padding:0 12px; - } - - .tabContent{ - width:100%; - background:#4c413c; - border:1px solid #5e5651; - padding-bottom:10px; - position:relative; - } - .dashboardPage .tabContent{ - top:-1px; - } - .viewAllLink, - .viewAllLink:visited{ - position:absolute; - bottom:15px; - right:15px; - text-decoration:underline; - font-size:11px; - font-weight:bold; - color:#efefef; - } - .viewAllLink:hover{ - text-decoration:none; - } - - .tabContent ul{ - padding:15px; - list-style:none; - } - .tabContent ul li{ - padding-bottom:10px; - background:url(../../../images/grayArrow.gif) no-repeat 0 3px; - } - .tabContent ul a, - .tabContent ul a:visited{ - font-size:11.05px; - text-decoration:none; - color:#fffffd; - margin-left:13px; - display:block; - } - .tabContent ul a:hover{ - text-decoration:underline; - } - #helpCenterWidget .contactUs{ - margin:13px -15px 0; - text-align:center; - background:url(../../../images/shadow.png) repeat-x 0 0; - padding-top:22px; - padding-bottom:26px; - } - -.darkenBtn, -.darkenBtn:visited { - color: #fffffd; - background: url(../../../images/darkenBtn.png) no-repeat 0 0; - width: auto; - display: inline-block; - padding-left: 12px; - text-decoration: none; - font-size: 14px; - font-weight: bold; - height: 33px; - line-height: 33px; - overflow: hidden; -} - -.darkenBtn .right { - background: url(../../../images/darkenBtn.png) no-repeat 100% -66px; - width: auto; - display: inline-block; - padding-right: 12px; - height: 33px; - line-height: 33px; - overflow: hidden; - cursor: pointer; -} - -.darkenBtn .middle { - background: url(../../../images/darkenBtn.png) repeat-x 0 -33px; - width: auto; - display: inline-block; - padding: 0 10px; - height: 33px; - line-height: 33px; - overflow: hidden; - cursor: pointer; -} - -.darkenBtn:hover { - background: url(../../../images/darkenBtn.png) no-repeat 0 -99px; -} - -.darkenBtn:hover .right { - background: url(../../../images/darkenBtn.png) no-repeat 100% -165px; -} - -.darkenBtn:hover .middle { - background: url(../../../images/darkenBtn.png) repeat-x 0 -132px; -} - - -#modalBackground { - width: 100%; - height: 100%; - position: absolute; - left: 0; - top: 0; - z-index: 10000; - display: none; - background: #000002; -} -#modalBackground { - width: 100%; - height: 100%; - position: absolute; - left: 0; - top: 0; - z-index: 10000; - display: none; - background: #000002; -} - -#new-modal { - top: 0; - left: 0; - position: fixed; - z-index: 10001; -} - -#new-modal .outLay { - position: relative; - display: none; -} - -.outLay { - width: 360px; -} - -#new-modal-new { - left: 0; - position: fixed; - top: 0; - z-index: 10002; -} - -#new-modal-new .outLayNew { - display: none; - position: relative; -} - -#new-modal .outLay .modalHeader .closeModal, -#new-modal .outLay .modalHeader .closeOtherModal { - position: absolute; - right: 0; - top: 0; - display: block; - width: 30px; - height: 30px; - text-indent: -9999px; - background: url(../../images/modal-close.png) left top no-repeat; - z-index: 2; -} - -#new-modal .outLay .modalHeader .closeModal:hover { - background-position: left -30px; -} - -#new-modal .outLay .modalHeader { - height: 40px; - border-bottom: 1px solid #e7e7e7; - overflow: hidden; -} - -#new-modal .outLay .modalHeader .modalHeaderRight { - height: 40px; -} - -#new-modal .outLay .modalHeader .modalHeaderCenter { - height: 40px; - font-size: 15px; - border-bottom: 1px solid #e7e7e7; - line-height: 40px; - font-weight: bold; - color: #666666; - background: #f1f1f1; - padding-left: 22px; -} - -#new-modal .outLay .modalHeaderSmall { - height: 8px; - padding-left: 8px; - overflow: hidden; -} - -#new-modal .outLay .modalHeaderSmall .modalHeaderSmallRight { - height: 8px; - padding-right: 8px; -} - -#new-modal .outLay .modalHeaderSmall .modalHeaderSmallCenter { - height: 8px; -} - -#new-modal .outLay .modalFooter { - height: 8px; - overflow: hidden; -} - -#new-modal .outLay .modalFooter .modalFooterRight { - height: 8px; -} - -#new-modal .outLay .modalFooter .modalFooterCenter { - height: 8px; -} - -.outLay .modalBody { - background: #fff; - border-top-width: 0; - border-bottom-width: 0; - font-size: 13px; - color: #666666; - line-height: 18px; - min-height: 10px; -} - -.outLay .iconNotice { - position: absolute; - left: 22px; - top: 73px; -} - -.outLay .modalBody .noticeContent { - padding-left: 96px; - height: 109px; - width: 240px; -} - -.outLay .modalBody .modalCommandBox { - border-top: 1px solid #e7e7e7; - margin: 0 4px; - padding-top: 10px; - height: 36px; - text-align: center; -} - -.outLay input.text { - height: 19px; - padding-left: 5px; - padding-right: 5px; - border: 1px solid #e7e7e7; - border-radius: 4px; - font-family: "Source Sans Pro", Arial, Helvetica, sans-serif; - color: #666666; - line-height: 18px; - font-size: 11px; -} - -.outLay .textField { - border-radius: 4px; - border: 1px solid #e7e7e7; - padding-left: 6px; - padding-right: 6px; - padding-top: 4px; - padding-bottom: 4px; - font-family: "Source Sans Pro", Arial, Helvetica, sans-serif; - color: #666666; - line-height: 18px; - font-size: 12px; - overflow: auto; -} - -/* #preloaderModal */ -#preloaderModal { - width: 100px; - height: 80px; -} - -#preloaderModal .modalBody { - height: auto; - min-height: 10px; - padding-top: 10px; - text-align: center; - background: #fff; -} - -#preloaderModal .modalBody .preloaderTips { - padding-top: 5px; - font-size: 12px; - color: #666666; -} - -/* end #preloaderModal */ - -#errorDialog li { - list-style-type: disc; -} -/** cockpit footer **/ - -#footer .socialNetwork { - float: right; - position: relative; - top: -2px; -} - -.homeFooter .socialNetwork { - padding-right: 6px; -} - -#footer .socialNetwork span { - position: relative; - top: -3px; -} - -#footer .socialNetwork a, -#footer .socialNetwork a:visited { - background-image: url(../../images/followIcon.gif); - background-repeat: no-repeat; - width: 16px; - height: 16px; - display: inline-block; - overflow: hidden; - margin-left: 6px; -} - -#footer .socialNetwork a.twitterIcon, -#footer .socialNetwork a.twitterIcon:visited { - background-position: 0 0; -} - -#footer .socialNetwork a.linkedInIcon, -#footer .socialNetwork a.linkedInIcon:visited { - background-position: -16px 0; -} - -#footer .socialNetwork a.facebookIcon, -#footer .socialNetwork a.facebookIcon:visited { - background-position: -32px 0; -} - -#footer .socialNetwork a.gPlusIcon, -#footer .socialNetwork a.gPlusIcon:visited { - background-position: -48px 0; -} - -#footer .socialNetwork a.youtubeIcon, -#footer .socialNetwork a.youtubeIcon:visited { - background-position: -64px 0; -} - -#footer .copyright { - font-size: 12px; - color: #666666; -} - -#footer .copyright span { - display: inline-block; - padding-right: 0px; -} - -#footer .copyright a, -#footer .copyright a:visited { - background: url(../../images/footerSeparator.gif) no-repeat left center; - color: #666666; - text-decoration: none; - display: inline-block; - padding: 0 1px 0 4px; -} - -#footer .copyright a:hover { - text-decoration: underline; -} - - diff --git a/src/web/scripts/bootstrap.min.js b/src/web/scripts/bootstrap.min.js new file mode 100644 index 000000000..b04a0e82f --- /dev/null +++ b/src/web/scripts/bootstrap.min.js @@ -0,0 +1,6 @@ +/*! + * Bootstrap v3.1.1 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); \ No newline at end of file diff --git a/src/web/scripts/ckeditor/ckeditor/config.js b/src/web/scripts/ckeditor/ckeditor/config.js index a3f1091f4..984a4702b 100644 --- a/src/web/scripts/ckeditor/ckeditor/config.js +++ b/src/web/scripts/ckeditor/ckeditor/config.js @@ -18,7 +18,7 @@ CKEDITOR.editorConfig = function (config) { { name: 'max', items : [ 'Maximize' ] }, '/', { name: 'styles', items : [ 'Format','Font','FontSize', '-', 'TextColor','BGColor'] }, - { name: 'paragraph', items : [ 'Outdent','Indent','-','Blockquote', + { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote', '-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock' ] }, { name: 'links', items : [ 'Link','Unlink' ] } ]; diff --git a/src/web/scripts/instantSearch.js b/src/web/scripts/instantSearch.js index 6651d7a49..67d3d6e49 100644 --- a/src/web/scripts/instantSearch.js +++ b/src/web/scripts/instantSearch.js @@ -484,7 +484,7 @@ var instantSearchFeaturesList = { }, { "title": "Scorecard Management", - "link": "/direct/scorecard/", + "link": "/scorecard/", "brief": "Manage the challenge scorecard - your can create new scorecard templates here", "group": "Admin", "reqAdmin": "yes" diff --git a/src/web/scripts/launch/contestDetailSoftware.js b/src/web/scripts/launch/contestDetailSoftware.js index 9743d2853..9d51e344c 100644 --- a/src/web/scripts/launch/contestDetailSoftware.js +++ b/src/web/scripts/launch/contestDetailSoftware.js @@ -1,5 +1,5 @@ /** - * Copyright (C) 2010 - 2016 TopCoder Inc., All Rights Reserved. + * Copyright (C) 2010 - 2017 TopCoder Inc., All Rights Reserved. * * Contest Detail Javascript * @@ -120,8 +120,11 @@ * Version 3.9 (TOPCODER DIRECT - CLOSE PRIVATE CHALLENGE IMMEDIATELY) * - Add support for closing and canceling private challenge * + * Version 3.10 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES): + * - Add support for challenge group(view and editing) + * * @author isv, minhu, pvmagacho, GreatKevin, Veve, GreatKevin, TCSCODER - * @version 3.9 + * @version 3.10 */ // can edit multi round var canEditMultiRound = true; @@ -858,6 +861,8 @@ function initContest(contestJson) { mainWidget.softwareCompetition.platforms = contestJson.platformIds; } + mainWidget.softwareCompetition.groups = contestJson.groupIds; + var projectHeader = mainWidget.softwareCompetition.projectHeader; projectHeader.tcDirectProjectId = contestJson.tcDirectProjectId; projectHeader.tcDirectProjectName = contestJson.tcDirectProjectName; @@ -1361,7 +1366,17 @@ function populateTypeSection() { } + jQuery_1_11_1("#groups").magicSuggest().setValue(mainWidget.softwareCompetition.groups); + var groupMap = {}; + $.each(securityGroups, function(i, val){ + groupMap[''+val.id]=val.name; + }); + var selectedGroupName = []; + $.each(mainWidget.softwareCompetition.groups, function(i, val){ + selectedGroupName.push(groupMap[val]); + }); + $('#rswGroups').html(selectedGroupName.join(", ")); } /** @@ -1417,6 +1432,7 @@ function saveTypeSection() { dataType: 'json', success: function (jsonResult) { handleSaveAsDraftContestResult(jsonResult); + mainWidget.softwareCompetition.groups = jQuery_1_11_1("#groups").magicSuggest().getValue(); populateTypeSection(); populateRoundSection(); if (mainWidget.competitionType == "SOFTWARE") { @@ -2591,7 +2607,6 @@ function populateSpecSection(initFlag) { $("#swThurgoodDiv input").removeAttr("checked"); } - // for studio if (mainWidget.competitionType == "STUDIO") { $('#contestIntroduction').val(mainWidget.softwareCompetition.projectHeader.projectStudioSpecification.contestIntroduction); diff --git a/src/web/scripts/launch/main.js b/src/web/scripts/launch/main.js index e0dc614e3..6c8601cea 100644 --- a/src/web/scripts/launch/main.js +++ b/src/web/scripts/launch/main.js @@ -1,5 +1,5 @@ /** - * Copyright (C) 2010 - 2016 TopCoder Inc., All Rights Reserved. + * Copyright (C) 2010 - 2017 TopCoder Inc., All Rights Reserved. * * Main Script. It contains the functions/variables shared for launch contest/edit contest. * @@ -109,8 +109,11 @@ * Version 3.9 (Provide Way To Pre_register members When Launching Challenge) * - Add support for pre-register member * + * Version 3.10 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES): + * - Add support for pick up challenge group. + * * @author isv, GreatKevin, bugbuka, GreatKevin, Veve, TCSCODER - * @version 3.9 + * @version 3.10 */ /** @@ -183,6 +186,8 @@ var swDocuments = []; // represents project id of reporting contest type. var REPORTING_ID = "36"; + +var securityGroups = []; /** * Configuration/General Set up */ @@ -207,6 +212,18 @@ $(document).ready(function() { originalSoftwareContestFees = $.extend(true,{},softwareContestFees); billingInfos = result.billingInfos; copilotFees = result.copilotFees; + securityGroups = result.groups; + + securityGroups.sort(function(A, B){ + var a = A.name.toLowerCase(); + var b = B.name.toLowerCase(); + return a < b ? -1 : ((a > b) ? 1 : 0); + }); + jQuery_1_11_1("#groups").magicSuggest({ + placeholder: 'Type group name here', + allowFreeEntries: false, + data: securityGroups + }); }, function(errorMessage) { showServerError(errorMessage); @@ -535,8 +552,7 @@ $(document).ready(function() { $(".preRegisterUsersRow").hide(); $("#preRegisterUsersEditDiv").hide(); } - }) - + }); }); // end of initiation @@ -1061,6 +1077,10 @@ function saveAsDraftRequest() { request['cmcBillingId'] = $("input[name=CMCBillingID]").val(); } + var selectedGroups = jQuery_1_11_1("#groups").magicSuggest().getSelection(); + request['groups'] = $.map(selectedGroups, function (val, i) { + return val.id.toString(); + }); return request; } @@ -2947,7 +2967,6 @@ function sortPlatformSelects() { sortSelectOptions('masterPlatformsChoosenSelect'); } - function sortCategorySelects() { sortSelectOptions('select1_categories'); sortSelectOptions('select2_categories'); diff --git a/src/web/scripts/launch/pages/overview.js b/src/web/scripts/launch/pages/overview.js index 61c95a2ce..649cad917 100644 --- a/src/web/scripts/launch/pages/overview.js +++ b/src/web/scripts/launch/pages/overview.js @@ -1,5 +1,5 @@ /** - * Copyright (C) 2010 - 2014 TopCoder Inc., All Rights Reserved. + * Copyright (C) 2010 - 2017 TopCoder Inc., All Rights Reserved. * * Overview Page (the second page of the launch challenge flow) * @@ -40,8 +40,11 @@ * Version 1.9 (TopCoder Direct - Draft Challenge Creation/Saving Prompt) * - Add the save challenge confirmation * - * @author bugbuka, GreatKevin, Veve, GreatKevin - * @version 1.9 + * Version 1.10 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES): + * - Update review page for groups selected section + * + * @author bugbuka, GreatKevin, Veve, GreatKevin, TCSCODER + * @version 1.10 */ $(document).ready(function() { diff --git a/src/web/scripts/launch/pages/selection.js b/src/web/scripts/launch/pages/selection.js index c924cf1fd..8f717f5dc 100644 --- a/src/web/scripts/launch/pages/selection.js +++ b/src/web/scripts/launch/pages/selection.js @@ -441,6 +441,14 @@ function continueContestSelection() { if(!validateFieldsContestSelection()) { return; } + //add challenge group to review page + var groupsSpan=""; + var groupSelected = jQuery_1_11_1("#groups").magicSuggest().getSelection(); + $.each(groupSelected, function(i, g){ + groupsSpan+=''+ g.name+''; + }); + $(".overviewData .rGroups td span").remove(); + $(groupsSpan).insertBefore(".overviewData .rGroups td a"); if(mainWidget.isSoftwareContest()) { showPage('overviewSoftwarePage'); diff --git a/src/web/scripts/magicsuggest.js b/src/web/scripts/magicsuggest.js new file mode 100644 index 000000000..3ff463df7 --- /dev/null +++ b/src/web/scripts/magicsuggest.js @@ -0,0 +1,1565 @@ +/** + * Multiple Selection Component for Bootstrap + * Check nicolasbize.github.io/magicsuggest/ for latest updates. + * + * Author: Nicolas Bize + * Created: Feb 8th 2013 + * Last Updated: Oct 16th 2014 + * Version: 2.1.4 + * Licence: MagicSuggest is licenced under MIT licence (http://opensource.org/licenses/MIT) + */ +(function($) +{ + "use strict"; + var MagicSuggest = function(element, options) + { + var ms = this; + + /** + * Initializes the MagicSuggest component + */ + var defaults = { + /********** CONFIGURATION PROPERTIES ************/ + /** + * Restricts or allows the user to validate typed entries. + * Defaults to true. + */ + allowFreeEntries: true, + + /** + * Restricts or allows the user to add the same entry more than once + * Defaults to false. + */ + allowDuplicates: false, + + /** + * Additional config object passed to each $.ajax call + */ + ajaxConfig: {}, + + /** + * If a single suggestion comes out, it is preselected. + */ + autoSelect: true, + + /** + * Auto select the first matching item with multiple items shown + */ + selectFirst: false, + + /** + * Allow customization of query parameter + */ + queryParam: 'query', + + /** + * A function triggered just before the ajax request is sent, similar to jQuery + */ + beforeSend: function(){ }, + + /** + * A custom CSS class to apply to the field's underlying element. + */ + cls: '', + + /** + * JSON Data source used to populate the combo box. 3 options are available here: + * No Data Source (default) + * When left null, the combo box will not suggest anything. It can still enable the user to enter + * multiple entries if allowFreeEntries is * set to true (default). + * Static Source + * You can pass an array of JSON objects, an array of strings or even a single CSV string as the + * data source.For ex. data: [* {id:0,name:"Paris"}, {id: 1, name: "New York"}] + * You can also pass any json object with the results property containing the json array. + * Url + * You can pass the url from which the component will fetch its JSON data.Data will be fetched + * using a POST ajax request that will * include the entered text as 'query' parameter. The results + * fetched from the server can be: + * - an array of JSON objects (ex: [{id:...,name:...},{...}]) + * - a string containing an array of JSON objects ready to be parsed (ex: "[{id:...,name:...},{...}]") + * - a JSON object whose data will be contained in the results property + * (ex: {results: [{id:...,name:...},{...}] + * Function + * You can pass a function which returns an array of JSON objects (ex: [{id:...,name:...},{...}]) + * The function can return the JSON data or it can use the first argument as function to handle the data. + * Only one (callback function or return value) is needed for the function to succeed. + * See the following example: + * function (response) { var myjson = [{name: 'test', id: 1}]; response(myjson); return myjson; } + */ + data: null, + + /** + * Additional parameters to the ajax call + */ + dataUrlParams: {}, + + /** + * Start the component in a disabled state. + */ + disabled: false, + + /** + * Name of JSON object property that defines the disabled behaviour + */ + disabledField: null, + + /** + * Name of JSON object property displayed in the combo list + */ + displayField: 'name', + + /** + * Set to false if you only want mouse interaction. In that case the combo will + * automatically expand on focus. + */ + editable: true, + + /** + * Set starting state for combo. + */ + expanded: false, + + /** + * Automatically expands combo on focus. + */ + expandOnFocus: false, + + /** + * JSON property by which the list should be grouped + */ + groupBy: null, + + /** + * Set to true to hide the trigger on the right + */ + hideTrigger: false, + + /** + * Set to true to highlight search input within displayed suggestions + */ + highlight: true, + + /** + * A custom ID for this component + */ + id: null, + + /** + * A class that is added to the info message appearing on the top-right part of the component + */ + infoMsgCls: '', + + /** + * Additional parameters passed out to the INPUT tag. Enables usage of AngularJS's custom tags for ex. + */ + inputCfg: {}, + + /** + * The class that is applied to show that the field is invalid + */ + invalidCls: 'ms-inv', + + /** + * Set to true to filter data results according to case. Useless if the data is fetched remotely + */ + matchCase: false, + + /** + * Once expanded, the combo's height will take as much room as the # of available results. + * In case there are too many results displayed, this will fix the drop down height. + */ + maxDropHeight: 290, + + /** + * Defines how long the user free entry can be. Set to null for no limit. + */ + maxEntryLength: null, + + /** + * A function that defines the helper text when the max entry length has been surpassed. + */ + maxEntryRenderer: function(v) { + return 'Please reduce your entry by ' + v + ' character' + (v > 1 ? 's':''); + }, + + /** + * The maximum number of results displayed in the combo drop down at once. + */ + maxSuggestions: null, + + /** + * The maximum number of items the user can select if multiple selection is allowed. + * Set to null to remove the limit. + */ + maxSelection: 10, + + /** + * A function that defines the helper text when the max selection amount has been reached. The function has a single + * parameter which is the number of selected elements. + */ + maxSelectionRenderer: function(v) { + return 'You cannot choose more than ' + v + ' item' + (v > 1 ? 's':''); + }, + + /** + * The method used by the ajax request. + */ + method: 'POST', + + /** + * The minimum number of characters the user must type before the combo expands and offers suggestions. + */ + minChars: 0, + + /** + * A function that defines the helper text when not enough letters are set. The function has a single + * parameter which is the difference between the required amount of letters and the current one. + */ + minCharsRenderer: function(v) { + return 'Please type ' + v + ' more character' + (v > 1 ? 's':''); + }, + + /** + * Whether or not sorting / filtering should be done remotely or locally. + * Use either 'local' or 'remote' + */ + mode: 'local', + + /** + * The name used as a form element. + */ + name: null, + + /** + * The text displayed when there are no suggestions. + */ + noSuggestionText: 'No suggestions', + + /** + * The default placeholder text when nothing has been entered + */ + placeholder: 'Type or click here', + + /** + * A function used to define how the items will be presented in the combo + */ + renderer: null, + + /** + * Whether or not this field should be required + */ + required: false, + + /** + * Set to true to render selection as a delimited string + */ + resultAsString: false, + + /** + * Text delimiter to use in a delimited string. + */ + resultAsStringDelimiter: ',', + + /** + * Name of JSON object property that represents the list of suggested objects + */ + resultsField: 'results', + + /** + * A custom CSS class to add to a selected item + */ + selectionCls: '', + + /** + * An optional element replacement in which the selection is rendered + */ + selectionContainer: null, + + /** + * Where the selected items will be displayed. Only 'right', 'bottom' and 'inner' are valid values + */ + selectionPosition: 'inner', + + /** + * A function used to define how the items will be presented in the tag list + */ + selectionRenderer: null, + + /** + * Set to true to stack the selectioned items when positioned on the bottom + * Requires the selectionPosition to be set to 'bottom' + */ + selectionStacked: false, + + /** + * Direction used for sorting. Only 'asc' and 'desc' are valid values + */ + sortDir: 'asc', + + /** + * name of JSON object property for local result sorting. + * Leave null if you do not wish the results to be ordered or if they are already ordered remotely. + */ + sortOrder: null, + + /** + * If set to true, suggestions will have to start by user input (and not simply contain it as a substring) + */ + strictSuggest: false, + + /** + * Custom style added to the component container. + */ + style: '', + + /** + * If set to true, the combo will expand / collapse when clicked upon + */ + toggleOnClick: false, + + + /** + * Amount (in ms) between keyboard registers. + */ + typeDelay: 400, + + /** + * If set to true, tab won't blur the component but will be registered as the ENTER key + */ + useTabKey: false, + + /** + * If set to true, using comma will validate the user's choice + */ + useCommaKey: true, + + + /** + * Determines whether or not the results will be displayed with a zebra table style + */ + useZebraStyle: false, + + /** + * initial value for the field + */ + value: null, + + /** + * name of JSON object property that represents its underlying value + */ + valueField: 'id', + + /** + * regular expression to validate the values against + */ + vregex: null, + + /** + * type to validate against + */ + vtype: null + }; + + var conf = $.extend({},options); + var cfg = $.extend(true, {}, defaults, conf); + + /********** PUBLIC METHODS ************/ + /** + * Add one or multiple json items to the current selection + * @param items - json object or array of json objects + * @param isSilent - (optional) set to true to suppress 'selectionchange' event from being triggered + */ + this.addToSelection = function(items, isSilent) + { + if (!cfg.maxSelection || _selection.length < cfg.maxSelection) { + if (!$.isArray(items)) { + items = [items]; + } + var valuechanged = false; + $.each(items, function(index, json) { + if (cfg.allowDuplicates || $.inArray(json[cfg.valueField], ms.getValue()) === -1) { + _selection.push(json); + valuechanged = true; + } + }); + if(valuechanged === true) { + self._renderSelection(); + this.empty(); + if (isSilent !== true) { + $(this).trigger('selectionchange', [this, this.getSelection()]); + } + } + } + this.input.attr('placeholder', (cfg.selectionPosition === 'inner' && this.getValue().length > 0) ? '' : cfg.placeholder); + }; + + /** + * Clears the current selection + * @param isSilent - (optional) set to true to suppress 'selectionchange' event from being triggered + */ + this.clear = function(isSilent) + { + this.removeFromSelection(_selection.slice(0), isSilent); // clone array to avoid concurrency issues + }; + + /** + * Collapse the drop down part of the combo + */ + this.collapse = function() + { + if (cfg.expanded === true) { + this.combobox.detach(); + cfg.expanded = false; + $(this).trigger('collapse', [this]); + } + }; + + /** + * Set the component in a disabled state. + */ + this.disable = function() + { + this.container.addClass('ms-ctn-disabled'); + cfg.disabled = true; + ms.input.attr('disabled', true); + }; + + /** + * Empties out the combo user text + */ + this.empty = function(){ + this.input.val(''); + }; + + /** + * Set the component in a enable state. + */ + this.enable = function() + { + this.container.removeClass('ms-ctn-disabled'); + cfg.disabled = false; + ms.input.attr('disabled', false); + }; + + /** + * Expand the drop drown part of the combo. + */ + this.expand = function() + { + if (!cfg.expanded && (this.input.val().length >= cfg.minChars || this.combobox.children().size() > 0)) { + this.combobox.appendTo(this.container); + self._processSuggestions(); + cfg.expanded = true; + $(this).trigger('expand', [this]); + } + }; + + /** + * Retrieve component enabled status + */ + this.isDisabled = function() + { + return cfg.disabled; + }; + + /** + * Checks whether the field is valid or not + * @return {boolean} + */ + this.isValid = function() + { + var valid = cfg.required === false || _selection.length > 0; + if(cfg.vtype || cfg.vregex){ + $.each(_selection, function(index, item){ + valid = valid && self._validateSingleItem(item[cfg.valueField]); + }); + } + return valid; + }; + + /** + * Gets the data params for current ajax request + */ + this.getDataUrlParams = function() + { + return cfg.dataUrlParams; + }; + + /** + * Gets the name given to the form input + */ + this.getName = function() + { + return cfg.name; + }; + + /** + * Retrieve an array of selected json objects + * @return {Array} + */ + this.getSelection = function() + { + return _selection; + }; + + /** + * Retrieve the current text entered by the user + */ + this.getRawValue = function(){ + return ms.input.val(); + }; + + /** + * Retrieve an array of selected values + */ + this.getValue = function() + { + return $.map(_selection, function(o) { + return o[cfg.valueField]; + }); + }; + + /** + * Remove one or multiples json items from the current selection + * @param items - json object or array of json objects + * @param isSilent - (optional) set to true to suppress 'selectionchange' event from being triggered + */ + this.removeFromSelection = function(items, isSilent) + { + if (!$.isArray(items)) { + items = [items]; + } + var valuechanged = false; + $.each(items, function(index, json) { + var i = $.inArray(json[cfg.valueField], ms.getValue()); + if (i > -1) { + _selection.splice(i, 1); + valuechanged = true; + } + }); + if (valuechanged === true) { + self._renderSelection(); + if(isSilent !== true){ + $(this).trigger('selectionchange', [this, this.getSelection()]); + } + if(cfg.expandOnFocus){ + ms.expand(); + } + if(cfg.expanded) { + self._processSuggestions(); + } + } + this.input.attr('placeholder', (cfg.selectionPosition === 'inner' && this.getValue().length > 0) ? '' : cfg.placeholder); + }; + + /** + * Get current data + */ + this.getData = function(){ + return _cbData; + }; + + /** + * Set up some combo data after it has been rendered + * @param data + */ + this.setData = function(data){ + cfg.data = data; + self._processSuggestions(); + }; + + /** + * Sets the name for the input field so it can be fetched in the form + * @param name + */ + this.setName = function(name){ + cfg.name = name; + if(name){ + cfg.name += name.indexOf('[]') > 0 ? '' : '[]'; + } + if(ms._valueContainer){ + $.each(ms._valueContainer.children(), function(i, el){ + el.name = cfg.name; + }); + } + }; + + /** + * Sets the current selection with the JSON items provided + * @param items + */ + this.setSelection = function(items){ + this.clear(); + this.addToSelection(items); + }; + + /** + * Sets a value for the combo box. Value must be an array of values with data type matching valueField one. + * @param data + */ + this.setValue = function(values) + { + var items = []; + + $.each(values, function(index, value) { + // first try to see if we have the full objects from our data set + var found = false; + $.each(_cbData, function(i,item){ + if(item[cfg.valueField] == value){ + items.push(item); + found = true; + return false; + } + }); + if(!found){ + if(typeof(value) === 'object'){ + items.push(value); + } else { + var json = {}; + json[cfg.valueField] = value; + json[cfg.displayField] = value; + items.push(json); + } + } + }); + if(items.length > 0) { + this.addToSelection(items); + } + }; + + /** + * Sets data params for subsequent ajax requests + * @param params + */ + this.setDataUrlParams = function(params) + { + cfg.dataUrlParams = $.extend({},params); + }; + + /********** PRIVATE ************/ + var _selection = [], // selected objects + _comboItemHeight = 0, // height for each combo item. + _timer, + _hasFocus = false, + _groups = null, + _cbData = [], + _ctrlDown = false, + KEYCODES = { + BACKSPACE: 8, + TAB: 9, + ENTER: 13, + CTRL: 17, + ESC: 27, + SPACE: 32, + UPARROW: 38, + DOWNARROW: 40, + COMMA: 188 + }; + + var self = { + + /** + * Empties the result container and refills it with the array of json results in input + * @private + */ + _displaySuggestions: function(data) { + ms.combobox.show(); + ms.combobox.empty(); + + var resHeight = 0, // total height taken by displayed results. + nbGroups = 0; + + if(_groups === null) { + self._renderComboItems(data); + resHeight = _comboItemHeight * data.length; + } + else { + for(var grpName in _groups) { + nbGroups += 1; + $('
    ', { + 'class': 'ms-res-group', + html: grpName + }).appendTo(ms.combobox); + self._renderComboItems(_groups[grpName].items, true); + } + var _groupItemHeight = ms.combobox.find('.ms-res-group').outerHeight(); + if(_groupItemHeight !== null) { + var tmpResHeight = nbGroups * _groupItemHeight; + resHeight = (_comboItemHeight * data.length) + tmpResHeight; + } else { + resHeight = _comboItemHeight * (data.length + nbGroups); + } + } + + if(resHeight < ms.combobox.height() || resHeight <= cfg.maxDropHeight) { + ms.combobox.height(resHeight); + } + else if(resHeight >= ms.combobox.height() && resHeight > cfg.maxDropHeight) { + ms.combobox.height(cfg.maxDropHeight); + } + + if(data.length === 1 && cfg.autoSelect === true) { + ms.combobox.children().filter(':not(.ms-res-item-disabled):last').addClass('ms-res-item-active'); + } + + if (cfg.selectFirst === true) { + ms.combobox.children().filter(':not(.ms-res-item-disabled):first').addClass('ms-res-item-active'); + } + + if(data.length === 0 && ms.getRawValue() !== "") { + var noSuggestionText = cfg.noSuggestionText.replace(/\{\{.*\}\}/, ms.input.val()); + self._updateHelper(noSuggestionText); + ms.collapse(); + } + + // When free entry is off, add invalid class to input if no data matches + if(cfg.allowFreeEntries === false) { + if(data.length === 0) { + $(ms.input).addClass(cfg.invalidCls); + ms.combobox.hide(); + } else { + $(ms.input).removeClass(cfg.invalidCls); + } + } + }, + + /** + * Returns an array of json objects from an array of strings. + * @private + */ + _getEntriesFromStringArray: function(data) { + var json = []; + $.each(data, function(index, s) { + var entry = {}; + entry[cfg.displayField] = entry[cfg.valueField] = $.trim(s); + json.push(entry); + }); + return json; + }, + + /** + * Replaces html with highlighted html according to case + * @param html + * @private + */ + _highlightSuggestion: function(html) { + var q = ms.input.val(); + + //escape special regex characters + var specialCharacters = ['^', '$', '*', '+', '?', '.', '(', ')', ':', '!', '|', '{', '}', '[', ']']; + + $.each(specialCharacters, function (index, value) { + q = q.replace(value, "\\" + value); + }) + + if(q.length === 0) { + return html; // nothing entered as input + } + + var glob = cfg.matchCase === true ? 'g' : 'gi'; + return html.replace(new RegExp('(' + q + ')(?!([^<]+)?>)', glob), '$1'); + }, + + /** + * Moves the selected cursor amongst the list item + * @param dir - 'up' or 'down' + * @private + */ + _moveSelectedRow: function(dir) { + if(!cfg.expanded) { + ms.expand(); + } + var list, start, active, scrollPos; + list = ms.combobox.find(".ms-res-item:not(.ms-res-item-disabled)"); + if(dir === 'down') { + start = list.eq(0); + } + else { + start = list.filter(':last'); + } + active = ms.combobox.find('.ms-res-item-active:not(.ms-res-item-disabled):first'); + if(active.length > 0) { + if(dir === 'down') { + start = active.nextAll('.ms-res-item:not(.ms-res-item-disabled)').first(); + if(start.length === 0) { + start = list.eq(0); + } + scrollPos = ms.combobox.scrollTop(); + ms.combobox.scrollTop(0); + if(start[0].offsetTop + start.outerHeight() > ms.combobox.height()) { + ms.combobox.scrollTop(scrollPos + _comboItemHeight); + } + } + else { + start = active.prevAll('.ms-res-item:not(.ms-res-item-disabled)').first(); + if(start.length === 0) { + start = list.filter(':last'); + ms.combobox.scrollTop(_comboItemHeight * list.length); + } + if(start[0].offsetTop < ms.combobox.scrollTop()) { + ms.combobox.scrollTop(ms.combobox.scrollTop() - _comboItemHeight); + } + } + } + list.removeClass("ms-res-item-active"); + start.addClass("ms-res-item-active"); + }, + + /** + * According to given data and query, sort and add suggestions in their container + * @private + */ + _processSuggestions: function(source) { + var json = null, data = source || cfg.data; + if(data !== null) { + if(typeof(data) === 'function'){ + data = data.call(ms, ms.getRawValue()); + } + if(typeof(data) === 'string') { // get results from ajax + $(ms).trigger('beforeload', [ms]); + var queryParams = {} + queryParams[cfg.queryParam] = ms.input.val(); + var params = $.extend(queryParams, cfg.dataUrlParams); + $.ajax($.extend({ + type: cfg.method, + url: data, + data: params, + beforeSend: cfg.beforeSend, + success: function(asyncData){ + json = typeof(asyncData) === 'string' ? JSON.parse(asyncData) : asyncData; + self._processSuggestions(json); + $(ms).trigger('load', [ms, json]); + if(self._asyncValues){ + ms.setValue(typeof(self._asyncValues) === 'string' ? JSON.parse(self._asyncValues) : self._asyncValues); + self._renderSelection(); + delete(self._asyncValues); + } + }, + error: function(){ + throw("Could not reach server"); + } + }, cfg.ajaxConfig)); + return; + } else { // results from local array + if(data.length > 0 && typeof(data[0]) === 'string') { // results from array of strings + _cbData = self._getEntriesFromStringArray(data); + } else { // regular json array or json object with results property + _cbData = data[cfg.resultsField] || data; + } + } + var sortedData = cfg.mode === 'remote' ? _cbData : self._sortAndTrim(_cbData); + self._displaySuggestions(self._group(sortedData)); + + } + }, + + /** + * Render the component to the given input DOM element + * @private + */ + _render: function(el) { + ms.setName(cfg.name); // make sure the form name is correct + // holds the main div, will relay the focus events to the contained input element. + ms.container = $('
    ', { + 'class': 'ms-ctn form-control ' + (cfg.resultAsString ? 'ms-as-string ' : '') + cfg.cls + + ($(el).hasClass('input-lg') ? ' input-lg' : '') + + ($(el).hasClass('input-sm') ? ' input-sm' : '') + + (cfg.disabled === true ? ' ms-ctn-disabled' : '') + + (cfg.editable === true ? '' : ' ms-ctn-readonly') + + (cfg.hideTrigger === false ? '' : ' ms-no-trigger'), + style: cfg.style, + id: cfg.id + }); + ms.container.focus($.proxy(handlers._onFocus, this)); + ms.container.blur($.proxy(handlers._onBlur, this)); + ms.container.keydown($.proxy(handlers._onKeyDown, this)); + ms.container.keyup($.proxy(handlers._onKeyUp, this)); + + // holds the input field + ms.input = $('', $.extend({ + type: 'text', + 'class': cfg.editable === true ? '' : ' ms-input-readonly', + readonly: !cfg.editable, + placeholder: cfg.placeholder, + disabled: cfg.disabled + }, cfg.inputCfg)); + + ms.input.focus($.proxy(handlers._onInputFocus, this)); + ms.input.click($.proxy(handlers._onInputClick, this)); + + // holds the suggestions. will always be placed on focus + ms.combobox = $('
    ', { + 'class': 'ms-res-ctn dropdown-menu' + }).height(cfg.maxDropHeight); + + // bind the onclick and mouseover using delegated events (needs jQuery >= 1.7) + ms.combobox.on('click', 'div.ms-res-item', $.proxy(handlers._onComboItemSelected, this)); + ms.combobox.on('mouseover', 'div.ms-res-item', $.proxy(handlers._onComboItemMouseOver, this)); + + if(cfg.selectionContainer){ + ms.selectionContainer = cfg.selectionContainer; + $(ms.selectionContainer).addClass('ms-sel-ctn'); + } else { + ms.selectionContainer = $('
    ', { + 'class': 'ms-sel-ctn' + }); + } + ms.selectionContainer.click($.proxy(handlers._onFocus, this)); + + if(cfg.selectionPosition === 'inner' && !cfg.selectionContainer) { + ms.selectionContainer.append(ms.input); + } + else { + ms.container.append(ms.input); + } + + ms.helper = $('', { + 'class': 'ms-helper ' + cfg.infoMsgCls + }); + self._updateHelper(); + ms.container.append(ms.helper); + + + // Render the whole thing + $(el).replaceWith(ms.container); + + if(!cfg.selectionContainer){ + switch(cfg.selectionPosition) { + case 'bottom': + ms.selectionContainer.insertAfter(ms.container); + if(cfg.selectionStacked === true) { + ms.selectionContainer.width(ms.container.width()); + ms.selectionContainer.addClass('ms-stacked'); + } + break; + case 'right': + ms.selectionContainer.insertAfter(ms.container); + ms.container.css('float', 'left'); + break; + default: + ms.container.append(ms.selectionContainer); + break; + } + } + + + // holds the trigger on the right side + if(cfg.hideTrigger === false) { + ms.trigger = $('
    ', { + 'class': 'ms-trigger', + html: '
    ' + }); + ms.trigger.click($.proxy(handlers._onTriggerClick, this)); + ms.container.append(ms.trigger); + } + + $(window).resize($.proxy(handlers._onWindowResized, this)); + + // do not perform an initial call if we are using ajax unless we have initial values + if(cfg.value !== null || cfg.data !== null){ + if(typeof(cfg.data) === 'string'){ + self._asyncValues = cfg.value; + self._processSuggestions(); + } else { + self._processSuggestions(); + if(cfg.value !== null){ + ms.setValue(cfg.value); + self._renderSelection(); + } + } + + } + + $("body").click(function(e) { + if(ms.container.hasClass('ms-ctn-focus') && + ms.container.has(e.target).length === 0 && + e.target.className.indexOf('ms-res-item') < 0 && + e.target.className.indexOf('ms-close-btn') < 0 && + ms.container[0] !== e.target) { + handlers._onBlur(); + } + }); + + if(cfg.expanded === true) { + cfg.expanded = false; + ms.expand(); + } + }, + + /** + * Renders each element within the combo box + * @private + */ + _renderComboItems: function(items, isGrouped) { + var ref = this, html = ''; + $.each(items, function(index, value) { + var displayed = cfg.renderer !== null ? cfg.renderer.call(ref, value) : value[cfg.displayField]; + var disabled = cfg.disabledField !== null && value[cfg.disabledField] === true; + var resultItemEl = $('
    ', { + 'class': 'ms-res-item ' + (isGrouped ? 'ms-res-item-grouped ':'') + + (disabled ? 'ms-res-item-disabled ':'') + + (index % 2 === 1 && cfg.useZebraStyle === true ? 'ms-res-odd' : ''), + html: cfg.highlight === true ? self._highlightSuggestion(displayed) : displayed, + 'data-json': JSON.stringify(value) + }); + html += $('
    ').append(resultItemEl).html(); + }); + ms.combobox.append(html); + _comboItemHeight = ms.combobox.find('.ms-res-item:first').outerHeight(); + }, + + /** + * Renders the selected items into their container. + * @private + */ + _renderSelection: function() { + var ref = this, w = 0, inputOffset = 0, items = [], + asText = cfg.resultAsString === true && !_hasFocus; + + ms.selectionContainer.find('.ms-sel-item').remove(); + if(ms._valueContainer !== undefined) { + ms._valueContainer.remove(); + } + + $.each(_selection, function(index, value){ + + var selectedItemEl, delItemEl, + selectedItemHtml = cfg.selectionRenderer !== null ? cfg.selectionRenderer.call(ref, value) : value[cfg.displayField]; + + var validCls = self._validateSingleItem(value[cfg.displayField]) ? '' : ' ms-sel-invalid'; + + // tag representing selected value + if(asText === true) { + selectedItemEl = $('
    ', { + 'class': 'ms-sel-item ms-sel-text ' + cfg.selectionCls + validCls, + html: selectedItemHtml + (index === (_selection.length - 1) ? '' : cfg.resultAsStringDelimiter) + }).data('json', value); + } + else { + selectedItemEl = $('
    ', { + 'class': 'ms-sel-item ' + cfg.selectionCls + validCls, + html: selectedItemHtml + }).data('json', value); + + if(cfg.disabled === false){ + // small cross img + delItemEl = $('', { + 'class': 'ms-close-btn' + }).data('json', value).appendTo(selectedItemEl); + + delItemEl.click($.proxy(handlers._onTagTriggerClick, ref)); + } + } + + items.push(selectedItemEl); + }); + ms.selectionContainer.prepend(items); + + // store the values, behaviour of multiple select + ms._valueContainer = $('
    ', { + style: 'display: none;' + }); + $.each(ms.getValue(), function(i, val){ + var el = $('', { + type: 'hidden', + name: cfg.name, + value: val + }); + el.appendTo(ms._valueContainer); + }); + ms._valueContainer.appendTo(ms.selectionContainer); + + if(cfg.selectionPosition === 'inner' && !cfg.selectionContainer) { + ms.input.width(0); + inputOffset = ms.input.offset().left - ms.selectionContainer.offset().left; + w = ms.container.width() - inputOffset - 42; + ms.input.width(w); + } + + if(_selection.length === cfg.maxSelection){ + self._updateHelper(cfg.maxSelectionRenderer.call(this, _selection.length)); + } else { + ms.helper.hide(); + } + }, + + /** + * Select an item either through keyboard or mouse + * @param item + * @private + */ + _selectItem: function(item) { + if(cfg.maxSelection === 1){ + _selection = []; + } + ms.addToSelection(item.data('json')); + item.removeClass('ms-res-item-active'); + if(cfg.expandOnFocus === false || _selection.length === cfg.maxSelection){ + ms.collapse(); + } + if(!_hasFocus){ + ms.input.focus(); + } else if(_hasFocus && (cfg.expandOnFocus || _ctrlDown)){ + self._processSuggestions(); + if(_ctrlDown){ + ms.expand(); + } + } + }, + + /** + * Sorts the results and cut them down to max # of displayed results at once + * @private + */ + _sortAndTrim: function(data) { + var q = ms.getRawValue(), + filtered = [], + newSuggestions = [], + selectedValues = ms.getValue(); + // filter the data according to given input + if(q.length > 0) { + $.each(data, function(index, obj) { + var name = obj[cfg.displayField]; + if((cfg.matchCase === true && name.indexOf(q) > -1) || + (cfg.matchCase === false && name.toLowerCase().indexOf(q.toLowerCase()) > -1)) { + if(cfg.strictSuggest === false || name.toLowerCase().indexOf(q.toLowerCase()) === 0) { + filtered.push(obj); + } + } + }); + } + else { + filtered = data; + } + // take out the ones that have already been selected + $.each(filtered, function(index, obj) { + if (cfg.allowDuplicates || $.inArray(obj[cfg.valueField], selectedValues) === -1) { + newSuggestions.push(obj); + } + }); + // sort the data + if(cfg.sortOrder !== null) { + newSuggestions.sort(function(a,b) { + if(a[cfg.sortOrder] < b[cfg.sortOrder]) { + return cfg.sortDir === 'asc' ? -1 : 1; + } + if(a[cfg.sortOrder] > b[cfg.sortOrder]) { + return cfg.sortDir === 'asc' ? 1 : -1; + } + return 0; + }); + } + // trim it down + if(cfg.maxSuggestions && cfg.maxSuggestions > 0) { + newSuggestions = newSuggestions.slice(0, cfg.maxSuggestions); + } + return newSuggestions; + + }, + + _group: function(data){ + // build groups + if(cfg.groupBy !== null) { + _groups = {}; + + $.each(data, function(index, value) { + var props = cfg.groupBy.indexOf('.') > -1 ? cfg.groupBy.split('.') : cfg.groupBy; + var prop = value[cfg.groupBy]; + if(typeof(props) != 'string'){ + prop = value; + while(props.length > 0){ + prop = prop[props.shift()]; + } + } + if(_groups[prop] === undefined) { + _groups[prop] = {title: prop, items: [value]}; + } + else { + _groups[prop].items.push(value); + } + }); + } + return data; + }, + + /** + * Update the helper text + * @private + */ + _updateHelper: function(html) { + ms.helper.html(html); + if(!ms.helper.is(":visible")) { + ms.helper.fadeIn(); + } + }, + + /** + * Validate an item against vtype or vregex + * @private + */ + _validateSingleItem: function(value){ + if(cfg.vregex !== null && cfg.vregex instanceof RegExp){ + return cfg.vregex.test(value); + } else if(cfg.vtype !== null) { + switch(cfg.vtype){ + case 'alpha': + return (/^[a-zA-Z_]+$/).test(value); + case 'alphanum': + return (/^[a-zA-Z0-9_]+$/).test(value); + case 'email': + return (/^(\w+)([\-+.][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/).test(value); + case 'url': + return (/(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i).test(value); + case 'ipaddress': + return (/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/).test(value); + } + } + return true; + } + }; + + var handlers = { + /** + * Triggered when blurring out of the component + * @private + */ + _onBlur: function() { + ms.container.removeClass('ms-ctn-focus'); + ms.collapse(); + _hasFocus = false; + if(ms.getRawValue() !== '' && cfg.allowFreeEntries === true){ + var obj = {}; + obj[cfg.displayField] = obj[cfg.valueField] = ms.getRawValue().trim(); + ms.addToSelection(obj); + } + self._renderSelection(); + + if(ms.isValid() === false) { + ms.container.addClass(cfg.invalidCls); + } + + else if(ms.input.val() !== '' && cfg.allowFreeEntries === false) { + ms.empty(); + self._updateHelper(''); + } + + $(ms).trigger('blur', [ms]); + }, + + /** + * Triggered when hovering an element in the combo + * @param e + * @private + */ + _onComboItemMouseOver: function(e) { + var target = $(e.currentTarget); + if(!target.hasClass('ms-res-item-disabled')){ + ms.combobox.children().removeClass('ms-res-item-active'); + target.addClass('ms-res-item-active'); + } + }, + + /** + * Triggered when an item is chosen from the list + * @param e + * @private + */ + _onComboItemSelected: function(e) { + var target = $(e.currentTarget); + if(!target.hasClass('ms-res-item-disabled')){ + self._selectItem($(e.currentTarget)); + } + }, + + /** + * Triggered when focusing on the container div. Will focus on the input field instead. + * @private + */ + _onFocus: function() { + ms.input.focus(); + }, + + /** + * Triggered when clicking on the input text field + * @private + */ + _onInputClick: function(){ + if (ms.isDisabled() === false && _hasFocus) { + if (cfg.toggleOnClick === true) { + if (cfg.expanded){ + ms.collapse(); + } else { + ms.expand(); + } + } + } + }, + + /** + * Triggered when focusing on the input text field. + * @private + */ + _onInputFocus: function() { + if(ms.isDisabled() === false && !_hasFocus) { + _hasFocus = true; + ms.container.addClass('ms-ctn-focus'); + ms.container.removeClass(cfg.invalidCls); + + var curLength = ms.getRawValue().length; + if(cfg.expandOnFocus === true){ + ms.expand(); + } + + if(_selection.length === cfg.maxSelection) { + self._updateHelper(cfg.maxSelectionRenderer.call(this, _selection.length)); + } else if(curLength < cfg.minChars) { + self._updateHelper(cfg.minCharsRenderer.call(this, cfg.minChars - curLength)); + } + + self._renderSelection(); + $(ms).trigger('focus', [ms]); + } + }, + + /** + * Triggered when the user presses a key while the component has focus + * This is where we want to handle all keys that don't require the user input field + * since it hasn't registered the key hit yet + * @param e keyEvent + * @private + */ + _onKeyDown: function(e) { + // check how tab should be handled + var active = ms.combobox.find('.ms-res-item-active:not(.ms-res-item-disabled):first'), + freeInput = ms.input.val(); + $(ms).trigger('keydown', [ms, e]); + + if(e.keyCode === KEYCODES.TAB && (cfg.useTabKey === false || + (cfg.useTabKey === true && active.length === 0 && ms.input.val().length === 0))) { + handlers._onBlur(); + return; + } + switch(e.keyCode) { + case KEYCODES.BACKSPACE: + if(freeInput.length === 0 && ms.getSelection().length > 0 && cfg.selectionPosition === 'inner') { + _selection.pop(); + self._renderSelection(); + $(ms).trigger('selectionchange', [ms, ms.getSelection()]); + ms.input.attr('placeholder', (cfg.selectionPosition === 'inner' && ms.getValue().length > 0) ? '' : cfg.placeholder); + ms.input.focus(); + e.preventDefault(); + } + break; + case KEYCODES.TAB: + case KEYCODES.ESC: + e.preventDefault(); + break; + case KEYCODES.ENTER: + if(freeInput !== '' || cfg.expanded){ + e.preventDefault(); + } + break; + case KEYCODES.COMMA: + if(cfg.useCommaKey === true){ + e.preventDefault(); + } + break; + case KEYCODES.CTRL: + _ctrlDown = true; + break; + case KEYCODES.DOWNARROW: + e.preventDefault(); + self._moveSelectedRow("down"); + break; + case KEYCODES.UPARROW: + e.preventDefault(); + self._moveSelectedRow("up"); + break; + default: + if(_selection.length === cfg.maxSelection) { + e.preventDefault(); + } + break; + } + }, + + /** + * Triggered when a key is released while the component has focus + * @param e + * @private + */ + _onKeyUp: function(e) { + var freeInput = ms.getRawValue(), + inputValid = $.trim(ms.input.val()).length > 0 && + (!cfg.maxEntryLength || $.trim(ms.input.val()).length <= cfg.maxEntryLength), + selected, + obj = {}; + + $(ms).trigger('keyup', [ms, e]); + + clearTimeout(_timer); + + // collapse if escape, but keep focus. + if(e.keyCode === KEYCODES.ESC && cfg.expanded) { + ms.combobox.hide(); + } + // ignore a bunch of keys + if((e.keyCode === KEYCODES.TAB && cfg.useTabKey === false) || (e.keyCode > KEYCODES.ENTER && e.keyCode < KEYCODES.SPACE)) { + if(e.keyCode === KEYCODES.CTRL){ + _ctrlDown = false; + } + return; + } + switch(e.keyCode) { + case KEYCODES.UPARROW: + case KEYCODES.DOWNARROW: + e.preventDefault(); + break; + case KEYCODES.ENTER: + case KEYCODES.TAB: + case KEYCODES.COMMA: + if(e.keyCode !== KEYCODES.COMMA || cfg.useCommaKey === true) { + e.preventDefault(); + if(cfg.expanded === true){ // if a selection is performed, select it and reset field + selected = ms.combobox.find('.ms-res-item-active:not(.ms-res-item-disabled):first'); + if(selected.length > 0) { + self._selectItem(selected); + return; + } + } + // if no selection or if freetext entered and free entries allowed, add new obj to selection + if(inputValid === true && cfg.allowFreeEntries === true) { + obj[cfg.displayField] = obj[cfg.valueField] = freeInput.trim(); + ms.addToSelection(obj); + ms.collapse(); // reset combo suggestions + ms.input.focus(); + } + break; + } + default: + if(_selection.length === cfg.maxSelection){ + self._updateHelper(cfg.maxSelectionRenderer.call(this, _selection.length)); + } + else { + if(freeInput.length < cfg.minChars) { + self._updateHelper(cfg.minCharsRenderer.call(this, cfg.minChars - freeInput.length)); + if(cfg.expanded === true) { + ms.collapse(); + } + } + else if(cfg.maxEntryLength && freeInput.length > cfg.maxEntryLength) { + self._updateHelper(cfg.maxEntryRenderer.call(this, freeInput.length - cfg.maxEntryLength)); + if(cfg.expanded === true) { + ms.collapse(); + } + } + else { + ms.helper.hide(); + if(cfg.minChars <= freeInput.length){ + _timer = setTimeout(function() { + if(cfg.expanded === true) { + self._processSuggestions(); + } else { + ms.expand(); + } + }, cfg.typeDelay); + } + } + } + break; + } + }, + + /** + * Triggered when clicking upon cross for deletion + * @param e + * @private + */ + _onTagTriggerClick: function(e) { + ms.removeFromSelection($(e.currentTarget).data('json')); + }, + + /** + * Triggered when clicking on the small trigger in the right + * @private + */ + _onTriggerClick: function() { + if(ms.isDisabled() === false && !(cfg.expandOnFocus === true && _selection.length === cfg.maxSelection)) { + $(ms).trigger('triggerclick', [ms]); + if(cfg.expanded === true) { + ms.collapse(); + } else { + var curLength = ms.getRawValue().length; + if(curLength >= cfg.minChars){ + ms.input.focus(); + ms.expand(); + } else { + self._updateHelper(cfg.minCharsRenderer.call(this, cfg.minChars - curLength)); + } + } + } + }, + + /** + * Triggered when the browser window is resized + * @private + */ + _onWindowResized: function() { + self._renderSelection(); + } + }; + + // startup point + if(element !== null) { + self._render(element); + } + }; + + $.fn.magicSuggest = function(options) { + var obj = $(this); + + if(obj.size() === 1 && obj.data('magicSuggest')) { + return obj.data('magicSuggest'); + } + + obj.each(function(i) { + // assume $(this) is an element + var cntr = $(this); + + // Return early if this element already has a plugin instance + if(cntr.data('magicSuggest')){ + return; + } + + if(this.nodeName.toLowerCase() === 'select'){ // rendering from select + options.data = []; + options.value = []; + $.each(this.children, function(index, child){ + if(child.nodeName && child.nodeName.toLowerCase() === 'option'){ + options.data.push({id: child.value, name: child.text}); + if($(child).attr('selected')){ + options.value.push(child.value); + } + } + }); + } + + var def = {}; + // set values from DOM container element + $.each(this.attributes, function(i, att){ + def[att.name] = att.name === 'value' && att.value !== '' ? JSON.parse(att.value) : att.value; + }); + + var field = new MagicSuggest(this, $.extend([], $.fn.magicSuggest.defaults, options, def)); + cntr.data('magicSuggest', field); + field.container.data('magicSuggest', field); + }); + + if(obj.size() === 1) { + return obj.data('magicSuggest'); + } + return obj; + }; + + $.fn.magicSuggest.defaults = {}; +})(jQuery); diff --git a/src/web/scripts/scorecard/dashboard.js b/src/web/scripts/scorecard/dashboard.js deleted file mode 100644 index 2f093a2a1..000000000 --- a/src/web/scripts/scorecard/dashboard.js +++ /dev/null @@ -1,604 +0,0 @@ -/** - * Copyright (C) 2011 - 2014 TopCoder Inc., All Rights Reserved. - * - * The JS script for scorecard. - * - * Version 2.0 - TCCC-4119 - scorecard - update right side bar - * - Created document header. - * - Modified scorecard right side bar to match direct application right side bar. - * - * Version 2.1 (Release Assembly - TC Group Management and Scorecard Tool Rebranding) - * - Reskin the scorecard pages - * - * @author pvmagacho, GreatKevin - * @version 2.1 - */ - -jQuery.fn.outerHTML = function () { - return jQuery('
    ').append(this.eq(0).clone()).html(); -}; - -(function ($) { - $.fn.ellipsis = function () { - return this.each(function () { - var el = $(this); - - if (el.css("overflow") == "hidden") { - var text = el.html(); - var multiline = el.hasClass('multiline'); - var t = $(this.cloneNode(true)) - .hide() - .css('position', 'absolute') - .css('overflow', 'visible') - .width(multiline ? el.width() : 'auto') - .height(multiline ? 'auto' : el.height()) - ; - - el.after(t); - - function height() { - return t.height() > el.height(); - }; - function width() { - return t.width() > el.width(); - }; - - var func = multiline ? height : width; - - while (text.length > 0 && func()) { - text = text.substr(0, text.length - 1); - t.html(text + "..."); - } - - el.html(t.html()); - t.remove(); - } - }); - }; -})(jQuery); - -function populateRecentProjects(data) { - - if (data && data.length > 0) { - - $("#recentProjectsTopNav").show(); - - $("#recentProjectsTopNav .recentProjectsFlyout li").remove(); - - var currentProjectId = $("input[name=topNavCurrentProjectId]").val(); - var hasNotCurrentContests = false; - - $.each(data, function (index, pItem) { - - if (pItem.accessItemId == currentProjectId) { - return; - } - var a = $('
  • ').html($("#recentProjectItemTemplate").html()); - - // set project name - a.find("a.recentProjectName").html('' + pItem.itemName + '').attr('title', pItem.itemName).addClass("ellipsis"); - a.find("a.recentProjectOverview").attr('href', - '/direct/projectOverview.action?formData.projectId=' + pItem.accessItemId); - a.find("a.recentProjectPlan").attr('href', - '/direct/ProjectJsGanttGamePlanView.action?formData.projectId=' + pItem.accessItemId); - a.find("a.recentProjectSetting").attr('href', - '/direct/editProject.action?formData.projectId=' + pItem.accessItemId); - $("#recentProjectsTopNav .recentProjectsFlyout").append(a); - hasNotCurrentContests = true; - }); - - if(!hasNotCurrentContests) { - $("#recentProjectsTopNav").hide(); - } - - } else { - // no data, hide recent projects - $("#recentProjectsTopNav").hide(); - } -} - - - -$(document).ready(function(){ - - /*-------------------------- Show/hide the dropdown list --*/ - - showHideList = function(){ - $("#dropDown1").slideToggle(100); - $("#sortTableBy").toggle(); - } - - - - /*----------------- this function is for demonstration purpose, it will show some contests on the contests list --*/ - showContestsDemo = function(){ - var curr = 0; - $("TABLE#contestsTable TBODY TR").each(function(){ - if( curr > 2 ) - $(this).addClass("hide"); - - curr++; - }); - } - - - /*-------------------------------------------------------------- Popup -----------------*/ - - var prevPopup = null; - showPopup = function(myLink,myPopupId){ - var myLinkLeft = myLinkTop = 0; - - /* hide the previous popup */ - if( prevPopup ) - $(prevPopup).css("display","none"); - - prevPopup = $('#'+myPopupId); - - /* get the position of the current link */ - do{ - myLinkLeft += myLink.offsetLeft; - myLinkTop += myLink.offsetTop; - }while( myLink = myLink.offsetParent ); - - /* set the position of the popup */ - var popUpHeight2 = $('#'+myPopupId).height()/2; - - myLinkTop -= popUpHeight2; - - $('#'+myPopupId).css("top",myLinkTop+'px'); - $('#'+myPopupId).css("left",( myLinkLeft + 50 )+'px'); - - /* set the positio of the arrow inside the popup */ - $(".tooltipContainer SPAN.arrow").css("top",popUpHeight2+'px'); - - /* show the popup */ - $('#'+myPopupId).css("display","block"); - - } - - /* if the user click the next of prev link of the calendar we will hide the popups */ - $(".fc-button-prev a").click(function(){ - $(prevPopup).css('display','none'); - }); - - $(".fc-button-next a").click(function(){ - $(prevPopup).css('display','none'); - }); - - /*------------------------------------------------------------------------------------------*/ - - /*----------------- tabs4 navigation -*/ - showHideTabs = function(myLink, myContainerId, myTabsIndex){ - /* myLink: the clicked link - myContainerID: the id of the tabs container - myTabsIndex: the index num of the tab */ - - // get the first "ul" parent - // the html structure is as fellow:
    - var ULparent = $(myLink).parents()[1]; - var curr_link = 0; - - $($(ULparent).children()).each(function(){ //add the "on" class to the parent (li) of the clicked link - - if( myTabsIndex == curr_link ){ - $(this).addClass("on"); - }else{ - $(this).removeClass("on"); - } - - curr_link++; - - }); - - var current_tab = 0; - $($("#"+myContainerId).children()).each(function(){ // show the tab with the index myTabsIndex and hide the others - - if( current_tab == myTabsIndex ){ - $(this).css('display','block'); - }else{ - $(this).css('display','none'); - } - - current_tab++; - - }) - } - - /*--------------------------------------- Show/Hide group users (the table on the permissions tab ) --*/ - showHideGroup = function(myLink, rowClass){ - /* myLink: the clicked link - rowClass: the class name of the group */ - - /* change the link ico */ - if( myLink.className.search("expand") != -1 ){ - $(myLink).removeClass("expand"); - $(myLink).addClass("collapse"); - }else{ - $(myLink).removeClass("collapse"); - $(myLink).addClass("expand"); - } - - - $("."+rowClass).toggle(); - } - - /*--------------------------------------- Show/Hide group users (the table on the permissions tab ) --*/ - showHideGroup2 = function(myLink, rowClass){ - /* myLink: the clicked link - rowClass: the class name of the group */ - - /* change the link ico */ - var $kid = $(myLink).children(); - if( $kid.hasClass("expand")){ - $kid.removeClass("expand"); - $kid.addClass("collapse"); - }else{ - $kid.removeClass("collapse"); - $kid.addClass("expand"); - } - - $("."+rowClass).toggle(); - } - - /*--------------------------------------- Hide group users (the table on the permissions tab ) --*/ - hideGroup = function(group, rowClass){ - /* myLink: the clicked link - rowClass: the class name of the group */ - - /* change the link ico */ - $("."+group).removeClass("collapse"); - $("."+group).addClass("expand"); - - - $("."+rowClass).hide(); - } - /*--------------------------------------- Show group users (the table on the permissions tab ) --*/ - showGroup = function(group, rowClass){ - /* myLink: the clicked link - rowClass: the class name of the group */ - - /* change the link ico */ - - $("."+group).removeClass("expand"); - $("."+group).addClass("collapse"); - - $("."+rowClass).show(); - } - - /*--------------------------------------- Show/Hide spec review question (on the spec review tab ) --*/ - showHideDiv = function(div_to_show, div_to_hide){ - $('#'+div_to_show).show(); - $('#'+div_to_hide).hide(); - } - - /*--------------------------------------- Change the comment according to the input text --*/ - displayComment = function(commentId, inputId){ - $('#'+commentId).html($('#'+inputId+' textarea').val()); - } - - $('.textarea1 textarea').click(function(){ - if ($(this).val() == 'Input your comment...') { - $(this).html(''); - } - }).blur(function() { - if ($(this).val() == '') { - $(this).html('Input your comment...'); - } - }); - - /*--------------------------------------- Image button hover effect --*/ - $("div.comment_specreview a").hover(function(){ - $("img.sr_editcomment", this).attr("src", "images/edit_red.png"); - }, function() { - $("img.sr_editcomment", this).attr("src", "images/edit.png"); - }); - - $("div.to_add_your_comment a").hover(function(){ - $("img.sr_addcomment", this).attr("src", "images/add_your_comment_hover.png"); - }, function() { - $("img.sr_addcomment", this).attr("src", "images/add_your_comment.png"); - }); - - /*-------------------------------------- Check/uncheck all checkboxes functionnality --*/ - checkAll = function(myCheckbox, myContainerId){ - /* myCheckbox: the "select all" check box - myContainerId: the id of the container of the checkboxes */ - - $("#"+myContainerId+" input.selectUser").each(function(){ - if( myCheckbox.checked ) - this.checked = true; - else - this.checked = false; - }); - } - - /*------------------------------ w/search ---*/ - var prev_result = null; - showResults = function(mySelect, containerId){ - - $("#"+containerId).css('display','block'); - - if( prev_result ) - $(prev_result).css('display','none'); - - var result_container_id = mySelect[0].options[mySelect[0].selectedIndex].value; - $("#"+result_container_id).css('display','block'); - - prev_result = $("#"+result_container_id); - - } - - /*-------------------------------------------------------------------------*/ - /* add zebra stripping for projectStats tables */ - $('table.contests tbody tr:odd').addClass('even'); - - $('a.clearDataFind').live('click', function(){ - resetForm('find'); - }); - - showHide = function(rowClass){ - $("."+rowClass).toggle(); - } - - $('a.button6.apply').live('click', function(){ - - /* change the link ico */ - $('.collapse').addClass("expand").removeClass("collapse"); - - $('.roundedBox').toggle(); - showHide('apply'); - }); - - /*help center widget tab function*/ - $(".darkenBtn,#helpCenterWidget h6").css("text-shadow", "0 -1px 1px #221d1a"); - - $("#helpCenterWidget .tabList li a.tab").click(function() { - $("#helpCenterWidget .tabContent").hide(); - $(this).addClass("actived"); - $(this).parent("li").siblings("li").children("a.tab").removeClass("actived"); - switch ($(this).attr("id")) { - case "FAQTab": - $("#FAQTabContent").show(); - break; - case "videoTab": - $("#videoTabContent").show(); - break; - case "tutorialTab": - $("#tutorialTabContent").show(); - break; - case "exampleTab": - $("#exampleTabContent").show(); - break; - case "moreTab": - $(".tab").hide(); - $(".tabMore,#exampleTab").css("display", "inline-block"); - $("#exampleTabContent").show(); - $("#exampleTab").addClass("actived"); - break; - default: - break; - } - }); - $("#helpCenterWidget .tabList li a#lessTab").click(function() { - $("#moreTab").removeClass("actived"); - $(".tab").show(); - $("#exampleTabContent").hide(); - $("#exampleTab").removeClass("actived"); - $(".tabMore,#exampleTab").css("display", "none"); - $("#FAQTabContent").show(); - $("#FAQTab").addClass("actived"); - - }); - - var ua = navigator.userAgent.toLowerCase(); - - // FF 3 - if(ua.match(/firefox\/([\d.]+)/)!=null && ua.match(/firefox\/([\d.]+)/)[1].split('.')[0]>2){ - $("#helpCenterWidget ul.tabList a#moreTab,#helpCenterWidget ul.tabList a#lessTab").css("padding","0 14px"); - $(".dashboardPage #helpCenterWidget .tabContent").css({"position":"relative","top":"-5px"}); - $(".dashboardPage #helpCenterWidget ul.tabList a#moreTab,.dashboardPage #helpCenterWidget ul.tabList a#lessTab").css("padding","0 12px"); - } - // FF 4 - if(ua.match(/firefox\/([\d.]+)/)!=null && ua.match(/firefox\/([\d.]+)/)[1].split('.')[0]>3){ - $("#helpCenterWidget ul.tabList a#moreTab,#helpCenterWidget ul.tabList a#lessTab").css("padding","0 14px"); - $(".dashboardPage #helpCenterWidget .tabContent").css({"position":"relative","top":"-6px"}); - $(".dashboardPage #helpCenterWidget ul.tabList a#moreTab,.dashboardPage #helpCenterWidget ul.tabList a#lessTab").css("padding","0 13px"); - } - - // IE 7 - if ($.browser.msie && $.browser.version == 7.0) { - $(".contestsContent").css("overflow-x", "hidden"); - } - - $.ajax({ - type: 'POST', - url: '/direct/getCurrentUserRecentProjects', - dataType: "json", - cache: false, - async: false, - success: function (jsonResult) { - handleJsonResult2(jsonResult, - function (result) { - userRecentProjects = result; - populateRecentProjects(result); - $(this).find(".flyout:eq(0)").show(); - $(this).addClass("on"); - $(this).next().addClass("noBg"); - }, - function (errorMessage) { - showServerError(errorMessage); - }); - } - }); - - - (function (newHeader) { - newHeader.find(".topMenu .menus li").hover(function(){ - $(this).find(".flyout:eq(0)").show(); - $(this).addClass("on"); - $(this).next().addClass("noBg"); - $(this).find(".flyout:eq(0)").find(".ellipsis").ellipsis().parent().append(''); - },function(){ - $(this).find(".flyout:eq(0)").hide(); - $(this).removeClass("on"); - $(this).next().removeClass("noBg"); - }); - newHeader.find(".mainMenu .menus li").hover(function () { - $(this).find(".flyout").show(); - $(this).addClass("on"); - }, function () { - $(this).find(".flyout").hide(); - $(this).removeClass("on"); - }); - - newHeader.find(".flyout a").click(function () { - $(this).closest(".flyout").hide(); - return true; - }); - })($("#newHeader")); - - // functions for newSidebar - (function(sidebar){ - sidebar.find(".switchBtn").click(function(){ - $("#mainContent").toggleClass("newSidebarCollapse"); - $(window).trigger("resize"); - return false; - }); - sidebar.find(".sideBox dt").click(function(){ - $(this).closest(".sideBox").toggleClass("collapse"); - return false; - }) - - })($(".newSidebar")); - -}); - -function resetForm(className) { - $('.'+className).each(function(){ - this.reset(); - }); -} - - -/* new code for Release Assembly - TC Cockpit Enterprise Dashboard Update Assembly 1 - add ajax preloader functions */ -var intPreloaderTimmer = 20000; //timer -var strTip = "Loading..."; //string for preloader -var objPreloaderTimmer; //timer for modal -var floatOverlayOpacity = 0.6; //opacity for modal Background - -(function($) { - - /* position modal */ - modalPosition = function(){ - var wWidth = window.innerWidth; - var wHeight = window.innerHeight; - - if (wWidth==undefined) { - wWidth = document.documentElement.clientWidth; - wHeight = document.documentElement.clientHeight; - } - - var boxLeft = parseInt((wWidth / 2) - ( $("#new-modal").width() / 2 )); - var boxTop = parseInt((wHeight / 2) - ( $("#new-modal").height() / 2 )); - - // position modal - $("#new-modal").css({ - 'margin': boxTop + 'px auto 0 ' + boxLeft + 'px' - }); - - $("#modalBackground").css("opacity", floatOverlayOpacity); - - if ($("body").height() > $("#modalBackground").height()){ - $("#modalBackground").css("height", $("body").height() + "px"); - } - } - - /* close modal */ - modalClose = function() { - $('#modalBackground').hide(); - $('#new-modal #preloaderModal').hide(); - } - - modalAllClose = function() { - $('#modalBackground').hide(); - $('#new-modal .outLay').hide(); - } - - - /** - * Close the add new project modal window. - */ - modalCloseAddNewProject = function() { - $('#modalBackground').hide(); - $('#new-modal #addNewProjectModal').hide(); - } - - - /* load modal (string itemID )*/ - modalLoad = function(itemID) { - modalClose(); - $('#modalBackground').show(); - - // setTimeout($("#loadingImg").attr('src', '/images/preloader-loadingie.gif?time=23213213213'), 50000); - - $(itemID).show(); - - modalPosition(); - - } - - - /* - * Function modalPreloader - * - * string itemID e.g. #preloaderModal - * string strMarginTop e.g. 40px - * object callback e.g. function(){} - * - */ - modalPreloader = function(itemID,strMarginTop,callback){ - -// if($.browser.msie) { -// $('#new-modal #preloaderModal').remove(); -// } - - - if($('#new-modal #preloaderModal').length == 0){ - var preloaderHtml = ''; - preloaderHtml += '
    '; - preloaderHtml += '
    '; - preloaderHtml += '
    '; - preloaderHtml += '
    '; - preloaderHtml += '
    '; - - preloaderHtml += '
    '; - preloaderHtml += 'Loading'; - preloaderHtml += '
    '; - preloaderHtml += strTip; - preloaderHtml += '
    '; - - preloaderHtml += '
    '; - preloaderHtml += '
    '; - preloaderHtml += '
    '; - preloaderHtml += '
    '; - preloaderHtml += '
    '; - - $('#new-modal').append(preloaderHtml); - } - - modalLoad('#preloaderModal'); - - } - - $('#new-modal .outLay .closeModal').live('click', function(){ - modalAllClose(); - return false; - }); - - $('#new-modal .outLay .closeProjectModal').live('click', function(){ - modalCloseAddNewProject(); - return false; - }); - - -})(jQuery); diff --git a/src/web/scripts/scorecard/launchcontest.js b/src/web/scripts/scorecard/launchcontest.js deleted file mode 100644 index 964300c4b..000000000 --- a/src/web/scripts/scorecard/launchcontest.js +++ /dev/null @@ -1,610 +0,0 @@ -// JavaScript Document -$(document).ready(function(){ - - $("#software").change(function(){ - var value = $(this).val(); - if(value == "Software Conceptualization" || value=="Software Specification" || value=="Architecture" || value=="Component Design"||value== - "Component Development" || value=="RIA Component"||value=="RIA Build"||value=="UI Prototype"||value=="Software Assembly"|| - value=="Test Suites"||value=="Test Scenarios") - { - $("#checkpoint").css("display","none"); - $("#end").css("display","none"); - $("#type").css("display","none"); - $(".schedule").css("height","70px"); - $(".schedule").css("margin-bottom","105px"); - } - else{ - $("#checkpoint").css("display","block"); - $("#end").css("display","block"); - $("#type").css("display","block"); - $(".schedule").css("height","165px"); - $(".schedule").css("margin-bottom","0px"); - } - - }); - - $("#software").change(function(){ - var value = $(this).val(); - if(value == "Software Conceptualization" || value=="Software Specification" || value=="Architecture" || value=="Component Design"||value== - "Component Development" || value=="RIA Component"||value=="RIA Build"||value=="UI Prototype"||value=="Software Assembly"|| - value=="Test Suites"||value=="Test Scenarios") - { - $("#cca").css("display","block"); - } - else{ - $("#cca").css("display","none"); - } - }); - - $("#hide").click(function(){ - - $("#info").css("display","none"); - $(".prizesInner_software").css("height","150px"); - - }); - - $('#add').click(function() { - return !$('#select1 option:selected').remove().appendTo('#select2'); - }); - - $('#remove').click(function() { - return !$('#select2 option:selected').remove().appendTo('#select1'); - }); - - $('#add_categories').click(function() { - return !$('#select1_categories option:selected').remove().appendTo('#select2_categories'); - }); - - $('#remove_categories').click(function() { - return !$('#select2_categories option:selected').remove().appendTo('#select1_categories'); - }); - - $('#catalogSelect').change(function() { - if ($(this).val() == 'Net') { - $('#select1_categories').children().remove().end().append(''); - $('#select2_categories').children().remove(); - } else if ($(this).val() == 'Java') { - $('#select1_categories').children().remove().end().append(''); - $('#select2_categories').children().remove(); - } else if ($(this).val() == 'Flex') { - $('#select1_categories').children().remove().end().append(''); - $('#select2_categories').children().remove(); - } else if ($(this).val() == 'C++') { - $('#select1_categories').children().remove().end().append(''); - $('#select2_categories').children().remove(); - } - }); - - $("#continue").click(function(){ - var value = $("#software").val(); - if(value == "Software Conceptualization" || value=="Software Specification" || value=="Architecture" || value=="Component Design"||value== - "Component Development" || value=="RIA Component"||value=="RIA Build"||value=="UI Prototype"||value=="Software Assembly"|| - value=="Test Suites"||value=="Test Scenarios") - { - window.location = 'launch-contest-details-software.html'; - } - else{ - window.location = 'launch-contest-details.html'; - - - } - - }); - - $(".contest_type_edit").css("display","none"); - $(".edit_type").click(function(){ - $(".contest_type").css("display","none"); - $(".contest_type_edit").css("display","block"); - }); - - $(".save_btn").click(function(){ - - $(".contest_type").css("display","block"); - $(".contest_type_edit").css("display","none"); - - }); - $(".cancel_text").click(function(){ - - $(".contest_type").css("display","block"); - $(".contest_type_edit").css("display","none"); - - }); - - - - $(".contest_prize_edit").css("display","none"); - $(".edit_prize").click(function(){ - - $(".contest_prize").css("display","none"); - $(".contest_prize_edit").css("display","block"); - - }); - - $(".save_btn_prize").click(function(){ - - $(".contest_prize").css("display","block"); - $(".contest_prize_edit").css("display","none"); - - }); - $(".cancel_text_prize").click(function(){ - - $(".contest_prize").css("display","block"); - $(".contest_prize_edit").css("display","none"); - - }); - - - - $(".contest_round_edit").css("display","none"); - $(".edit_round").click(function(){ - - $(".contest_round").css("display","none"); - $(".contest_round_edit").css("display","block"); - - }); - - $(".save_btn_round").click(function(){ - - $(".contest_round").css("display","block"); - $(".contest_round_edit").css("display","none"); - - }); - $(".cancel_text_round").click(function(){ - - $(".contest_round").css("display","block"); - $(".contest_round_edit").css("display","none"); - - }); - - - - $(".contest_spec_edit").css("display","none"); - $(".edit_spec").click(function(){ - - $(".contest_spec").css("display","none"); - $(".contest_spec_edit").css("display","block"); - - }); - - $(".save_btn_spec").click(function(){ - - $(".contest_spec").css("display","block"); - $(".contest_spec_edit").css("display","none"); - - }); - $(".cancel_text_spec").click(function(){ - - $(".contest_spec").css("display","block"); - $(".contest_spec_edit").css("display","none"); - - }); - - - $(".contest_files_edit").css("display","none"); - $(".edit_files").click(function(){ - - $(".contest_files").css("display","none"); - $(".contest_files_edit").css("display","block"); - - }); - - $(".save_btn_files").click(function(){ - - $(".contest_files").css("display","block"); - $(".contest_files_edit").css("display","none"); - - }); - $(".cancel_text_files").click(function(){ - - $(".contest_files").css("display","block"); - $(".contest_files_edit").css("display","none"); - - }); - - - - $("#single-multi").change(function(){ - var value=$(this).val(); - if(value == "Challenge will be run in single-rounds") - { - $("#checkpoint").css("display","none"); - $(".schedule").css("height","150px"); - } - else { - $("#checkpoint").css("display","block"); - $(".schedule").css("height","165px"); - } - - }); - - - // Drop Down Select Project - $(".dropdown dt a").click(function() { - $(".dropdown dd ul").toggle(); - return false; - }); - - $(".dropdown dd ul li a").click(function() { - var text = $(this).html(); - $(".dropdown dt a span").html(text); - $(".dropdown dd ul").hide(); - $("#result").html("Selected value is: " + getSelectedValue("sample")); - return false; - }); - - function getSelectedValue(id) { - return $("#" + id).find("dt a span.value").html(); - } - - $(document).bind('click', function(e) { - var $clicked = $(e.target); - if (! $clicked.parents().hasClass("dropdown")) - $(".dropdown dd ul").hide(); - }); - - // Drop Down Sort Contests - $(".dropdown2 dt a").click(function() { - $(".dropdown2 dd ul").toggle(); - return false; - }); - - $(".dropdown2 dd ul li a").click(function() { - var text = $(this).html(); - $(".dropdown2 dt a span").html(text); - $(".dropdown2 dd ul").hide(); - $("#result").html("Selected value is: " + getSelectedValue("sample2")); - $('#scrollbar-wrapper').jScrollPane({showArrows:true, scrollbarWidth: 17}); - return false; - }); - - function getSelectedValue(id) { - return $("#" + id).find("dt a span.value2").html(); - } - - $(document).bind('click', function(e) { - var $clicked = $(e.target); - if (! $clicked.parents().hasClass("dropdown2")) - $(".dropdown2 dd ul").hide(); - }); - - // Drop Down Search - $(".dropdown3 dt a").click(function() { - $(".dropdown3 dd ul").toggle(); - return false; - }); - - $(".dropdown3 dd ul li a").click(function() { - var text = $(this).html(); - $(".dropdown3 dt a span").html(text); - $(".dropdown3 dd ul").hide(); - $("#result").html("Selected value is: " + getSelectedValue("sample")); - return false; - }); - - function getSelectedValue(id) { - return $("#" + id).find("dt a span.value3").html(); - } - - $(document).bind('click', function(e) { - var $clicked = $(e.target); - if (! $clicked.parents().hasClass("dropdown3")) - $(".dropdown3 dd ul").hide(); - }); - - $("a.link-sort").click(function() { - var toLoad = $(this).attr('href'); - $('#scrollbar-wrapper div').hide('fast',loadContent); - $('#load').remove(); - $('#scrollbar-wrapper div').append('
    '); - $('#load').fadeIn('slow'); - window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-5); - function loadContent() { - $('#scrollbar-wrapper div').load(toLoad,'',showNewContent()); - } - function showNewContent() { - $('#scrollbar-wrapper div').show(0.001,hideLoader()); - } - function hideLoader() { - $('#load').fadeOut('slow'); - } - }); - - - $("#expand-table").click(function() { - $("#collapse-table").show(); - $(".row-hide").slideDown(0.0001); - $(this).hide(); - return false; - }); - - $("#collapse-table").click(function() { - $("#expand-table").show(); - $(".row-hide").slideToggle(0.0001); - $(this).hide(); - return false; - }); - - $('#scrollbar-wrapper').jScrollPane({showArrows:true, scrollbarWidth: 17}); - $(".table-sidebar tr:odd").addClass("alt"); - $(".table-summary-content tr:even").addClass("alt"); - $("#collapse-table").hide(); - $(".row-hide").slideToggle(0.0001); - $("#wb-1").hide(); - $("#wb-2").hide(); - - $(".greentext").click(function() { - $("#wb-1").fadeTo("slow", 1.0); - return false; - }); - - $(".redtext").click(function() { - $("#wb-2").fadeTo("slow", 1.0); - return false; - }); - - $("a.btn-list").hover(function() { - var $next = $(this).next(".dialog-mini-wrapper"); - $next.css("display", "block"); - $next.hover(function() { - $next.css("display", "block"); - },function() { - $next.css("display", "none"); - }); - },function() { - var $next = $(this).next(".dialog-mini-wrapper"); - $next.css("display", "none"); - }); - /* init select */ - if($('select').length > 0){ - $('.selectSoftware select,.selectDesign select,.catalogSelect select,.roundelect select,.startSelect select,.checkpointSelect select,.endSelect select,.startEtSelect select,.checkpointEtSelect select,.endEtSelect select,.numSelect select, .cardSelect select, .selectMonth select, .selectYear select').sSelect(); - - $('.projectSelect select').sSelect({ddMaxHeight: '200px'}); - - $('.billingSelect select').sSelect({ddMaxHeight: '200px'}); - - $('.selectDesign div.selectedTxt').html('Select Challenge Type'); - - $('.startEtSelect select').focus(); - } - - /* Optgroup 2 columns fix */ - if($('.selectDesign optgroup, .selectDesign .newListOptionTitle').length > 0){ - var optgroupMaxHeight = 0, num; - - $('.selectDesign optgroup').each(function(){ - num = $(this).children().length + 1; - optgroupMaxHeight = num * 22 > optgroupMaxHeight ? num * 22 : optgroupMaxHeight; - }); - - $('.selectDesign .newList').css('height', optgroupMaxHeight + 'px'); - - $(window).resize(function(){$('.selectDesign .newList').css('height', optgroupMaxHeight + 'px');}); - $(window).scroll(function(){$('.selectDesign .newList').css('height', optgroupMaxHeight + 'px');}); - } - - /* init date-pack */ - if($('.date-pick').length > 0){ - $(".date-pick").datePicker().val(new Date().asString()).trigger('change'); - } - - /* init tab **/ - $('#tab li').click(function(){ - - $('#tab li a').removeClass('current'); - $(this).find('a').addClass('current'); - if($(this).attr('class') == 'top'){ - $('.selectDesign').show(); - $('.selectSoftware').addClass('visibility'); - }else{ - $('.selectDesign').hide(); - $('.selectSoftware').removeClass('visibility'); - } - - }); - - /* init pop */ - var prevPopup = null; - showPopup = function(myLink,myPopupId){ - var myLinkLeft = myLinkTop = 0; - - /* hide the previous popup */ - if( prevPopup ) - $(prevPopup).css("display","none"); - - prevPopup = $('#'+myPopupId); - - /* get the position of the current link */ - do{ - myLinkLeft += myLink.offsetLeft; - myLinkTop += myLink.offsetTop; - }while( myLink = myLink.offsetParent ); - - /* set the position of the popup */ - var popUpHeight2 = $('#'+myPopupId).height()/2; - - myLinkTop -= popUpHeight2; - - $('#'+myPopupId).css("top",(myLinkTop+4)+'px'); - $('#'+myPopupId).css("left",( myLinkLeft+22 )+'px'); - - /* set the positio of the arrow inside the popup */ - $(".tooltipContainer SPAN.arrow").css("top",popUpHeight2+'px'); - - /* show the popup */ - $('#'+myPopupId).css("display","block"); - - } - - var prevPopups = null; - showPopups = function(myLinks,myPopupIds){ - var myLinkLefts = myLinkTops = 0; - - /* hide the previous popup */ - if( prevPopups ) - $(prevPopups).css("display","none"); - - prevPopups = $('#'+myPopupIds); - - /* get the position of the current link */ - do{ - myLinkLefts += myLinks.offsetLeft; - myLinkTops += myLinks.offsetTop; - }while( myLinks = myLinks.offsetParent ); - - /* set the position of the popup */ - var popUpHeight2s = $('#'+myPopupIds).height()/2; - - myLinkTops -= popUpHeight2s; - - $('#'+myPopupIds).css("top",(myLinkTops+4)+'px'); - $('#'+myPopupIds).css("left",( myLinkLefts+104 )+'px'); - - /* set the positio of the arrow inside the popup */ - $(".tooltipContainer SPAN.arrow").css("top",popUpHeight2s+'px'); - - /* show the popup */ - $('#'+myPopupIds).css("display","block"); - - } - - $('.description .helpIcon').hover(function(){ - showPopup(this,'contestLaunch1'); - },function(){ - $('#contestLaunch1').hide(); - }); - - - - $('.selectDesign .help,.selectSoftware .help').hover(function(){ - showPopups(this,'contestLaunch1'); - },function(){ - $('#contestLaunch1').hide(); - }); - - $('.mPrizes .helpIcon').hover(function(){ - showPopup(this,'contestLaunch2'); - },function(){ - $('#contestLaunch2').hide(); - }); - - $('.deliverables .helpIcon').hover(function(){ - showPopup(this,'contestLaunch3'); - },function(){ - $('#contestLaunch3').hide(); - }); - - $('.TB_overlayBG').css("opacity", "0.6"); - $('#TB_HideSelect').css("opacity", "0"); - $('#TB_overlay').hide(); - /* init help */ - $('.helloUser .help,.tabContest .moreLink,.help .helpIcon, .helpme').click(function(){ - $('#TB_overlay').show(); - $('#TB_window').show(); - $('.TB_overlayBG').css('height',document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight); - $('#TB_window').css({ - 'margin': '0 auto 0 ' + parseInt((document.documentElement.clientWidth / 2) - ($("#TB_window").width() / 2)) + 'px' - }); - $('#placeHolder').hide(); - $('#TB_ajaxContent').show(); - }); - - $('.specrev-goto').click(function(){ - $('#TB_overlay').show(); - $('#TB_window_custom').show(); - $('.TB_overlayBG').css('height',document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight); - $('#TB_window_custom').css({ - //'margin': '0 auto 0 ' + parseInt((document.documentElement.clientWidth / 2) - ($("#TB_window_custom").width() / 2)) + 'px' - 'left' : $(window).width() / 2-$('#TB_window_custom').width() / 2, - 'top' : ($(window).height() / 2-$('#TB_window_custom').height() / 2) + $(window).scrollTop() - }); - }); - $('#TB_window_custom').scrollFollow({offset: parseInt((document.documentElement.clientHeight / 2) - (parseInt($("#TB_window_custom").css('height')) / 2))}); - - $('.conditions').click(function(){ - $('#TB_overlay').show(); - $('#TB_window').show(); - $('.TB_overlayBG').css('height',document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight); - $('#TB_window').css({ - 'margin': '0 auto 0 ' + parseInt((document.documentElement.clientWidth / 2) - ($("#TB_window").width() / 2)) + 'px' - }); - $('#placeHolder').show(); - $('#TB_ajaxContent').hide(); - }); - - $('#TB_closeWindowButton').click(function(){ - $('#TB_overlay').hide(); - $('#TB_window').hide(); - }); - - $('#addNewProject').click(function(){ - if($("#.projectSelect .newListSelected").is( ":hidden ")){ - $('.projectSelect .newListSelected').show(); - $('.projectSelect .text').hide(); - $(this).find('.right').text('ADD NEW'); - }else{ - $('.projectSelect .newListSelected').hide(); - $('.projectSelect .text').show(); - $(this).find('.right').text('SELECT EXISTING'); - } - }); - - /* add button */ - $('.uploadInner .addButton').click(function(){ - - $(this).parent().after(''); - }); - - $('.addButton').click(function(){ - var a = $(this).parent().parent().find('.uploadInner').length; - a=a+1; - - - $('
    '+a+'.   CHOOSE... deleteDelete
    ').appendTo('.upload'); - }); - - $('.uploadInner .removeButton').click(function(){ - if($(this).parent().parent().find('.uploadInner').length > 1){ - $(this).parent().parent().find('.uploadInner:last').remove(); - } - }); - - $('.removeButton').click(function(){ - if($(this).parent().parent().find('.uploadInner').length > 1){ - $(this).parent().parent().find('.uploadInner:last').remove(); - } - }); - - $('.prizesInner .addButton').click(function(){ - if($(this).parent().parent().find('.prizesInner').eq(1).is( ":hidden ")){ - $(this).parent().parent().find('.prizesInner').eq(1).show(); - $(this).parent().parent().find('.prizesInner').eq(1).css('margin-top','12px'); - }else{ - $(this).parent().parent().find('.prizesInner').eq(2).show(); - $(this).parent().parent().find('.prizesInner').eq(2).css('margin-top','12px'); - } - }); - - - $('.prizesInner .removeButton').click(function(){ - if($(this).parent().parent().find('.prizesInner').length > 0){ - $(this).parent().parent().find('.prizesInner:last').remove(); - } - }); - - $('.fileTypeAdd').click(function(){ - if($('.deliverablesInner .fileInput').length < 3){ - $('.checkInput').append('  '); - } - }); - - - /* bigframe */ - $('#TB_overlay').bgiframe(); - - $('#TB_window').scrollFollow({offset: parseInt((document.documentElement.clientHeight / 2) - (parseInt($("#TB_window").css('height')) / 2))}); - - $(".uploadInner .button6").click(function(){$(".uploadInner .fileIn").trigger("click")}) -}); - - - diff --git a/src/web/scripts/scorecard/right.js b/src/web/scripts/scorecard/right.js deleted file mode 100644 index b287b76cd..000000000 --- a/src/web/scripts/scorecard/right.js +++ /dev/null @@ -1,879 +0,0 @@ -/** - * Copyright (C) 2011 - 2014 TopCoder Inc., All Rights Reserved. - * - * The JS script for scorecard's right side bar. - * - * Version 2.0 - TCCC-4119 - scorecard - update right side bar - * - Created document header. - * - Modified scorecard right side bar to match direct application right side bar. - * - * Version 2.1 (Release Assembly - TC Group Management and Scorecard Tool Rebranding) - * - Reskin the scorecard pages - * - * @author pvmagacho. GreatKevin - * @version 2.1 - */ - -var rightSidebarData = {}; -var currentProjectName = ""; -var contestData; -var isInProjectScope; -var currentProjectContests; -var currentContestsData = []; - -function handleJsonResult2(jsonResult, successCallBack, failureCallBack) { - if(jsonResult.result) { - successCallBack(jsonResult.result['return']); - } else { - failureCallBack(jsonResult.error.errorMessage); - } -} - -var updateContestsTable = function (contestsData, emptyMessage) { - var contests = $(".contestList .contestListMask .tableBody table tbody"); - - if(!contests) { - // there is no right sidebar or there is no contests panel, return - return; - } - - contests.empty(); - - $.each(contestsData, function (i, item) { - var urlPart = "/contest/detail?projectId="; - - if(item.typeName == 'Copilot Posting') { - urlPart = "/copilot/copilotContestDetails?projectId="; - } - - var newRow = $(""); - $("td.leftAlign", newRow).text(item.name); - switch (item.statusShortName) { - case "Running": - $("td:eq(0) span", newRow).attr("class", "running"); - break; - - case "Draft": - $("td:eq(0) span", newRow).attr("class", "draft"); - break; - - case "Completed": - $("td:eq(0) span", newRow).attr("class", "completed"); - break; - - case "Cancelled": - $("td:eq(0) span", newRow).attr("class", "cancelled"); - break; - } - $("td:eq(2) img", newRow).attr("alt", item.typeShortName.toLowerCase()).attr("src", "/images/" - + item.typeShortName.toLowerCase() + "_small.png").attr('title', item.typeName); - - if (i % 2 == 0) { - newRow.removeClass("even"); - } else { - newRow.addClass("even"); - } - newRow.appendTo(contests); - }); - - if (contestsData.length == 0) { - $("" + emptyMessage + "").appendTo(contests); - } - $("#contestsTable:has(tbody tr)").tablesorter(); - $("#contestsTable").trigger("update"); - sortCurrentContestsTable(); -} - -var selectProjectRightSidebar = function (projectId) { - - var list = $("#dropDown1 .dropList"); - if (!list.is(":hidden")) { - list.hide(); - if ($(".projectSelectMask .contestsDropDown UL").height() > 200) { - $(".projectSelectMask .contestsDropDown UL").css('width', 233); - } - } - - currentProjectId = projectId; - var projectName = "Select a project here"; - $(".projectSelectMask .dropList li").each(function () { - if ($(this).data("id") == projectId) { - projectName = $.trim($("a", this).text()); - } - }); - $(".projectSelectMask .inputSelect input").val(projectName); - - if(!projectId || projectId <= 0) { - return; - } - - $.ajax({ - type: 'POST', - url: "/direct/getDirectProjectContests", - data: {directProjectId: projectId}, - cache: false, - dataType: 'json', - success: function (jsonResult) { - handleJsonResult2(jsonResult, - function (contestsData) { - currentContestsData = contestsData; - updateContestsTable(contestsData, "No Contests this project"); - $(".contestList .searchMask input").val('').trigger("keyup"); - }, - function (errorMessage) { - showServerError(errorMessage); - }); - } - }); -} - -// JavaScript Document -$(document).ready(function(){ - - var Sys = {}; - var ua = navigator.userAgent.toLowerCase(); - - - $.ajax({ - url: '/direct/customerProjectsAjaxAction', - async: false, - dataType: 'json', - success: - function(data) { - var returnData = data.result['return']; - rightSidebarData = returnData.projects; - contestData = returnData.contests; - currentProjectName = $.trim(returnData.currentProjectName); - } - }); - - - adjustContestListHeight = function() { - var rows_height = 0; - var contests_nbre = 0; - - /* get the height of the 10 first rows ( one contest per row)*/ - $("#contestsTable TBODY").children().each(function() { - if (contests_nbre < 10) - rows_height += $(this).height(); - contests_nbre++; - }); - - if (contests_nbre > 10) { - $(".contestsContent").height(rows_height); - - // Chrome - if (ua.match(/chrome\/([\d.]+)/) != null && ua.match(/chrome\/([\d.]+)/)[1].split('.')[0] > 2) { - $(".contestsContent").height(rows_height + 20); - } - - // Safari - if (ua.match(/version\/([\d.]+).*safari/) != null && ua.match(/version\/([\d.]+).*safari/)[1].split('.')[0] > 3) { - $(".contestsContent").height(rows_height + 20); - } - - // IE 7 - if ($.browser.msie && $.browser.version == 7.0) { - $(".contestsContent").height(rows_height + 20); - } - - // IE 8 - if ($.browser.msie && $.browser.version == 8.0) { - $(".contestsContent").height(rows_height + 20); - } - - $(".contestsContent TABLE").css("width", "250px"); - - return rows_height + 20; - } else { - $(".contestsContent").css("width", "250px"); - } - - return 0; - } - - //------------------------------------------------- Contests List - - filterProject = function(){ - if ($("#dropDown1").attr("display") == "none") { - showHideProjectList(); - } - var typedText = $(".projectSelectMask .inputSelect>input")[0].value; - - $("#dropDown1>ul>li").each(function() { - if ($(this).find("a")[0].innerHTML.toLowerCase().indexOf(typedText.toLowerCase()) == -1) { - $(this).css('display', 'none'); - } else { - $(this).css('display', ''); - } - }); - } - - showHideProjectList = function(){ - var list = $("#dropDown1 .dropList"); - if(list.is(":hidden")){ - list.show(); - }else{ - list.hide(); - } - - if($(".projectSelectMask .contestsDropDown UL").height() > 200) { - $(".projectSelectMask .contestsDropDown UL").css('width', 233); - } - } - - showHideCustomerList = function(){ - var contestsDropDown = $(".customerSelectMask .contestsDropDown"); - if (contestsDropDown.is(":hidden")) { - $(".customerSelectMask .contestsDropDown").hide(); - } - - var list = contestsDropDown.find("ul"); - if(list.is(":hidden")){ - $(".dropdownWidget .dropList").hide(); - list.show(); - }else{ - list.hide(); - } - //contestsDropDown.slideToggle(100); - } - - $(".customerSelectMask .inputSelect input").focus(function(){ - showHideCustomerList(); - }); - $(".customerSelectMask .inputSelect a").click(function(){ - showHideCustomerList(); - }); - - var updateCustomerDropDown = function(dropDownWrapper,items, customerName){ - var dropDown = dropDownWrapper.find(".contestsDropDown ul"); - var input = dropDownWrapper.find(".inputSelect input"); - dropDown.find("li").remove(); - input.val(""); - $.each(items,function(index,item){ - var li = $("
  • "); - li.data("id",item.id); - li.find("a").text(item.value); - if(customerName == undefined && index == 0){ - input.val(item.value); - } else { - input.val(customerName); - } - li.appendTo(dropDown); - }) - dropDown.find("li:odd").addClass("even"); - } - - var updateProjectDropDown = function(dropDownWrapper,items){ - var dropDown = dropDownWrapper.find(".contestsDropDown ul"); - var input = dropDownWrapper.find(".inputSelect input"); - dropDown.find("li").remove(); - input.val(""); - var hasCurrentProject = false; - $.each(items,function(index,item){ - var li = $("
  • "); - li.data("id",item.id); - li.find("a").text(item.value); - li.appendTo(dropDown); - if($.trim(item.value) == currentProjectName){ - input.val(item.value); - hasCurrentProject = true; - selectProjectRightSidebar(item.id); - } - }) - - if (!hasCurrentProject) input.val("Select a project here"); - - if (typeof isInProjectScope != 'undefined' && !isInProjectScope) { - - if (hasCurrentProject) { - if ((undefined != currentProjectContests) && $("#contestsTable tbody tr").length <= 0) { - $("#contestsTable tbody").html(currentProjectContests); - var newHeight = adjustContestListHeight(); - if (newHeight > 0) { - $(".jScrollPaneContainer").height(newHeight); - } - $('.contestsContent').jScrollPane({ - scrollbarWidth: 17, - showArrows: true - }); - } - } else { - // clear the contests if needed - if ($("#contestsTable tbody tr").length > 0) { - currentProjectContests = $("#contestsTable tbody").html(); - $("#contestsTable tbody").html(''); - $(".jScrollPaneContainer").height(233); - $('.contestsContent').jScrollPane({ - scrollbarWidth: 17, - showArrows: true - }); - } - } - - - } - - dropDown.find("li:odd").addClass("even"); - } - - function compareProject(projectA, ProjectB) { - if (projectA.value.toLowerCase() < ProjectB.value.toLowerCase()) - return -1; - if (projectA.value.toLowerCase() > ProjectB.value.toLowerCase()) - return 1; - return 0; - } - - function compareCustomer(customerA, customerB) { - if (customerA.value.toLowerCase() == 'all customers') return -1; - if (customerB.value.toLowerCase() == 'all customers') return 1; - - if (customerA.value.toLowerCase() < customerB.value.toLowerCase()) - return -1; - if (customerA.value.toLowerCase() > customerB.value.toLowerCase()) - return 1; - return 0; - } - - var getCustomers = function(){ - var arr = [{"id":"","value":"All Customers"}]; - var count = 0; - var noCustomer; - if (typeof rightSidebarData != 'undefined' && rightSidebarData) { - for(var p in rightSidebarData){ - if(typeof(rightSidebarData[p])!="function"){ - count ++; - var obj = new Object(); - obj.value = p; - obj.id = rightSidebarData[p]["id"]; - obj.projects = rightSidebarData[p]["projects"]; - - if (!(obj.id == "none")) { - arr.push(obj); - } else { - noCustomer = obj; - } - } - } - } - - arr.sort(compareCustomer); - - if (undefined != noCustomer) { - arr.push(noCustomer); - } - - if (count == 1) { arr.shift(); } - - return arr; - } - var customerList = getCustomers(); - //updateCustomerDropDown($(".customerSelectMask"), customerList); - - var getCustomerWithProject = function(projectName) { - var result = {}; - - result.id = ''; - result.name = 'All Customers'; - - $.each(customerList, function(index, item) { - var projects = item.projects; - if (!(item.id == '' || item.id == 'none')) { - for (var p in projects) { - if (typeof(projects[p]) != "function") { - var name = projects[p]; - if ($.trim(name) == $.trim(projectName)) { - result.id = item.id; - result.name = item.value; - } - } - } - } - }); - - return result; - } - - var getProjects = function(id){ - var arr = []; - $.each(customerList,function(index,item){ - var projects = item.projects; - if(id == "" || id == "0"){ - for(var p in projects){ - if(typeof(projects[p])!="function"){ - var obj = new Object(); - obj.id = p; - obj.value = projects[p]; - arr.push(obj); - } - } - }else{ - if(item.id == id){ - for(var p in projects){ - if(typeof(projects[p])!="function"){ - var obj = new Object(); - obj.id = p; - obj.value = projects[p]; - arr.push(obj); - } - } - } - } - }); - - arr.sort(compareProject); - - return arr; - } - - if (typeof (currentProjectName) != "undefined" && currentProjectName != '') { - var result = getCustomerWithProject(currentProjectName); - updateCustomerDropDown($(".customerSelectMask"), customerList, result.name); - updateProjectDropDown($(".projectSelectMask"), getProjects(result.id)); - } else { - updateCustomerDropDown($(".customerSelectMask"), customerList); - updateProjectDropDown($(".projectSelectMask"),getProjects("")); - } - - var count = 0; - $("#contestsContent").html(''); - - $.each(contestData, function(key, value){ - var templateData = value; - templateData.i = count++; - - var row = '" + - '' + '' + - '' + templateData.title + '' + - '' + '' + templateData.type + '' + ''; - - $("#contestsContent").append(row); - }); - - - - -/* - $(".customerSelectMask UL LI").click(function() { - var mask = $(this).parents(".customerSelectMask"); - mask.find("input").val($(this).find("a").text()); - mask.find(".contestsDropDown").slideToggle(100); - updateProjectDropDown($(".projectSelectMask"), getProjects($(this).data("id"))); - if ($("#activeContests").length > 0) { - $.activeContestsDataTable.fnFilter($(this).data("id"), 10); - $.activeContestsDataTable.fnSort([ - [3,'desc'] - ]); - var customer = ""; - if ($(this).data("id") != "0" && $(this).data("id") != "") { - customer = $(this).text(); - } - updateBreadcrumb(customer); - } - return false; - }) - */ - - $(".customerSelectMask UL LI").click(function() { - var mask = $(this).parents(".customerSelectMask"); - mask.find("input").val($(this).find("a").text()); - - if (!mask.find(".contestsDropDown .dropList").is(":hidden")) { - mask.find(".contestsDropDown .dropList").hide(); - } - updateProjectDropDown($(".projectSelectMask"), getProjects($(this).data("id"))); - if ($("#activeContests").length > 0) { - $.activeContestsDataTable.fnFilter($(this).data("id"), 10); - $.activeContestsDataTable.fnSort([ - [3,'desc'] - ]); - var customer = ""; - if ($(this).data("id") != "0" && $(this).data("id") != "") { - customer = $(this).text(); - } - updateBreadcrumb(customer); - } - return false; - }) - - /*---------------------- Show the scrollbar when the number of contests is more than 10----*/ - - adjustContestListHeight(); - - /* Stylished scrollbar*/ - $('.contestsContent').jScrollPane({ - scrollbarWidth: 17, - showArrows: true - }); - - /*-------------------------- Show/hide the dropdown list --*/ - - /*------------------------- hover state of the dropdown list --*/ - - $(".contestsDropDown UL LI").live('mouseover', function(){ - $(this).addClass("hover"); - }); - - $(".contestsDropDown UL LI").live('mouseout', function(){ - $(this).removeClass("hover"); - }); - - /*------------------------- hover state of the contests table --*/ - $("table#contestsTable tr").live('mouseover', function(){ - $(this).addClass("highlight"); - }); - - $("table#contestsTable tr").live('mouseout', function(){ - $(this).removeClass("highlight"); - }); - - - /*------------------------- show or hide rows functionnality in dashboard.html --*/ - // we will show just the first rows_nbre rows - $("TABLE.rowsToHide").each(function(){ - - var table_id = $(this).attr("id"); - var hide_row = false; - - $("#"+table_id+" TBODY TR").each(function(){ - - if( this.className.search("hideStart") != -1 ){ - hide_row = true; - } - - if( hide_row ) - $(this).addClass("hide"); - }) - }); - - - /*----------------- projects table hover --*/ - $("table.project TR").mouseover(function(){ - $(this).addClass("hover"); - }); - - $("table.project TR").mouseout(function(){ - $(this).removeClass("hover"); - }); - - - if ($.browser.msie && $.browser.version == 7.0) { - $(".contestsContent").css("overflow-x", "hidden"); - } - - /*------------------------------------------------------------ Calendar --*/ - - - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); - - $('#calendar').fullCalendar({ - header: { - left: 'prev', - center: 'title', - right: 'next' - }, - editable: false, - dayNamesShort: ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'], - events: [ - { - title: 'Challenge Launch', - start: new Date(y, m, 8) - }, - { - title: 'Spec Post', - start: new Date(y, m, 8) - }, - { - title: 'Task', - start: new Date(y, m, 8) - }, - { - title: 'Review Complete', - start: new Date(y, m, 11) - }, - { - title: 'Forum Post', - start: new Date(y, m, 11) - }, - { - title: 'Forum Post', - start: new Date(y, m, 11) - }, - { - title: 'Task', - start: new Date(y, m, 11) - }, - { - title: 'Review Pending', - start: new Date(y, m, 13) - }, - { - title: 'Forum Post', - start: new Date(y, m, 13) - }, - { - title: 'Task', - start: new Date(y, m, 13) - }, - { - title: 'Checkpoint Feed back', - start: new Date(y, m, 17) - }, - { - title: 'Task 1', - start: new Date(y, m, 17) - }, - { - title: 'Task 2', - start: new Date(y, m, 17) - }, - { - title: 'Winner Announcement', - start: new Date(y, m, 20) - } - ] - }); - - - $(".contestList input.selectProjectBtn").click(function () { - if (typeof (currentProjectId) != "undefined" && currentProjectId > 0) { - document.location.href = '/direct/projectOverview?formData.projectId=' + currentProjectId; - } else { - alert('Select a project first'); - } - }); - - $(".contestList .searchMask input").keyup(function () { - var keyword = $.trim($(this).val()).toLowerCase(); - var count = 0; - var filtered = []; - $.each(currentContestsData, function (i, item) { - var found = keyword.length == 0 || - item.statusName.toLowerCase().indexOf(keyword) >= 0 || - item.name.toLowerCase().indexOf(keyword) >= 0 || - item.typeName.toLowerCase().indexOf(keyword) >= 0; - if (found) { - filtered.push(item); - } - }); - updateContestsTable(filtered, "No Matched Challenge"); - }); - -}); - - /* Add js code for https://apps.topcoder.com/bugs/browse/TCCC-4119 */ -$(document).ready(function(){ - - var zIndex = 100; - $(".newSidebar .dropdownWidget").each(function(){ - $(this).css("z-index",zIndex--); - }); - - $(".newSidebar .contestList .tableHeader span").click(function(){ - var header = $(this).parent(); - if($(this).hasClass("down")){ - $(this).removeClass("down").addClass("up"); - }else if($(this).hasClass("up")){ - $(this).removeClass("up").addClass("down"); - }else{ - header.find("span").removeClass("down").removeClass("up"); - $(this).addClass("down"); - } - - var o = 0; - if ($(this).hasClass("down")) { - o = 1; - } - - var oo; - - if ($(this).hasClass("statusTh")) { - oo = 0; - } else if ($(this).hasClass("titleTh")) { - oo = 1; - } else { - oo = 2; - } - - var sorting = [[oo, o]]; - $("#contestsTable").trigger("sorton",[sorting]); - $("#contestsTable tr").removeClass("even"); - $("#contestsTable tr:even").addClass("even"); - }) - - $(".newSidebar .contestList .tableBody td").live("mouseenter",function(){ - $(this).parent().addClass("hover"); - }) - $(".newSidebar .contestList .tableBody td").live("mouseleave",function(){ - $(this).parent().removeClass("hover"); - }) - - $(document).click(function(event){ - - if($(event.target).parents(".dropList").length == 0){ - //$(".dropdownWidget .dropList").hide(); - } - - }); - - - /* sort contests */ - if ($("#contestsTable").length > 0) { - - $("#contestsTable:has(tbody tr)").tablesorter(); - - $("#rightTableHeader .statusTh").click().click(); - } - - /* init date-pack */ - if($('.date-pick').length > 0){ - $(".date-pick").datePicker({startDate:'01/01/2001'}); - } - - if ($("#contestsTable tbody tr").length > 0) { - sortStatus(); - } - - adjustContestListHeight(); - - if ($(".contestsContent").length > 0) { - /* Stylished scrollbar*/ - $('.contestsContent').jScrollPane({ - scrollbarWidth: 17, - showArrows: true - }); - } - -}) - -var currentSorting = [[0, 1]]; - -var sortCurrentContestsTable = function() { - if ($("#contestsTable tbody tr").size() > 0) { - $("#contestsTable").trigger("sorton", [currentSorting]); - $("#contestsTable tr").removeClass("even"); - $("#contestsTable tr:even").addClass("even"); - } -} - -/* sort contest by title */ -var sortTitle = function(){ - var sorting = [[1,0]]; - $("#contestsTable").trigger("sorton",[sorting]); - $("#contestsTable tr").removeClass("even"); - $("#contestsTable tr").each(function(){ - $("#contestsTable tr:even").addClass("even"); - }); -} - -/* sort contest by status */ -var sortStatus = function(){ - var sorting = [[0,1]]; - $("#contestsTable").trigger("sorton",[sorting]); - $("#contestsTable tr").removeClass("even"); - $("#contestsTable tr").each(function(){ - $("#contestsTable tr:even").addClass("even"); - }); -} - - -/* sort contest by type */ -var sortType = function(){ - var sorting = [[2,0]]; - $("#contestsTable").trigger("sorton",[sorting]); - $("#contestsTable tr").removeClass("even"); - $("#contestsTable tr").each(function(){ - $("#contestsTable tr:even").addClass("even"); - }); -} - -/* get the selected index and sort the contests table */ -var sortTable = function(mySelect){ - var selected = mySelect.options[mySelect.selectedIndex].value; - - if( selected == "title" ) - sortTitle(); - else if(selected == "status") - sortStatus(); - else - sortType(); -} - -/*-Show the scrollbar when the number of contests is more than 10-*/ - -var adjustContestListHeight = function() { - var rows_height = 0; - var contests_nbre = 0; - - /* get the height of the 10 first rows ( one contest per row)*/ - $("#contestsTable TBODY").children().each(function() { - if (contests_nbre < 10) - rows_height += $(this).height(); - contests_nbre++; - }); - - if (contests_nbre > 10) { - $(".contestsContent").height(rows_height); - - // Chrome - if (ua.match(/chrome\/([\d.]+)/) != null && ua.match(/chrome\/([\d.]+)/)[1].split('.')[0] > 2) { - $(".contestsContent").height(rows_height + 20); - } - - // Safari - if (ua.match(/version\/([\d.]+).*safari/) != null && ua.match(/version\/([\d.]+).*safari/)[1].split('.')[0] > 3) { - $(".contestsContent").height(rows_height + 20); - } - - // IE 7 - if ($.browser.msie && $.browser.version == 7.0) { - $(".contestsContent").height(rows_height + 20); - } - - // IE 8 - if ($.browser.msie && $.browser.version == 8.0) { - $(".contestsContent").height(rows_height + 20); - } - $(".contestsContent TABLE").css("width", "232px"); - - return rows_height + 20; - } - - return 0; -} - -var showHideRows = function (myLink, tableId) { - - if ($(myLink).html() == "View More") { //when the user click the view more link we will show the hidden rows - $("#" + tableId + " TBODY TR").each(function () { - $(this).removeClass("hide"); - }); - - $(myLink).html("Hide Rows"); - $(myLink).addClass("less"); - - } else { //when the user click the hide rows link we will hide some rows - var hide_row = false; - $("#" + tableId + " TBODY TR").each(function () { - - if (this.className.search("hideStart") != -1) { - hide_row = true; - } - - if (hide_row) - $(this).addClass("hide"); - }); - - $(myLink).html("View More"); - $(myLink).removeClass("less"); - } - - }; diff --git a/src/web/scripts/scorecard/scorecard.js b/src/web/scripts/scorecard/scorecard.js deleted file mode 100644 index 5e4097e5b..000000000 --- a/src/web/scripts/scorecard/scorecard.js +++ /dev/null @@ -1,1231 +0,0 @@ -/** - * - Author: pvmagacho, GreatKevin - * - Version: 1.3 - * - Copyright (C) 2011 - 2014 TopCoder Inc., All Rights Reserved. - * - * This file contains all the client javascript code for the scorecard pages. - * Version 1.1 (Release Assembly - TopCoder Scorecard Tool Ajax Loading and Static Files Sharing) Change notes: - * - Add Clone scoreboard - * - Change AJAX loading animiation. - * - * Version 1.2 ((TCCC-3917) Scorecard Tool - Document Upload Option) Change notes: - * - Modified upload options from YES/NO to N/A, Optional or Required. Will use both - * - uploadDocument and uploadDocumentRequired properties. - * - * Version 1.3 (Release Assembly - TC Group Management and Scorecard Tool Rebranding) - * - Reskin the scorecard pages - */ - -/** - * will be called before ajax calls - */ -function beforeAjax() { - modalPreloader(); -} - -/** - * will be called after ajax calls - */ -function afterAjax() { - modalClose(); -} - -/** - * Common function to handle JSON result. - */ -function handleJsonResult(jsonResult, successCallBack, failureCallBack) { - if(jsonResult.success) { - successCallBack(jsonResult); - } else { - failureCallBack(jsonResult.message); - } -} - -/** - * Show the error messages. - * - * @param errors the error messages - */ -function showErrors(errors) { - $('#validation').dialog("open"); - $('#validation p.err').remove(); - $('#validation .body p:last').after("

    " + errors + "

    "); -} - -/** - * Get the scorecard groups - * - * @param id the id of the scorecard - */ -function getGroups(id){ - $("#addMatch .body").load(ctx + "/scorecard/ajaxContent/" + id, function() { - $('#addMatch').dialog("open"); - $('#addMatch').find("input").each(function(){ - $(this).attr('checked', false); - $(this).removeClass("hover"); - }); - $('#addMatch').find(".card,tr.question,table.checks.section").each(function(){ - $(this).removeClass('hover'); - }); - if ($('#cloneScorecard').val() != undefined){ - $('.button5.back').parent().hide(); - } else { - $('.button5.back').parent().show(); - } - afterAjax(); - }); -} - -var ctx = ""; -// the json service root url -var jsonServiceUrlRoot = ""; - -var projectCategories; -var projectCategoryMap = []; -var scorecardTypeMap = []; -var scorecardStatusMap = []; - -/** - * Load the project categories data using ajax. - * - * @param callback the handler which will be called after ajax data returned - */ -function loadProjectCategories(callback) { - if (projectCategories) { - callback(); - return; - } - $.ajax({ - type: 'GET', - url: jsonServiceUrlRoot + "/project-category", - dataType: 'json', - success: function(jsonResult) { - handleJsonResult(jsonResult, - function(result) { - projectCategories = result.data; - for (var i = 0; i < projectCategories.length; i++) { - projectCategoryMap[projectCategories[i].id] = projectCategories[i].name; - } - callback(); - }, - showErrors - ); - } - }); -} - -/** - * Search scorecard using ajax call. - * - * @param page the page index - * @param max the max result - * @param callback the handler which will be called after ajax data returned - */ -function searchScorecard(page, max, callback) { - var hasQuery = $.trim($("input[name='sn']").val()).length > 0; - if (!hasQuery) { - hasQuery = $("input[name='spt'],input[name='sc'],input[name='st'],input[name='ss']").is(":checked"); - } - if (!hasQuery) { - alert("At least one keyword should be entered before searching."); - return; - } - loadProjectCategories(function() { - $.ajax({ - type: 'GET', - url: ctx + '/scorecard/search', - data: $("#searchForm").serialize() + "&offset=" + (page * max) + "&max=" + max, - dataType: 'json', - success: function(jsonResult) { - $(".searchResultHide").hide(); - $(".searchResultShow").show(); - $("#addScorecard").removeClass("roundedBox").addClass("scorecardSearch"); - $(".scorecardFind").appendTo("#searchResultForm"); - handleJsonResult(jsonResult, - function(result) { - $("#navTitle").html('Search Results'); - $(".areaHeader .title").html('Search Results'); - $("#searchResultCount").html('' + result.totalCount + '') - - var html = ''; - for (var i = 0; i < result.count; i++) { - var so = result.data[i]; - html = html + ''; - html = html + '' + so.scorecardName + ' v ' + so.scorecardVersion + ''; - html = html + '' + scorecardTypeMap[so.scorecardType] + ''; - html = html + '' + projectCategoryMap[so.projectCategory] + ''; - html = html + '' + scorecardStatusMap[so.scorecardStatus] + ''; - html = html + 'View | '; - if (so.editable){ - html = html + 'Edit | '; - } else { - html = html + 'Edit | '; - } - html = html + 'Clone'; - html += ''; - } - $("#searchResult tbody").html(html); - - // rendering paging control - html = ''; - var maxPage = parseInt(result.totalCount / max); - if (max == 0) { - maxPage = 1; - } - if (result.totalCount % max > 0) { - maxPage++; - } - var css = "pageLink"; - if (!window.initMultiselect) { - css = "pageLink2"; - } - if (page == 0) { - html += 'Prev'; - } else { - html += ''; - } - for (var i = 0; i < maxPage; i++) { - if (page == i) { - html += '' + (i + 1) + ''; - } else{ - html += '' + (i + 1) + ''; - } - } - if (page == maxPage - 1) { - html += 'Next'; - } else { - html += '