Pollen-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- 3196 discussions
Author: tchemit
Date: 2013-07-01 08:54:32 +0200 (Mon, 01 Jul 2013)
New Revision: 3846
Url: http://chorem.org/projects/pollen/repository/revisions/3846
Log:
up up up\!
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2013-07-01 06:44:16 UTC (rev 3845)
+++ trunk/pom.xml 2013-07-01 06:54:32 UTC (rev 3846)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmine</artifactId>
- <version>3.4.11</version>
+ <version>3.4.12-SNAPSHOT</version>
</parent>
<groupId>org.chorem</groupId>
@@ -177,7 +177,7 @@
<jettyVersion>9.0.3.v20130506</jettyVersion>
<!--jettyVersion>${jettyPluginVersion}</jettyVersion-->
<!--<hibernateVersion>4.2.2.Final</hibernateVersion>-->
- <hibernateVersion>4.3.0.Beta1</hibernateVersion>
+ <hibernateVersion>4.3.0.Beta2</hibernateVersion>
<seleniumVersion>2.33.0</seleniumVersion>
<mockitoVersion>1.9.5</mockitoVersion>
@@ -430,7 +430,7 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
- <version>2.1</version>
+ <version>2.2</version>
</dependency>
<dependency>
1
0
r3845 - in trunk: . pollen-persistence pollen-rest-api pollen-services
by tchemit@users.chorem.org 01 Jul '13
by tchemit@users.chorem.org 01 Jul '13
01 Jul '13
Author: tchemit
Date: 2013-07-01 08:44:16 +0200 (Mon, 01 Jul 2013)
New Revision: 3845
Url: http://chorem.org/projects/pollen/repository/revisions/3845
Log:
fix deps after upgrade of hibernate
Modified:
trunk/pollen-persistence/pom.xml
trunk/pollen-rest-api/pom.xml
trunk/pollen-services/pom.xml
trunk/pom.xml
Modified: trunk/pollen-persistence/pom.xml
===================================================================
--- trunk/pollen-persistence/pom.xml 2013-07-01 06:33:05 UTC (rev 3844)
+++ trunk/pollen-persistence/pom.xml 2013-07-01 06:44:16 UTC (rev 3845)
@@ -29,14 +29,14 @@
<artifactId>guava</artifactId>
</dependency>
- <dependency>
+ <!--dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- </dependency>
- <dependency>
+ </dependency-->
+ <!--dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
- </dependency>
+ </dependency-->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
@@ -66,17 +66,22 @@
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
- <artifactId>hibernate-jpa-2.0-api</artifactId>
+ <artifactId>hibernate-jpa-2.1-api</artifactId>
</dependency>
+ <!--dependency>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ </dependency-->
+
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</dependency>
- <dependency>
+ <!--dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
- </dependency>
+ </dependency-->
<dependency>
<groupId>junit</groupId>
Modified: trunk/pollen-rest-api/pom.xml
===================================================================
--- trunk/pollen-rest-api/pom.xml 2013-07-01 06:33:05 UTC (rev 3844)
+++ trunk/pollen-rest-api/pom.xml 2013-07-01 06:44:16 UTC (rev 3845)
@@ -43,9 +43,14 @@
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
- <artifactId>hibernate-jpa-2.0-api</artifactId>
+ <artifactId>hibernate-jpa-2.1-api</artifactId>
</dependency>
+ <!--dependency>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ </dependency-->
+
<dependency>
<groupId>org.nuiton.web</groupId>
<artifactId>nuiton-web</artifactId>
Modified: trunk/pollen-services/pom.xml
===================================================================
--- trunk/pollen-services/pom.xml 2013-07-01 06:33:05 UTC (rev 3844)
+++ trunk/pollen-services/pom.xml 2013-07-01 06:44:16 UTC (rev 3845)
@@ -24,9 +24,14 @@
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
- <artifactId>hibernate-jpa-2.0-api</artifactId>
+ <artifactId>hibernate-jpa-2.1-api</artifactId>
</dependency>
+ <!--dependency>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ </dependency-->
+
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pollen-persistence</artifactId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2013-07-01 06:33:05 UTC (rev 3844)
+++ trunk/pom.xml 2013-07-01 06:44:16 UTC (rev 3845)
@@ -232,8 +232,8 @@
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
- <artifactId>hibernate-jpa-2.0-api</artifactId>
- <version>1.0.1.Final</version>
+ <artifactId>hibernate-jpa-2.1-api</artifactId>
+ <version>1.0.0.Draft-16</version>
</dependency>
<dependency>
@@ -254,6 +254,12 @@
<groupId>org.nuiton.jpa</groupId>
<artifactId>nuiton-jpa-api</artifactId>
<version>${nuitonJpaVersion}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
1
0
r3844 - in trunk: . pollen-rest-api pollen-services pollen-services/src/main/java/org/chorem/pollen/services/service
by tchemit@users.chorem.org 01 Jul '13
by tchemit@users.chorem.org 01 Jul '13
01 Jul '13
Author: tchemit
Date: 2013-07-01 08:33:05 +0200 (Mon, 01 Jul 2013)
New Revision: 3844
Url: http://chorem.org/projects/pollen/repository/revisions/3844
Log:
up some libs + optimize dependencies
Modified:
trunk/pollen-rest-api/pom.xml
trunk/pollen-services/pom.xml
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/AuthService.java
trunk/pom.xml
Modified: trunk/pollen-rest-api/pom.xml
===================================================================
--- trunk/pollen-rest-api/pom.xml 2013-07-01 06:12:00 UTC (rev 3843)
+++ trunk/pollen-rest-api/pom.xml 2013-07-01 06:33:05 UTC (rev 3844)
@@ -52,53 +52,39 @@
</dependency>
<dependency>
- <groupId>com.esotericsoftware.yamlbeans</groupId>
- <artifactId>yamlbeans</artifactId>
- </dependency>
-
- <dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
</dependency>
- <!--dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <scope>provided</scope>
- </dependency-->
-
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
</dependency>
<dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
- <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-email</artifactId>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>fluent-hc</artifactId>
</dependency>
+
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
-
<dependency>
- <groupId>javax.mail</groupId>
- <artifactId>mail</artifactId>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
</dependency>
+
<dependency>
- <groupId>rome</groupId>
- <artifactId>rome</artifactId>
+ <groupId>org.apache.tomcat.embed</groupId>
+ <artifactId>tomcat-embed-core</artifactId>
</dependency>
<dependency>
@@ -108,17 +94,17 @@
<dependency>
<groupId>org.nuiton.jpa</groupId>
- <artifactId>nuiton-jpa-junit</artifactId>
+ <artifactId>nuiton-jpa-api</artifactId>
</dependency>
<dependency>
- <groupId>org.nuiton</groupId>
- <artifactId>nuiton-utils</artifactId>
+ <groupId>org.nuiton.jpa</groupId>
+ <artifactId>nuiton-jpa-junit</artifactId>
</dependency>
<dependency>
<groupId>org.nuiton</groupId>
- <artifactId>nuiton-config</artifactId>
+ <artifactId>nuiton-utils</artifactId>
</dependency>
<dependency>
Modified: trunk/pollen-services/pom.xml
===================================================================
--- trunk/pollen-services/pom.xml 2013-07-01 06:12:00 UTC (rev 3843)
+++ trunk/pollen-services/pom.xml 2013-07-01 06:33:05 UTC (rev 3844)
@@ -60,23 +60,23 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
- <dependency>
+ <!--dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-email</artifactId>
- </dependency>
+ </dependency-->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
- <dependency>
+ <!--dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
- </dependency>
- <dependency>
+ </dependency-->
+ <!--dependency>
<groupId>rome</groupId>
<artifactId>rome</artifactId>
- </dependency>
+ </dependency-->
<dependency>
<groupId>junit</groupId>
@@ -84,7 +84,17 @@
</dependency>
<dependency>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>nuiton-i18n</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.nuiton.jpa</groupId>
+ <artifactId>nuiton-jpa-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton.jpa</groupId>
<artifactId>nuiton-jpa-junit</artifactId>
</dependency>
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/AuthService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/AuthService.java 2013-07-01 06:12:00 UTC (rev 3843)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/AuthService.java 2013-07-01 06:33:05 UTC (rev 3844)
@@ -24,6 +24,8 @@
*/
import com.google.common.base.Preconditions;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.chorem.pollen.persistence.dao.PollenUserJpaDao;
import org.chorem.pollen.persistence.dao.SessionTokenJpaDao;
import org.chorem.pollen.persistence.entity.PollenUser;
@@ -40,6 +42,9 @@
*/
public class AuthService extends AbstractPollenService {
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(AuthService.class);
+
public SessionToken login(String login, String password) throws EntityNotFoundException, UserInvalidPasswordException {
Preconditions.checkNotNull(login);
Preconditions.checkNotNull(password);
@@ -82,6 +87,9 @@
getPersistenceContext().commit();
//TODO Notifiy Password changed
+ if (log.isDebugEnabled()) {
+ log.debug("Notify Password Changed");
+ }
}
public void logout(String login, String token) throws EntityNotFoundException {
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2013-07-01 06:12:00 UTC (rev 3843)
+++ trunk/pom.xml 2013-07-01 06:33:05 UTC (rev 3844)
@@ -176,7 +176,8 @@
<slf4jVersion>1.7.5</slf4jVersion>
<jettyVersion>9.0.3.v20130506</jettyVersion>
<!--jettyVersion>${jettyPluginVersion}</jettyVersion-->
- <hibernateVersion>4.2.2.Final</hibernateVersion>
+ <!--<hibernateVersion>4.2.2.Final</hibernateVersion>-->
+ <hibernateVersion>4.3.0.Beta1</hibernateVersion>
<seleniumVersion>2.33.0</seleniumVersion>
<mockitoVersion>1.9.5</mockitoVersion>
@@ -398,13 +399,13 @@
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
- <version>1.6</version>
+ <version>1.7</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
- <version>1.4.7</version>
+ <version>1.5.0-b01</version>
</dependency>
<dependency>
@@ -415,9 +416,21 @@
</dependency>
<dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>fluent-hc</artifactId>
+ <version>${httpCommonsHttpclientVersion}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>2.1</version>
+ </dependency>
+
+ <dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
- <version>6.0</version>
+ <version>7.0</version>
<scope>provided</scope>
</dependency>
@@ -429,6 +442,13 @@
</dependency>
<dependency>
+ <groupId>org.apache.tomcat.embed</groupId>
+ <artifactId>tomcat-embed-core</artifactId>
+ <version>7.0.41</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
1
0
r3843 - in trunk: pollen-rest-api pollen-services/src/test/java/org/chorem/pollen/service pollen-ui-js
by tchemit@users.chorem.org 01 Jul '13
by tchemit@users.chorem.org 01 Jul '13
01 Jul '13
Author: tchemit
Date: 2013-07-01 08:12:00 +0200 (Mon, 01 Jul 2013)
New Revision: 3843
Url: http://chorem.org/projects/pollen/repository/revisions/3843
Log:
fix build + ignore target directory
Modified:
trunk/pollen-rest-api/pom.xml
trunk/pollen-services/src/test/java/org/chorem/pollen/service/AbstractPollenServiceTest.java
trunk/pollen-ui-js/
Modified: trunk/pollen-rest-api/pom.xml
===================================================================
--- trunk/pollen-rest-api/pom.xml 2013-07-01 05:40:45 UTC (rev 3842)
+++ trunk/pollen-rest-api/pom.xml 2013-07-01 06:12:00 UTC (rev 3843)
@@ -142,6 +142,10 @@
</dependencies>
<properties>
+
+ <i18n.silent>true</i18n.silent>
+ <i18n.bundleOutputName>${pollenI18nBundle}</i18n.bundleOutputName>
+
<defaultWebContextPath>pollen</defaultWebContextPath>
<defaultLogDir>${basedir}/target</defaultLogDir>
<defaultDbDir>${basedir}/target</defaultDbDir>
@@ -196,6 +200,20 @@
</plugin>
</plugins>
</pluginManagement>
+
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>i18n-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>bundle</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
</build>
<profiles>
Modified: trunk/pollen-services/src/test/java/org/chorem/pollen/service/AbstractPollenServiceTest.java
===================================================================
--- trunk/pollen-services/src/test/java/org/chorem/pollen/service/AbstractPollenServiceTest.java 2013-07-01 05:40:45 UTC (rev 3842)
+++ trunk/pollen-services/src/test/java/org/chorem/pollen/service/AbstractPollenServiceTest.java 2013-07-01 06:12:00 UTC (rev 3843)
@@ -69,10 +69,8 @@
serviceContext.setPollenServiceConfig(getPollenServiceConfig());
- EntityManager entityManager = getJpaEntityManagerRule().getEntityManager();
+ EntityManager entityManager = getJpaEntityManagerRule().newEntityManager();
-// JpaEntityIdFactoryIfNotEmpty idGenerator = new JpaEntityIdFactoryIfNotEmpty();
-// JpaPollenPersistenceContext persistenceContext = new JpaPollenPersistenceContext(idGenerator, entityManager);
JpaPollenPersistenceContext persistenceContext = new JpaPollenPersistenceContext(entityManager);
serviceContext.setPersistenceContext(persistenceContext);
Property changes on: trunk/pollen-ui-js
___________________________________________________________________
Modified: svn:ignore
- *.iml
+ *.iml
target
*.ipr
*.iws
.idea
1
0
r3842 - in trunk: pollen-rest-api pollen-rest-api/src pollen-rest-api/src/license pollen-services pollen-services/src pollen-services/src/license
by tchemit@users.chorem.org 01 Jul '13
by tchemit@users.chorem.org 01 Jul '13
01 Jul '13
Author: tchemit
Date: 2013-07-01 07:40:45 +0200 (Mon, 01 Jul 2013)
New Revision: 3842
Url: http://chorem.org/projects/pollen/repository/revisions/3842
Log:
fix third parties
Added:
trunk/pollen-rest-api/src/license/
trunk/pollen-rest-api/src/license/THIRD-PARTY.properties
trunk/pollen-services/src/license/
trunk/pollen-services/src/license/THIRD-PARTY.properties
Modified:
trunk/pollen-rest-api/LICENSE.txt
trunk/pollen-services/LICENSE.txt
Modified: trunk/pollen-rest-api/LICENSE.txt
===================================================================
--- trunk/pollen-rest-api/LICENSE.txt 2013-07-01 05:33:57 UTC (rev 3841)
+++ trunk/pollen-rest-api/LICENSE.txt 2013-07-01 05:40:45 UTC (rev 3842)
@@ -0,0 +1,661 @@
+ GNU AFFERO GENERAL PUBLIC LICENSE
+ Version 3, 19 November 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU Affero General Public License is a free, copyleft license for
+software and other kinds of works, specifically designed to ensure
+cooperation with the community in the case of network server software.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+our General Public Licenses are intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ Developers that use our General Public Licenses protect your rights
+with two steps: (1) assert copyright on the software, and (2) offer
+you this License which gives you legal permission to copy, distribute
+and/or modify the software.
+
+ A secondary benefit of defending all users' freedom is that
+improvements made in alternate versions of the program, if they
+receive widespread use, become available for other developers to
+incorporate. Many developers of free software are heartened and
+encouraged by the resulting cooperation. However, in the case of
+software used on network servers, this result may fail to come about.
+The GNU General Public License permits making a modified version and
+letting the public access it on a server without ever releasing its
+source code to the public.
+
+ The GNU Affero General Public License is designed specifically to
+ensure that, in such cases, the modified source code becomes available
+to the community. It requires the operator of a network server to
+provide the source code of the modified version running there to the
+users of that server. Therefore, public use of a modified version, on
+a publicly accessible server, gives the public access to the source
+code of the modified version.
+
+ An older license, called the Affero General Public License and
+published by Affero, was designed to accomplish similar goals. This is
+a different license, not a version of the Affero GPL, but Affero has
+released a new version of the Affero GPL which permits relicensing under
+this license.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU Affero General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Remote Network Interaction; Use with the GNU General Public License.
+
+ Notwithstanding any other provision of this License, if you modify the
+Program, your modified version must prominently offer all users
+interacting with it remotely through a computer network (if your version
+supports such interaction) an opportunity to receive the Corresponding
+Source of your version by providing access to the Corresponding Source
+from a network server at no charge, through some standard or customary
+means of facilitating copying of software. This Corresponding Source
+shall include the Corresponding Source for any work covered by version 3
+of the GNU General Public License that is incorporated pursuant to the
+following paragraph.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the work with which it is combined will remain governed by version
+3 of the GNU General Public License.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU Affero General Public License from time to time. Such new versions
+will be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU Affero General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU Affero General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU Affero General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source. For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code. There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU AGPL, see
+<http://www.gnu.org/licenses/>.
\ No newline at end of file
Added: trunk/pollen-rest-api/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/pollen-rest-api/src/license/THIRD-PARTY.properties (rev 0)
+++ trunk/pollen-rest-api/src/license/THIRD-PARTY.properties 2013-07-01 05:40:45 UTC (rev 3842)
@@ -0,0 +1,43 @@
+# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
+#-------------------------------------------------------------------------------
+# Already used licenses in project :
+# - Apache License
+# - Apache License 2.0
+# - Apache Software License - Version 2.0
+# - BSD License
+# - BSD licence
+# - BSD style
+# - Bouncy Castle Licence
+# - CDDL
+# - CDDL + GPLv2 with classpath exception
+# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+# - Common Development and Distribution License
+# - Common Public License Version 1.0
+# - Eclipse Public License - Version 1.0
+# - Eclipse Public License v1.0
+# - GNU Affero General Public License version 3
+# - GNU General Public License, Version 2 with the Classpath Exception
+# - GNU Lesser General Public License, version 2.1
+# - GPLv2+CE
+# - Indiana University Extreme! Lab Software License, vesion 1.1.1
+# - Lesser General Public License (LGPL) v 3.0
+# - Lesser General Public License (LPGL)
+# - Lesser General Public License (LPGL) v 2.1
+# - MIT License
+# - MPL 1.1
+# - New BSD License
+# - Public Domain
+# - The Apache Software License, Version 2.0
+# - The H2 License, Version 1.0
+# - WTFPL
+# - license.txt
+#-------------------------------------------------------------------------------
+# Please fill the missing licenses for dependencies :
+#
+#
+#Mon Jul 01 07:34:19 CEST 2013
+commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
+dom4j--dom4j--1.6.1=BSD License
+jdom--jdom--1.0=The Apache Software License, Version 2.0
+org.antlr--antlr-runtime--3.3=The Apache Software License, Version 2.0
+rome--rome--1.0=The Apache Software License, Version 2.0
Property changes on: trunk/pollen-rest-api/src/license/THIRD-PARTY.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Modified: trunk/pollen-services/LICENSE.txt
===================================================================
--- trunk/pollen-services/LICENSE.txt 2013-07-01 05:33:57 UTC (rev 3841)
+++ trunk/pollen-services/LICENSE.txt 2013-07-01 05:40:45 UTC (rev 3842)
@@ -0,0 +1,661 @@
+ GNU AFFERO GENERAL PUBLIC LICENSE
+ Version 3, 19 November 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU Affero General Public License is a free, copyleft license for
+software and other kinds of works, specifically designed to ensure
+cooperation with the community in the case of network server software.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+our General Public Licenses are intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ Developers that use our General Public Licenses protect your rights
+with two steps: (1) assert copyright on the software, and (2) offer
+you this License which gives you legal permission to copy, distribute
+and/or modify the software.
+
+ A secondary benefit of defending all users' freedom is that
+improvements made in alternate versions of the program, if they
+receive widespread use, become available for other developers to
+incorporate. Many developers of free software are heartened and
+encouraged by the resulting cooperation. However, in the case of
+software used on network servers, this result may fail to come about.
+The GNU General Public License permits making a modified version and
+letting the public access it on a server without ever releasing its
+source code to the public.
+
+ The GNU Affero General Public License is designed specifically to
+ensure that, in such cases, the modified source code becomes available
+to the community. It requires the operator of a network server to
+provide the source code of the modified version running there to the
+users of that server. Therefore, public use of a modified version, on
+a publicly accessible server, gives the public access to the source
+code of the modified version.
+
+ An older license, called the Affero General Public License and
+published by Affero, was designed to accomplish similar goals. This is
+a different license, not a version of the Affero GPL, but Affero has
+released a new version of the Affero GPL which permits relicensing under
+this license.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU Affero General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Remote Network Interaction; Use with the GNU General Public License.
+
+ Notwithstanding any other provision of this License, if you modify the
+Program, your modified version must prominently offer all users
+interacting with it remotely through a computer network (if your version
+supports such interaction) an opportunity to receive the Corresponding
+Source of your version by providing access to the Corresponding Source
+from a network server at no charge, through some standard or customary
+means of facilitating copying of software. This Corresponding Source
+shall include the Corresponding Source for any work covered by version 3
+of the GNU General Public License that is incorporated pursuant to the
+following paragraph.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the work with which it is combined will remain governed by version
+3 of the GNU General Public License.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU Affero General Public License from time to time. Such new versions
+will be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU Affero General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU Affero General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU Affero General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source. For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code. There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU AGPL, see
+<http://www.gnu.org/licenses/>.
\ No newline at end of file
Added: trunk/pollen-services/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/pollen-services/src/license/THIRD-PARTY.properties (rev 0)
+++ trunk/pollen-services/src/license/THIRD-PARTY.properties 2013-07-01 05:40:45 UTC (rev 3842)
@@ -0,0 +1,33 @@
+# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
+#-------------------------------------------------------------------------------
+# Already used licenses in project :
+# - Apache License 2.0
+# - BSD License
+# - CDDL
+# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+# - Common Development and Distribution License
+# - Common Public License Version 1.0
+# - GNU Affero General Public License version 3
+# - GNU General Public License, Version 2 with the Classpath Exception
+# - GNU Lesser General Public License, version 2.1
+# - GPLv2+CE
+# - Indiana University Extreme! Lab Software License, vesion 1.1.1
+# - Lesser General Public License (LGPL) v 3.0
+# - Lesser General Public License (LPGL)
+# - Lesser General Public License (LPGL) v 2.1
+# - MIT License
+# - MPL 1.1
+# - New BSD License
+# - The Apache Software License, Version 2.0
+# - The H2 License, Version 1.0
+# - license.txt
+#-------------------------------------------------------------------------------
+# Please fill the missing licenses for dependencies :
+#
+#
+#Mon Jul 01 07:33:11 CEST 2013
+commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
+dom4j--dom4j--1.6.1=BSD License
+javax.servlet--servlet-api--2.5=COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+jdom--jdom--1.0=The Apache Software License, Version 2.0
+rome--rome--1.0=The Apache Software License, Version 2.0
Property changes on: trunk/pollen-services/src/license/THIRD-PARTY.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
1
0
r3841 - trunk/pollen-services/src/main/java/org/chorem/pollen/services/service
by tchemit@users.chorem.org 01 Jul '13
by tchemit@users.chorem.org 01 Jul '13
01 Jul '13
Author: tchemit
Date: 2013-07-01 07:33:57 +0200 (Mon, 01 Jul 2013)
New Revision: 3841
Url: http://chorem.org/projects/pollen/repository/revisions/3841
Log:
comment business security validation code to move
Modified:
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/SecurityService.java
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/SecurityService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/SecurityService.java 2013-06-26 17:50:48 UTC (rev 3840)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/SecurityService.java 2013-07-01 05:33:57 UTC (rev 3841)
@@ -26,7 +26,6 @@
import com.google.common.base.Preconditions;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
-import org.apache.shiro.subject.SimplePrincipalCollection;
import org.apache.shiro.subject.Subject;
import org.chorem.pollen.persistence.dao.ChoiceJpaDao;
import org.chorem.pollen.persistence.dao.CommentJpaDao;
@@ -35,7 +34,6 @@
import org.chorem.pollen.persistence.dao.VoteJpaDao;
import org.chorem.pollen.persistence.entity.Choice;
import org.chorem.pollen.persistence.entity.Comment;
-import org.chorem.pollen.persistence.entity.CommentVisibility;
import org.chorem.pollen.persistence.entity.Poll;
import org.chorem.pollen.persistence.entity.PollenPrincipal;
import org.chorem.pollen.persistence.entity.PollenUser;
@@ -178,20 +176,30 @@
}
}
- if (poll.isAddChoiceRunning(now)) {
-
- permissions.add(createSubjectPermission(PermissionVerb.addChoice, entity));
+ // add editVote / deleteVote for any voter
+ if (!poll.isVoteEmpty()) {
+ for (Vote vote : poll.getVote()) {
+ String id = vote.getVoter().getId();
+ permissions.add(createSubjectPermission(id, PermissionVerb.editVote, vote));
+ permissions.add(createSubjectPermission(id, PermissionVerb.deleteVote, vote));
+ }
}
- if (poll.getCommentVisibility() != CommentVisibility.NOBODY) {
- //FIXME Should see with voter ?
- permissions.add(createSubjectPermission(PermissionVerb.addComment, entity));
- }
+ //TODO Not do this here, but later in business code
+// if (poll.isAddChoiceRunning(now)) {
+//
+// permissions.add(createSubjectPermission(PermissionVerb.addChoice, entity));
+// }
+//
+// if (poll.getCommentVisibility() != CommentVisibility.NOBODY) {
+// //FIXME Should see with voter ?
+// permissions.add(createSubjectPermission(PermissionVerb.addComment, entity));
+// }
+//
+// if (poll.isRunning(now)) {
+// permissions.add(createSubjectPermission(PermissionVerb.addVote, entity));
+// }
- if (poll.isRunning(now)) {
- permissions.add(createSubjectPermission(PermissionVerb.addVote, entity));
- }
-
//TODO Do for editVote,...
}
}
1
0
Author: kmorin
Date: 2013-06-26 19:50:48 +0200 (Wed, 26 Jun 2013)
New Revision: 3840
Url: http://chorem.org/projects/pollen/repository/revisions/3840
Log:
continue (poll creation form + login and logout)
Added:
trunk/pollen-ui-js/src/main/webapp/css/bootstrap-datetimepicker.min.css
trunk/pollen-ui-js/src/main/webapp/js/libs/bootstrap-datetimepicker.min.js
trunk/pollen-ui-js/src/main/webapp/js/models/choices.js
trunk/pollen-ui-js/src/main/webapp/js/pollen-utils.js
Modified:
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRender.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceContextFilter.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceListener.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/ChoiceService.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollService.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/AuthService.java
trunk/pollen-ui-js/src/main/webapp/bundle/Messages.properties
trunk/pollen-ui-js/src/main/webapp/index.html
trunk/pollen-ui-js/src/main/webapp/js/controls/poll_form.js
trunk/pollen-ui-js/src/main/webapp/js/controls/poll_list.js
trunk/pollen-ui-js/src/main/webapp/js/controls/poll_summary.js
trunk/pollen-ui-js/src/main/webapp/js/controls/vote.js
trunk/pollen-ui-js/src/main/webapp/js/models/comments.js
trunk/pollen-ui-js/src/main/webapp/js/models/polls.js
trunk/pollen-ui-js/src/main/webapp/js/models/votes.js
trunk/pollen-ui-js/src/main/webapp/views/poll_form.ejs
trunk/pollen-ui-js/src/main/webapp/views/vote.ejs
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRender.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRender.java 2013-06-21 21:26:23 UTC (rev 3839)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRender.java 2013-06-26 17:50:48 UTC (rev 3840)
@@ -47,7 +47,9 @@
import java.lang.annotation.Target;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.lang.reflect.Type;
import java.util.Collections;
+import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -92,7 +94,16 @@
}
Object map = toMap(model, includeCollection);
- Gson gson = new GsonBuilder().create();
+ Gson gson = new GsonBuilder().registerTypeAdapter(Date.class, new JsonSerializer<Date>() {
+ @Override
+ public JsonElement serialize(Date src, Type typeOfSrc, JsonSerializationContext context) {
+ if(src == null) {
+ return JsonNull.INSTANCE;
+ }
+ return new JsonPrimitive(src.getTime());
+ }
+
+ }).create();
String json = gson.toJson(map);
PrintWriter out = context.getOut();
out.print(json);
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceContextFilter.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceContextFilter.java 2013-06-21 21:26:23 UTC (rev 3839)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceContextFilter.java 2013-06-26 17:50:48 UTC (rev 3840)
@@ -70,7 +70,7 @@
String[] strings = context.getParameters().get(REQUEST_AUTH_PARAMETER);
- String authParam = strings == null || strings.length < 1 ? null : strings[1];
+ String authParam = strings == null || strings.length < 1 ? null : strings[0];
SessionToken sessionToken = null;
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceListener.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceListener.java 2013-06-21 21:26:23 UTC (rev 3839)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceListener.java 2013-06-26 17:50:48 UTC (rev 3840)
@@ -23,6 +23,8 @@
* #L%
*/
+import org.apache.commons.beanutils.Converter;
+import org.apache.commons.lang3.ClassUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.pollen.services.PollenServiceContext;
@@ -38,6 +40,7 @@
import javax.persistence.EntityManager;
import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Type;
+import java.util.Date;
/**
* TODO
@@ -53,7 +56,24 @@
@Override
public void onStart(Mapping mapping, ServerContext serverContext) {
+ serverContext.addConverter(new Converter() {
+ @Override
+ public Object convert(Class type, Object value) {
+ Object result = null;
+ if (value != null) {
+ if (value.getClass().isAssignableFrom(Date.class)) {
+ result = value;
+ } else {
+ Object o = ((Object[]) value)[0];
+ String sTime = o.toString();
+ Long time = Long.parseLong(sTime);
+ result = new Date(time);
+ }
+ }
+ return result;
+ }
+ }, Date.class);
serverContext.addInjector(new PollenServiceContextInjector());
// Create application context
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/ChoiceService.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/ChoiceService.java 2013-06-21 21:26:23 UTC (rev 3839)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/ChoiceService.java 2013-06-26 17:50:48 UTC (rev 3840)
@@ -40,7 +40,7 @@
public class ChoiceService extends WebMotionController {
public List<Choice> getChoices(PollenServiceContext context, String pollId) throws EntityNotFoundException {
- context.getSecurityService().prepareSubject(pollId);
+ context.getSecurityService().prepareSubject((String) null);
List<Choice> choices = context.getChoiceService().getChoices(pollId);
return choices;
}
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollService.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollService.java 2013-06-21 21:26:23 UTC (rev 3839)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollService.java 2013-06-26 17:50:48 UTC (rev 3840)
@@ -66,7 +66,7 @@
}
public Poll getPoll(PollenServiceContext context, String pollId) throws EntityNotFoundException {
- context.getSecurityService().prepareSubject(pollId);
+ context.getSecurityService().prepareSubject((String)null);
return context.getPollService().getPoll(pollId);
}
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/AuthService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/AuthService.java 2013-06-21 21:26:23 UTC (rev 3839)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/AuthService.java 2013-06-26 17:50:48 UTC (rev 3840)
@@ -90,11 +90,10 @@
getUserService().getUserByLogin(login);
- String encodedToken = serviceContext.encodePassword(token);
SessionTokenJpaDao dao = getPersistenceContext().getSessionTokenDao();
- SessionToken sessionToken = dao.findByToken(encodedToken);
+ SessionToken sessionToken = dao.findById(token);
checkEntityExists(SessionToken.class, sessionToken, token);
dao.remove(sessionToken);
@@ -103,7 +102,7 @@
public SessionToken getUserByAuth(String authParam) throws InvalidSessionTokenException {
- SessionToken sessionToken = getPersistenceContext().getSessionTokenDao().findByToken(authParam);
+ SessionToken sessionToken = getPersistenceContext().getSessionTokenDao().findById(authParam);
if (sessionToken == null) {
throw new InvalidSessionTokenException();
}
Modified: trunk/pollen-ui-js/src/main/webapp/bundle/Messages.properties
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/bundle/Messages.properties 2013-06-21 21:26:23 UTC (rev 3839)
+++ trunk/pollen-ui-js/src/main/webapp/bundle/Messages.properties 2013-06-26 17:50:48 UTC (rev 3840)
@@ -25,8 +25,10 @@
#common
pollen.common.cancel=Annuler
pollen.common.validate=Valider
-pollen.common.format.date=DD/MM/YYYY
-pollen.common.format.dateTime=DD/MM/YYYY HH:mm
+pollen.common.format.date.moment=DD/MM/YYYY
+pollen.common.format.dateTime.moment=DD/MM/YYYY HH:mm
+pollen.common.format.date.input=dd/MM/yyyy
+pollen.common.format.dateTime.input=dd/MM/yyyy hh:mm
pollen.common.format.time=HH:mm
pollen.common.date.from=à partir du {0}
pollen.common.date.fromTo=du {0} au {1}
@@ -37,12 +39,66 @@
pollen.poll.description.placeholder=Description
pollen.poll.title.label=Titre
pollen.poll.title.placeholder=Titre
+pollen.poll.voteCountingType.label=Type de dépouillement
+pollen.poll.creator.name.label=Votre nom
+pollen.poll.creator.name.placeholder=Votre nom
+pollen.poll.creator.email.label=Votre email
+pollen.poll.creator.email.placeholder=Votre email
+pollen.poll.choice.name.label=Nom
+pollen.poll.choice.name.placeholder=Nom
+pollen.poll.choice.description.label=Description
+pollen.poll.choice.description.placeholder=Description
+pollen.poll.beginDate.label=Date de début
+pollen.poll.beginDate.placeholder=Date de début
+pollen.poll.endDate.label=Date de fin
+pollen.poll.endDate.placeholder=Date de fin
+pollen.poll.choiceAddAllowed.label=Autoriser l'ajout de choix
+pollen.poll.addChoiceBeginDate.label=Date de début d'ajout de choix
+pollen.poll.addChoiceBeginDate.placeholder=Date de début d'ajout de choix
+pollen.poll.addChoiceEndDate.label=Date de fin d'ajout de choix
+pollen.poll.addChoiceEndDate.placeholder=Date de fin d'ajout de choix
+pollen.poll.maxChoiceNumber.label=Nombre limite de choix par vote
+pollen.poll.maxChoiceNumber.placeholder=Laisser vide ou 0 pour ne pas fixer de limite
+pollen.poll.commentVisibility.label=Visibilité des commentaires
+pollen.poll.commentVisibility.everybody.label=Publique
+pollen.poll.commentVisibility.voter.label=Seulement les votants
+pollen.poll.commentVisibility.nobody.label=Aucun commentaires
+pollen.poll.voteVisibility.label=Visibilité des votes
+pollen.poll.voteVisibility.everybody.label=Publique
+pollen.poll.voteVisibility.voter.label=Votants
+pollen.poll.voteVisibility.creator.label=Créateur
+pollen.poll.voteVisibility.anonymous.label=Anonyme
+pollen.poll.anonymousVoteAllowed.label=Vote anonyme
+pollen.poll.pollType.label=Qui peut voter ?
+pollen.poll.pollType.free.label=Libre
+pollen.poll.pollType.restricted.label=Restreint
+pollen.poll.pollType.group.label=Groupe
+pollen.poll.resultVisibility.label=Visibilité des résultats
+pollen.poll.resultVisibility.everybody.label=Publique
+pollen.poll.resultVisibility.voter.label=Seulement les votants
+pollen.poll.resultVisibility.creator.label=Créateur
+pollen.poll.continuousResults.label=Résultats continus
#choice attributes
pollen.choice.description.label=Description
pollen.choice.description.placeholder=Description
+pollen.choice.noDescription=Aucune description
pollen.choice.name.label=Titre
pollen.choice.name.placeholder=Titre
+pollen.choice.voteType.normal.label=Normal
+pollen.choice.voteType.normal.description=Voter pour le ou les choix préférés.
+pollen.choice.voteType.percentage.label=Pourcentage
+pollen.choice.voteType.percentage.description=Répartir les choix de manière à obtenir 100% au total.
+pollen.choice.voteType.condorcet.label=Condorcet
+pollen.choice.voteType.condorcet.description=Classer les choix par ordre de préférence de 1 à N (1=préféré).<br/>Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur.<br/><a href='http://fr.wikipedia.org/wiki/Méthode_Condorcet'>Pour en savoir plus</a>
+pollen.choice.voteType.number.label=Nombre
+pollen.choice.voteType.number.description=La réponse est libre, laissez vide ou entrez un nombre entier
+pollen.choice.voteType.borda.label=Borda
+pollen.choice.voteType.borda.description=Classer les choix par ordre de préférence de 1 à N (1=préféré).<br/>Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur.<br/><a href='http://fr.wikipedia.org/wiki/Méthode_Borda'>Pour en savoir plus</a>
+pollen.choice.voteType.alternative.label=Vote alternatif
+pollen.choice.voteType.alternative.description=Classer les choix par ordre de préférence de 1 à N (1=préféré).<br/>Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur.<br/><a href='http://fr.wikipedia.org/wiki/Vote_alternatif'>Pour en savoir plus</a>
+pollen.choice.voteType.coombs.label=Coombs
+pollen.choice.voteType.coombs.description=Classer les choix par ordre de préférence de 1 à N (1=préféré).<br/>Seul l'ordre des choix compte, peu importe les valeurs. Deux choix peuvent avoir la même valeur.<br/><a href='http://fr.wikipedia.org/wiki/Méthode_de_Coombs'>Pour en savoir plus</a>
#user attributes
pollen.user.email.label=Email
@@ -74,9 +130,15 @@
#poll creation form
pollen.poll.form.create.button.save=Créer le sondage
+pollen.poll.form.create.button.next=Suivant
+pollen.poll.form.create.button.addChoice=Ajouter un choix
pollen.poll.form.create.field.title.label=Titre
pollen.poll.form.create.field.title.placeholder=Titre
pollen.poll.form.create.title=Création de sondage
+pollen.poll.form.create.legend.validityDates=Plage de validité
+pollen.poll.form.create.legend.choices=Choix
+pollen.poll.form.create.legend.votes=Votes
+pollen.poll.form.create.legend.results=Resultats
#poll lists
pollen.polls.created.title=Sondages créés
Added: trunk/pollen-ui-js/src/main/webapp/css/bootstrap-datetimepicker.min.css
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/css/bootstrap-datetimepicker.min.css (rev 0)
+++ trunk/pollen-ui-js/src/main/webapp/css/bootstrap-datetimepicker.min.css 2013-06-26 17:50:48 UTC (rev 3840)
@@ -0,0 +1,8 @@
+/*!
+ * Datepicker for Bootstrap
+ *
+ * Copyright 2012 Stefan Petre
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-datetimepicker-widget{top:0;left:0;width:250px;padding:4px;margin-top:1px;z-index:3000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.bootstrap-datetimepicker-widget:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,0.2);position:absolute;top:-7px;left:6px}.bootstrap-datetimepicker-widget:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:7px}.bootstrap-datetimepicker-widget.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget>ul{list-style-type:none;margin:0}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:100%;font-weight:bold;font-size:1.2em}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{text-align:center;width:20px;height:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget td.old,.bootstrap-datetimepicker-widget td.new{color:#999}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{color:#fff;background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget td.active:hover,.bootstrap-datetimepicker-widget td.active:hover:hover,.bootstrap-datetimepicker-widget td.active:active,.bootstrap-datetimepicker-widget td.active:hover:active,.bootstrap-datetimepicker-widget td.active.active,.bootstrap-datetimepicker-widget td.active:hover.active,.bootstrap-datetimepicker-widget td.active.disabled,.bootstrap-datetimepicker-widget td.active:hover.disabled,.bootstrap-datetimepicker-widget td.active[disabled],.bootstrap-datetimepicker-widget td.active:hover[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.bootstrap-datetimepicker-widget td.active:active,.bootstrap-datetimepicker-widget td.active:hover:active,.bootstrap-datetimepicker-widget td.active.active,.bootstrap-datetimepicker-widget td.active:hover.active{background-color:#039 \9}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{background:0;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget td span{display:block;width:47px;height:54px;line-height:54px;float:left;margin:2px;cursor:pointer;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{color:#fff;background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget td span.active:hover,.bootstrap-datetimepicker-widget td span.active:active,.bootstrap-datetimepicker-widget td span.active.active,.bootstrap-datetimepicker-widget td span.active.disabled,.bootstrap-datetimepicker-widget td span.active[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.bootstrap-datetimepicker-widget td span.active:active,.bootstrap-datetimepicker-widget td span.active.active{background-color:#039 \9}.bootstrap-datetimepicker-widget td span.old{color:#999}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{background:0;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget th.switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{background:0;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget thead tr:first-child th:hover{background:#eee}.input-append.date .add-on i,.input-prepend.date .add-on i{display:block;cursor:pointer;width:16px;height:16px}.bootstrap-datetimepicker-widget.left-oriented:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.left-oriented:after{left:auto;right:7px}
\ No newline at end of file
Modified: trunk/pollen-ui-js/src/main/webapp/index.html
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/index.html 2013-06-21 21:26:23 UTC (rev 3839)
+++ trunk/pollen-ui-js/src/main/webapp/index.html 2013-06-26 17:50:48 UTC (rev 3840)
@@ -26,6 +26,7 @@
<meta charset="utf-8"/>
<title>Pollen</title>
<link rel="stylesheet" href="pollen-ui-js.css"></link>
+ <link rel="stylesheet" href="css/bootstrap-datetimepicker.min.css"></link>
<link rel="stylesheet" href="css/style.css"></link>
</head>
@@ -51,19 +52,11 @@
<script src="pollen-ui-js.js"></script>
<script src="js/libs/jquery.scrollto.js"></script>
+ <script src="js/libs/bootstrap-datetimepicker.min.js"></script>
+ <script src="js/pollen-utils.js"></script>
- <script type="text/javascript">
- var backendUrl = 'http://localhost:8080/pollen/v1';
- var paramForWM = function(obj, objName) {
- var result = "";
- for (var k in obj) {
- result += objName + '.' + k + '=' + obj[k] + '&';
- }
- return result;
- }
- </script>
-
<script src="js/models/polls.js"></script>
+ <script src="js/models/choices.js"></script>
<script src="js/models/comments.js"></script>
<script src="js/models/votes.js"></script>
<script src="js/models/users.js"></script>
Modified: trunk/pollen-ui-js/src/main/webapp/js/controls/poll_form.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/controls/poll_form.js 2013-06-21 21:26:23 UTC (rev 3839)
+++ trunk/pollen-ui-js/src/main/webapp/js/controls/poll_form.js 2013-06-26 17:50:48 UTC (rev 3840)
@@ -23,36 +23,84 @@
var PollForm = can.Control({
defaults: {
- poll: new Poll()
+ poll: new Poll({ choiceAddAllowed: true }),
+ choices: new Choice.List([{}, {}]),
+ process: new can.Observe({
+ step: 1
+ })
}
}, {
+
init: function() {
+ var self = this;
this.element.html(can.view('views/poll_form.ejs', {
- poll: this.options.poll
+ poll: this.options.poll,
+ choices: this.options.choices,
+ process: this.options.process
}));
+ this.options.process.delegate('step', 'change', function(ev, prop, how, newVal, oldVal) {
+ var breadcrumbs = self.element.find('.breadcrumb li');
+ breadcrumbs.each(function() {
+ var li = $(this);
+ if (li.data('step') == newVal) {
+ li.addClass("active");
+ li.find('.step').removeClass("btn-link");
+ } else {
+ li.removeClass("active");
+ if (li.data('step') < newVal) {
+ li.find('.step').addClass("btn-link");
+ }
+ }
+ });
+
+ var div = self.element.find(".step" + newVal);
+ div.siblings().hide();
+ div.show();
+ });
+
+ this.options.poll.delegate('voteCountingType', 'change', function(ev, prop, how, newVal, oldVal) {
+ var toSelectOption = self.element.find('[name="voteCountingType"] [value=' + newVal + ']');
+ toSelectOption.attr('selected', 'selected');
+ $('#pollCreationFormVoteCountingTypeHelp').html(pollen.choice.voteType[toSelectOption.data('description')].description);
+ });
+
+ this.options.poll.delegate('choiceAddAllowed', 'change', function(ev, prop, how, newVal, oldVal) {
+ $('.dateTimePicker.addChoiceDate').each(function() {
+ if (newVal) {
+ $(this).data('datetimepicker').enable();
+ } else {
+ $(this).data('datetimepicker').disable();
+ }
+ });
+ });
},
':type/:action route': function(data) {
if (data.type === "poll" && data.action === "create") {
- var self = this;
- $.when(can.ajax(backendUrl + "/polls/new", {
- data: {
- choiceType: "TEXT",
- userId: currentUser.id
- }
- })).then(function(poll) {
- console.log(poll)
- self.editPoll(new Poll(poll));
- });
+ if (data.step) {
+ this.options.process.attr('step', data.step);
+ this.element.show();
+
+ } else {
+ var self = this;
+ $.when(can.ajax(backendUrl + "/polls/new", {
+ data: {
+ choiceType: "TEXT",
+ userId: currentUser.id
+ }
+ })).then(function(pollData) {
+ var poll = new Poll(pollData);
+ self.editPoll(poll);
+ });
+ }
}
},
':type/:id/:action route': function(data) {
if (data.type === "poll" && data.action === "edit") {
- var self = this;
$.when(Poll.findOne({id: data.id})).then(
function(poll) {
self.editPoll(poll);
@@ -60,11 +108,44 @@
}
},
+ '.breadcrumb .step click': function(el) {
+ var step = el.parent().data('step');
+ if (step < this.options.process.step) {
+ this.options.process.attr('step', step);
+ }
+ },
+
+ 'button.nextStep click': function() {
+ var process = this.options.process;
+ process.attr('step', process.step + 1);
+ },
+
+ '.dateTimePicker changeDate': function(el, e) {
+ var input = el.find('input');
+ var owner = input.data('owner');
+ owner.attr(input.attr('name'), e.localDate.getTime());
+ },
+
+ ':input:not(:checkbox):not(:checkbox) change': function(el) {
+ var owner = el.data('owner');
+ owner.attr(el.attr('name'), el.val());
+ },
+
+ ':checkbox change': function(el) {
+ var owner = el.data('owner');
+ owner.attr(el.attr('name'), el.prop('checked'));
+ },
+
+ '.addChoice click': function() {
+ this.options.choices.push({});
+ },
+
'#pollCreationForm submit': function(form) {
- var values = can.deparam(form.serialize()),
- self = this;
+ var self = this;
- this.options.poll.attr(values).save(function(data) {
+ this.options.poll.attr('choice', this.options.choices);
+
+ this.options.poll.save(function(data) {
if (data.id) {
self.options.poll.id = data.id;
}
@@ -77,6 +158,7 @@
editPoll: function(poll) {
this.options.poll.attr(poll._data, true);
this.element.siblings().hide();
+ this.options.process.attr('step', 3);
this.element.show();
}
Modified: trunk/pollen-ui-js/src/main/webapp/js/controls/poll_list.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/controls/poll_list.js 2013-06-21 21:26:23 UTC (rev 3839)
+++ trunk/pollen-ui-js/src/main/webapp/js/controls/poll_list.js 2013-06-26 17:50:48 UTC (rev 3840)
@@ -37,7 +37,7 @@
':type/:action route': function(data) {
if (data.type === "polls") {
var self = this;
- $.when(Poll.findAll()).then(
+ $.when(Poll.findAll({ category: 'created', userId: currentUser.id })).then(
function(polls) {
self.updatePolls(polls);
});
Modified: trunk/pollen-ui-js/src/main/webapp/js/controls/poll_summary.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/controls/poll_summary.js 2013-06-21 21:26:23 UTC (rev 3839)
+++ trunk/pollen-ui-js/src/main/webapp/js/controls/poll_summary.js 2013-06-26 17:50:48 UTC (rev 3840)
@@ -39,7 +39,7 @@
':type/:id/:action route': function(data) {
if (data.type === "poll" && data.action === "summary") {
var self = this;
- $.when(Poll.findOne({id: data.id})).then(
+ $.when(Poll.findOne({id: data.id, auth: currentUser.token})).then(
function(poll) {
self.updateSummary(poll);
});
Modified: trunk/pollen-ui-js/src/main/webapp/js/controls/vote.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/controls/vote.js 2013-06-21 21:26:23 UTC (rev 3839)
+++ trunk/pollen-ui-js/src/main/webapp/js/controls/vote.js 2013-06-26 17:50:48 UTC (rev 3840)
@@ -28,10 +28,11 @@
if (data.type === "poll" && data.action === "vote") {
var self = this;
$.when(Poll.findOne({id: data.id}),
+ Choice.findAll({pollId: data.id}),
Comment.findAll({pollId: data.id}),
Vote.findAll({pollId: data.id})).then(
- function(poll, comments, votes) {
- self.showPoll(poll, comments, votes);
+ function(poll, choices, comments, votes) {
+ self.showPoll(poll, choices, comments, votes);
});
}
},
@@ -137,11 +138,11 @@
// other functions
- showPoll: function(poll, comments, votes) {
+ showPoll: function(poll, choices, comments, votes) {
var results = new can.Observe.List();
// init results
- for (var i = 0 ; i < poll.choices.length ; i++) {
- results[poll.choices[i].id] = 0;
+ for (var i = 0 ; i < choices.length ; i++) {
+ results[choices[i].id] = 0;
}
// fill the results
for (i = 0 ; i < votes.length ; i++) {
@@ -160,11 +161,13 @@
poll.results = results;
this.options.poll = poll;
+ this.options.choices = choices;
this.options.votes = votes;
this.options.comments = comments;
this.element.html(can.view('views/vote.ejs', {
poll: poll,
+ choices: choices,
comments: comments,
votes: votes,
currentUser: currentUser
Added: trunk/pollen-ui-js/src/main/webapp/js/libs/bootstrap-datetimepicker.min.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/libs/bootstrap-datetimepicker.min.js (rev 0)
+++ trunk/pollen-ui-js/src/main/webapp/js/libs/bootstrap-datetimepicker.min.js 2013-06-26 17:50:48 UTC (rev 3840)
@@ -0,0 +1,26 @@
+/**
+ * @license
+ * =========================================================
+ * bootstrap-datetimepicker.js
+ * http://www.eyecon.ro/bootstrap-datepicker
+ * =========================================================
+ * Copyright 2012 Stefan Petre
+ *
+ * Contributions:
+ * - Andrew Rowls
+ * - Thiago de Arruda
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================================================
+ */
+(function($){var smartPhone=window.orientation!=undefined;var DateTimePicker=function(element,options){this.id=dpgId++;this.init(element,options)};var dateToDate=function(dt){if(typeof dt==="string"){return new Date(dt)}return dt};DateTimePicker.prototype={constructor:DateTimePicker,init:function(element,options){var icon;if(!(options.pickTime||options.pickDate))throw new Error("Must choose at least one picker");this.options=options;this.$element=$(element);this.language=options.language in dates?options.language:"en";this.pickDate=options.pickDate;this.pickTime=options.pickTime;this.isInput=this.$element.is("input");this.component=false;if(this.$element.find(".input-append")||this.$element.find(".input-prepend"))this.component=this.$element.find(".add-on");this.format=options.format;if(!this.format){if(this.isInput)this.format=this.$element.data("format");else this.format=this.$element.find("input").data("format");if(!this.format)this.format="MM/dd/yyyy"}this._compileFormat();if(this.component){icon=this.component.find("i")}if(this.pickTime){if(icon&&icon.length)this.timeIcon=icon.data("time-icon");if(!this.timeIcon)this.timeIcon="icon-time";icon.addClass(this.timeIcon)}if(this.pickDate){if(icon&&icon.length)this.dateIcon=icon.data("date-icon");if(!this.dateIcon)this.dateIcon="icon-calendar";icon.removeClass(this.timeIcon);icon.addClass(this.dateIcon)}this.widget=$(getTemplate(this.timeIcon,options.pickDate,options.pickTime,options.pick12HourFormat,options.pickSeconds,options.collapse)).appendTo("body");this.minViewMode=options.minViewMode||this.$element.data("date-minviewmode")||0;if(typeof this.minViewMode==="string"){switch(this.minViewMode){case"months":this.minViewMode=1;break;case"years":this.minViewMode=2;break;default:this.minViewMode=0;break}}this.viewMode=options.viewMode||this.$element.data("date-viewmode")||0;if(typeof this.viewMode==="string"){switch(this.viewMode){case"months":this.viewMode=1;break;case"years":this.viewMode=2;break;default:this.viewMode=0;break}}this.startViewMode=this.viewMode;this.weekStart=options.weekStart||this.$element.data("date-weekstart")||0;this.weekEnd=this.weekStart===0?6:this.weekStart-1;this.setStartDate(options.startDate||this.$element.data("date-startdate"));this.setEndDate(options.endDate||this.$element.data("date-enddate"));this.fillDow();this.fillMonths();this.fillHours();this.fillMinutes();this.fillSeconds();this.update();this.showMode();this._attachDatePickerEvents()},show:function(e){this.widget.show();this.height=this.component?this.component.outerHeight():this.$element.outerHeight();this.place();this.$element.trigger({type:"show",date:this._date});this._attachDatePickerGlobalEvents();if(e){e.stopPropagation();e.preventDefault()}},disable:function(){this.$element.find("input").prop("disabled",true);this._detachDatePickerEvents()},enable:function(){this.$element.find("input").prop("disabled",false);this._attachDatePickerEvents()},hide:function(){var collapse=this.widget.find(".collapse");for(var i=0;i<collapse.length;i++){var collapseData=collapse.eq(i).data("collapse");if(collapseData&&collapseData.transitioning)return}this.widget.hide();this.viewMode=this.startViewMode;this.showMode();this.set();this.$element.trigger({type:"hide",date:this._date});this._detachDatePickerGlobalEvents()},set:function(){var formatted="";if(!this._unset)formatted=this.formatDate(this._date);if(!this.isInput){if(this.component){var input=this.$element.find("input");input.val(formatted);this._resetMaskPos(input)}this.$element.data("date",formatted)}else{this.$element.val(formatted);this._resetMaskPos(this.$element)}},setValue:function(newDate){if(!newDate){this._unset=true}else{this._unset=false}if(typeof newDate==="string"){this._date=this.parseDate(newDate)}else if(newDate){this._date=new Date(newDate)}this.set();this.viewDate=UTCDate(this._date.getUTCFullYear(),this._date.getUTCMonth(),1,0,0,0,0);this.fillDate();this.fillTime()},getDate:function(){if(this._unset)return null;return new Date(this._date.valueOf())},setDate:function(date){if(!date)this.setValue(null);else this.setValue(date.valueOf())},setStartDate:function(date){if(date instanceof Date){this.startDate=date}else if(typeof date==="string"){this.startDate=new UTCDate(date);if(!this.startDate.getUTCFullYear()){this.startDate=-Infinity}}else{this.startDate=-Infinity}if(this.viewDate){this.update()}},setEndDate:function(date){if(date instanceof Date){this.endDate=date}else if(typeof date==="string"){this.endDate=new UTCDate(date);if(!this.endDate.getUTCFullYear()){this.endDate=Infinity}}else{this.endDate=Infinity}if(this.viewDate){this.update()}},getLocalDate:function(){if(this._unset)return null;var d=this._date;return new Date(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate(),d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds())},setLocalDate:function(localDate){if(!localDate)this.setValue(null);else this.setValue(Date.UTC(localDate.getFullYear(),localDate.getMonth(),localDate.getDate(),localDate.getHours(),localDate.getMinutes(),localDate.getSeconds(),localDate.getMilliseconds()))},place:function(){var position="absolute";var offset=this.component?this.component.offset():this.$element.offset();this.width=this.component?this.component.outerWidth():this.$element.outerWidth();offset.top=offset.top+this.height;var $window=$(window);if(this.options.width!=undefined){this.widget.width(this.options.width)}if(this.options.orientation=="left"){this.widget.addClass("left-oriented");offset.left=offset.left-this.widget.width()+20}if(this._isInFixed()){position="fixed";offset.top-=$window.scrollTop();offset.left-=$window.scrollLeft()}if($window.width()<offset.left+this.widget.outerWidth()){offset.right=$window.width()-offset.left-this.width;offset.left="auto";this.widget.addClass("pull-right")}else{offset.right="auto";this.widget.removeClass("pull-right")}this.widget.css({position:position,top:offset.top,left:offset.left,right:offset.right})},notifyChange:function(){this.$element.trigger({type:"changeDate",date:this.getDate(),localDate:this.getLocalDate()})},update:function(newDate){var dateStr=newDate;if(!dateStr){if(this.isInput){dateStr=this.$element.val()}else{dateStr=this.$element.find("input").val()}if(dateStr){this._date=this.parseDate(dateStr)}if(!this._date){var tmp=new Date;this._date=UTCDate(tmp.getFullYear(),tmp.getMonth(),tmp.getDate(),tmp.getHours(),tmp.getMinutes(),tmp.getSeconds(),tmp.getMilliseconds())}}this.viewDate=UTCDate(this._date.getUTCFullYear(),this._date.getUTCMonth(),1,0,0,0,0);this.fillDate();this.fillTime()},fillDow:function(){var dowCnt=this.weekStart;var html=$("<tr>");while(dowCnt<this.weekStart+7){html.append('<th class="dow">'+dates[this.language].daysMin[dowCnt++%7]+"</th>")}this.widget.find(".datepicker-days thead").append(html)},fillMonths:function(){var html="";var i=0;while(i<12){html+='<span class="month">'+dates[this.language].monthsShort[i++]+"</span>"}this.widget.find(".datepicker-months td").append(html)},fillDate:function(){var year=this.viewDate.getUTCFullYear();var month=this.viewDate.getUTCMonth();var currentDate=UTCDate(this._date.getUTCFullYear(),this._date.getUTCMonth(),this._date.getUTCDate(),0,0,0,0);var startYear=typeof this.startDate==="object"?this.startDate.getUTCFullYear():-Infinity;var startMonth=typeof this.startDate==="object"?this.startDate.getUTCMonth():-1;var endYear=typeof this.endDate==="object"?this.endDate.getUTCFullYear():Infinity;var endMonth=typeof this.endDate==="object"?this.endDate.getUTCMonth():12;this.widget.find(".datepicker-days").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-months").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-years").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-days th:eq(1)").text(dates[this.language].months[month]+" "+year);var prevMonth=UTCDate(year,month-1,28,0,0,0,0);var day=DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(),prevMonth.getUTCMonth());prevMonth.setUTCDate(day);prevMonth.setUTCDate(day-(prevMonth.getUTCDay()-this.weekStart+7)%7);if(year==startYear&&month<=startMonth||year<startYear){this.widget.find(".datepicker-days th:eq(0)").addClass("disabled")}if(year==endYear&&month>=endMonth||year>endYear){this.widget.find(".datepicker-days th:eq(2)").addClass("disabled")}var nextMonth=new Date(prevMonth.valueOf());nextMonth.setUTCDate(nextMonth.getUTCDate()+42);nextMonth=nextMonth.valueOf();var html=[];var row;var clsName;while(prevMonth.valueOf()<nextMonth){if(prevMonth.getUTCDay()===this.weekStart){row=$("<tr>");html.push(row)}clsName="";if(prevMonth.getUTCFullYear()<year||prevMonth.getUTCFullYear()==year&&prevMonth.getUTCMonth()<month){clsName+=" old"}else if(prevMonth.getUTCFullYear()>year||prevMonth.getUTCFullYear()==year&&prevMonth.getUTCMonth()>month){clsName+=" new"}if(prevMonth.valueOf()===currentDate.valueOf()){clsName+=" active"}if(prevMonth.valueOf()+864e5<=this.startDate){clsName+=" disabled"}if(prevMonth.valueOf()>this.endDate){clsName+=" disabled"}row.append('<td class="day'+clsName+'">'+prevMonth.getUTCDate()+"</td>");prevMonth.setUTCDate(prevMonth.getUTCDate()+1)}this.widget.find(".datepicker-days tbody").empty().append(html);var currentYear=this._date.getUTCFullYear();var months=this.widget.find(".datepicker-months").find("th:eq(1)").text(year).end().find("span").removeClass("active");if(currentYear===year){months.eq(this._date.getUTCMonth()).addClass("active")}if(currentYear-1<startYear){this.widget.find(".datepicker-months th:eq(0)").addClass("disabled")}if(currentYear+1>endYear){this.widget.find(".datepicker-months th:eq(2)").addClass("disabled")}for(var i=0;i<12;i++){if(year==startYear&&startMonth>i||year<startYear){$(months[i]).addClass("disabled")}else if(year==endYear&&endMonth<i||year>endYear){$(months[i]).addClass("disabled")}}html="";year=parseInt(year/10,10)*10;var yearCont=this.widget.find(".datepicker-years").find("th:eq(1)").text(year+"-"+(year+9)).end().find("td");this.widget.find(".datepicker-years").find("th").removeClass("disabled");if(startYear>year){this.widget.find(".datepicker-years").find("th:eq(0)").addClass("disabled")}if(endYear<year+9){this.widget.find(".datepicker-years").find("th:eq(2)").addClass("disabled")}year-=1;for(var i=-1;i<11;i++){html+='<span class="year'+(i===-1||i===10?" old":"")+(currentYear===year?" active":"")+(year<startYear||year>endYear?" disabled":"")+'">'+year+"</span>";year+=1}yearCont.html(html)},fillHours:function(){var table=this.widget.find(".timepicker .timepicker-hours table");table.parent().hide();var html="";if(this.options.pick12HourFormat){var current=1;for(var i=0;i<3;i+=1){html+="<tr>";for(var j=0;j<4;j+=1){var c=current.toString();html+='<td class="hour">'+padLeft(c,2,"0")+"</td>";current++}html+="</tr>"}}else{var current=0;for(var i=0;i<6;i+=1){html+="<tr>";for(var j=0;j<4;j+=1){var c=current.toString();html+='<td class="hour">'+padLeft(c,2,"0")+"</td>";current++}html+="</tr>"}}table.html(html)},fillMinutes:function(){var table=this.widget.find(".timepicker .timepicker-minutes table");table.parent().hide();var html="";var current=0;for(var i=0;i<5;i++){html+="<tr>";for(var j=0;j<4;j+=1){var c=current.toString();html+='<td class="minute">'+padLeft(c,2,"0")+"</td>";current+=3}html+="</tr>"}table.html(html)},fillSeconds:function(){var table=this.widget.find(".timepicker .timepicker-seconds table");table.parent().hide();var html="";var current=0;for(var i=0;i<5;i++){html+="<tr>";for(var j=0;j<4;j+=1){var c=current.toString();html+='<td class="second">'+padLeft(c,2,"0")+"</td>";current+=3}html+="</tr>"}table.html(html)},fillTime:function(){if(!this._date)return;var timeComponents=this.widget.find(".timepicker span[data-time-component]");var table=timeComponents.closest("table");var is12HourFormat=this.options.pick12HourFormat;var hour=this._date.getUTCHours();var period="AM";if(is12HourFormat){if(hour>=12)period="PM";if(hour===0)hour=12;else if(hour!=12)hour=hour%12;this.widget.find(".timepicker [data-action=togglePeriod]").text(period)}hour=padLeft(hour.toString(),2,"0");var minute=padLeft(this._date.getUTCMinutes().toString(),2,"0");var second=padLeft(this._date.getUTCSeconds().toString(),2,"0");timeComponents.filter("[data-time-component=hours]").text(hour);timeComponents.filter("[data-time-component=minutes]").text(minute);timeComponents.filter("[data-time-component=seconds]").text(second)},click:function(e){e.stopPropagation();e.preventDefault();this._unset=false;var target=$(e.target).closest("span, td, th");if(target.length===1){if(!target.is(".disabled")){switch(target[0].nodeName.toLowerCase()){case"th":switch(target[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var vd=this.viewDate;var navFnc=DPGlobal.modes[this.viewMode].navFnc;var step=DPGlobal.modes[this.viewMode].navStep;if(target[0].className==="prev")step=step*-1;vd["set"+navFnc](vd["get"+navFnc]()+step);this.fillDate();this.set();break}break;case"span":if(target.is(".month")){var month=target.parent().find("span").index(target);this.viewDate.setUTCMonth(month)}else{var year=parseInt(target.text(),10)||0;this.viewDate.setUTCFullYear(year)}if(this.viewMode!==0){this._date=UTCDate(this.viewDate.getUTCFullYear(),this.viewDate.getUTCMonth(),this.viewDate.getUTCDate(),this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.notifyChange()}this.showMode(-1);this.fillDate();this.set();break;case"td":if(target.is(".day")){var day=parseInt(target.text(),10)||1;var month=this.viewDate.getUTCMonth();var year=this.viewDate.getUTCFullYear();if(target.is(".old")){if(month===0){month=11;year-=1}else{month-=1}}else if(target.is(".new")){if(month==11){month=0;year+=1}else{month+=1}}this._date=UTCDate(year,month,day,this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.viewDate=UTCDate(year,month,Math.min(28,day),0,0,0,0);this.fillDate();this.set();this.notifyChange()}break}}}},actions:{incrementHours:function(e){this._date.setUTCHours(this._date.getUTCHours()+1)},incrementMinutes:function(e){this._date.setUTCMinutes(this._date.getUTCMinutes()+1)},incrementSeconds:function(e){this._date.setUTCSeconds(this._date.getUTCSeconds()+1)},decrementHours:function(e){this._date.setUTCHours(this._date.getUTCHours()-1)},decrementMinutes:function(e){this._date.setUTCMinutes(this._date.getUTCMinutes()-1)},decrementSeconds:function(e){this._date.setUTCSeconds(this._date.getUTCSeconds()-1)},togglePeriod:function(e){var hour=this._date.getUTCHours();if(hour>=12)hour-=12;else hour+=12;this._date.setUTCHours(hour)},showPicker:function(){this.widget.find(".timepicker > div:not(.timepicker-picker)").hide();this.widget.find(".timepicker .timepicker-picker").show()},showHours:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-hours").show()},showMinutes:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-seconds").show()},selectHour:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);if(this.options.pick12HourFormat){var current=this._date.getUTCHours();if(current>=12){if(value!=12)value=(value+12)%24}else{if(value===12)value=0;else value=value%12}}this._date.setUTCHours(value);this.actions.showPicker.call(this)},selectMinute:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);this._date.setUTCMinutes(value);this.actions.showPicker.call(this)},selectSecond:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);this._date.setUTCSeconds(value);this.actions.showPicker.call(this)}},doAction:function(e){e.stopPropagation();e.preventDefault();if(!this._date)this._date=UTCDate(1970,0,0,0,0,0,0);var action=$(e.currentTarget).data("action");var rv=this.actions[action].apply(this,arguments);this.set();this.fillTime();this.notifyChange();return rv},stopEvent:function(e){e.stopPropagation();e.preventDefault()},keydown:function(e){var self=this,k=e.which,input=$(e.target);if(k==8||k==46){setTimeout(function(){self._resetMaskPos(input)})}},keypress:function(e){var k=e.which;if(k==8||k==46){return}var input=$(e.target);var c=String.fromCharCode(k);var val=input.val()||"";val+=c;var mask=this._mask[this._maskPos];if(!mask){return false}if(mask.end!=val.length){return}if(!mask.pattern.test(val.slice(mask.start))){val=val.slice(0,val.length-1);while((mask=this._mask[this._maskPos])&&mask.character){val+=mask.character;this._maskPos++}val+=c;if(mask.end!=val.length){input.val(val);return false}else{if(!mask.pattern.test(val.slice(mask.start))){input.val(val.slice(0,mask.start));return false}else{input.val(val);this._maskPos++;return false}}}else{this._maskPos++}},change:function(e){var input=$(e.target);var val=input.val();if(this._formatPattern.test(val)){this.update();this.setValue(this._date.getTime());this.notifyChange();this.set()}else if(val&&val.trim()){this.setValue(this._date.getTime());if(this._date)this.set();else input.val("")}else{if(this._date){this.setValue(null);this.notifyChange();this._unset=true}}this._resetMaskPos(input)},showMode:function(dir){if(dir){this.viewMode=Math.max(this.minViewMode,Math.min(2,this.viewMode+dir))}this.widget.find(".datepicker > div").hide().filter(".datepicker-"+DPGlobal.modes[this.viewMode].clsName).show()},destroy:function(){this._detachDatePickerEvents();this._detachDatePickerGlobalEvents();this.widget.remove();this.$element.removeData("datetimepicker");this.component.removeData("datetimepicker")},formatDate:function(d){return this.format.replace(formatReplacer,function(match){var methodName,property,rv,len=match.length;if(match==="ms")len=1;property=dateFormatComponents[match].property;if(property==="Hours12"){rv=d.getUTCHours();if(rv===0)rv=12;else if(rv!==12)rv=rv%12}else if(property==="Period12"){if(d.getUTCHours()>=12)return"PM";else return"AM"}else{methodName="get"+property;rv=d[methodName]()}if(methodName==="getUTCMonth")rv=rv+1;if(methodName==="getUTCYear")rv=rv+1900-2e3;return padLeft(rv.toString(),len,"0")})},parseDate:function(str){var match,i,property,methodName,value,parsed={};if(!(match=this._formatPattern.exec(str)))return null;for(i=1;i<match.length;i++){property=this._propertiesByIndex[i];if(!property)continue;value=match[i];if(/^\d+$/.test(value))value=parseInt(value,10);parsed[property]=value}return this._finishParsingDate(parsed)},_resetMaskPos:function(input){var val=input.val();for(var i=0;i<this._mask.length;i++){if(this._mask[i].end>val.length){this._maskPos=i;break}else if(this._mask[i].end===val.length){this._maskPos=i+1;break}}},_finishParsingDate:function(parsed){var year,month,date,hours,minutes,seconds,milliseconds;year=parsed.UTCFullYear;if(parsed.UTCYear)year=2e3+parsed.UTCYear;if(!year)year=1970;if(parsed.UTCMonth)month=parsed.UTCMonth-1;else month=0;date=parsed.UTCDate||1;hours=parsed.UTCHours||0;minutes=parsed.UTCMinutes||0;seconds=parsed.UTCSeconds||0;milliseconds=parsed.UTCMilliseconds||0;if(parsed.Hours12){hours=parsed.Hours12}if(parsed.Period12){if(/pm/i.test(parsed.Period12)){if(hours!=12)hours=(hours+12)%24}else{hours=hours%12}}return UTCDate(year,month,date,hours,minutes,seconds,milliseconds)},_compileFormat:function(){var match,component,components=[],mask=[],str=this.format,propertiesByIndex={},i=0,pos=0;while(match=formatComponent.exec(str)){component=match[0];if(component in dateFormatComponents){i++;propertiesByIndex[i]=dateFormatComponents[component].property;components.push("\\s*"+dateFormatComponents[component].getPattern(this)+"\\s*");mask.push({pattern:new RegExp(dateFormatComponents[component].getPattern(this)),property:dateFormatComponents[component].property,start:pos,end:pos+=component.length})}else{components.push(escapeRegExp(component));mask.push({pattern:new RegExp(escapeRegExp(component)),character:component,start:pos,end:++pos})}str=str.slice(component.length)}this._mask=mask;this._maskPos=0;this._formatPattern=new RegExp("^\\s*"+components.join("")+"\\s*$");this._propertiesByIndex=propertiesByIndex},_attachDatePickerEvents:function(){var self=this;this.widget.on("click",".datepicker *",$.proxy(this.click,this));this.widget.on("click","[data-action]",$.proxy(this.doAction,this));this.widget.on("mousedown",$.proxy(this.stopEvent,this));if(this.pickDate&&this.pickTime){this.widget.on("click.togglePicker",".accordion-toggle",function(e){e.stopPropagation();var $this=$(this);var $parent=$this.closest("ul");var expanded=$parent.find(".collapse.in");var closed=$parent.find(".collapse:not(.in)");if(expanded&&expanded.length){var collapseData=expanded.data("collapse");if(collapseData&&collapseData.transitioning)return;expanded.collapse("hide");closed.collapse("show");$this.find("i").toggleClass(self.timeIcon+" "+self.dateIcon);self.$element.find(".add-on i").toggleClass(self.timeIcon+" "+self.dateIcon)}})}if(this.isInput){this.$element.on({focus:$.proxy(this.show,this),change:$.proxy(this.change,this)});if(this.options.maskInput){this.$element.on({keydown:$.proxy(this.keydown,this),keypress:$.proxy(this.keypress,this)})}}else{this.$element.on({change:$.proxy(this.change,this)},"input");if(this.options.maskInput){this.$element.on({keydown:$.proxy(this.keydown,this),keypress:$.proxy(this.keypress,this)},"input")}if(this.component){this.component.on("click",$.proxy(this.show,this))}else{this.$element.on("click",$.proxy(this.show,this))}}},_attachDatePickerGlobalEvents:function(){$(window).on("resize.datetimepicker"+this.id,$.proxy(this.place,this));if(!this.isInput){$(document).on("mousedown.datetimepicker"+this.id,$.proxy(this.hide,this))}},_detachDatePickerEvents:function(){this.widget.off("click",".datepicker *",this.click);this.widget.off("click","[data-action]");this.widget.off("mousedown",this.stopEvent);if(this.pickDate&&this.pickTime){this.widget.off("click.togglePicker")}if(this.isInput){this.$element.off({focus:this.show,change:this.change});if(this.options.maskInput){this.$element.off({keydown:this.keydown,keypress:this.keypress})}}else{this.$element.off({change:this.change},"input");if(this.options.maskInput){this.$element.off({keydown:this.keydown,keypress:this.keypress},"input")}if(this.component){this.component.off("click",this.show)}else{this.$element.off("click",this.show)}}},_detachDatePickerGlobalEvents:function(){$(window).off("resize.datetimepicker"+this.id);if(!this.isInput){$(document).off("mousedown.datetimepicker"+this.id)}},_isInFixed:function(){if(this.$element){var parents=this.$element.parents();var inFixed=false;for(var i=0;i<parents.length;i++){if($(parents[i]).css("position")=="fixed"){inFixed=true;break}}return inFixed}else{return false}}};$.fn.datetimepicker=function(option,val){return this.each(function(){var $this=$(this),data=$this.data("datetimepicker"),options=typeof option==="object"&&option;if(!data){$this.data("datetimepicker",data=new DateTimePicker(this,$.extend({},$.fn.datetimepicker.defaults,options)))}if(typeof option==="string")data[option](val)})};$.fn.datetimepicker.defaults={maskInput:false,pickDate:true,pickTime:true,pick12HourFormat:false,pickSeconds:true,startDate:-Infinity,endDate:Infinity,collapse:true};$.fn.datetimepicker.Constructor=DateTimePicker;var dpgId=0;var dates=$.fn.datetimepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}};var dateFormatComponents={dd:{property:"UTCDate",getPattern:function(){return"(0?[1-9]|[1-2][0-9]|3[0-1])\\b"}},MM:{property:"UTCMonth",getPattern:function(){return"(0?[1-9]|1[0-2])\\b"}},yy:{property:"UTCYear",getPattern:function(){return"(\\d{2})\\b"}},yyyy:{property:"UTCFullYear",getPattern:function(){return"(\\d{4})\\b"}},hh:{property:"UTCHours",getPattern:function(){return"(0?[0-9]|1[0-9]|2[0-3])\\b"}},mm:{property:"UTCMinutes",getPattern:function(){return"(0?[0-9]|[1-5][0-9])\\b"}},ss:{property:"UTCSeconds",getPattern:function(){return"(0?[0-9]|[1-5][0-9])\\b"}},ms:{property:"UTCMilliseconds",getPattern:function(){return"([0-9]{1,3})\\b"}},HH:{property:"Hours12",getPattern:function(){return"(0?[1-9]|1[0-2])\\b"}},PP:{property:"Period12",getPattern:function(){return"(AM|PM|am|pm|Am|aM|Pm|pM)\\b"}}};var keys=[];for(var k in dateFormatComponents)keys.push(k);keys[keys.length-1]+="\\b";keys.push(".");var formatComponent=new RegExp(keys.join("\\b|"));keys.pop();var formatReplacer=new RegExp(keys.join("\\b|"),"g");function escapeRegExp(str){return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function padLeft(s,l,c){if(l<s.length)return s;else return Array(l-s.length+1).join(c||" ")+s}function getTemplate(timeIcon,pickDate,pickTime,is12Hours,showSeconds,collapse){if(pickDate&&pickTime){return'<div class="bootstrap-datetimepicker-widget dropdown-menu">'+"<ul>"+"<li"+(collapse?' class="collapse in"':"")+">"+'<div class="datepicker">'+DPGlobal.template+"</div>"+"</li>"+'<li class="picker-switch accordion-toggle"><a><i class="'+timeIcon+'"></i></a></li>'+"<li"+(collapse?' class="collapse"':"")+">"+'<div class="timepicker">'+TPGlobal.getTemplate(is12Hours,showSeconds)+"</div>"+"</li>"+"</ul>"+"</div>"}else if(pickTime){return'<div class="bootstrap-datetimepicker-widget dropdown-menu">'+'<div class="timepicker">'+TPGlobal.getTemplate(is12Hours,showSeconds)+"</div>"+"</div>"}else{return'<div class="bootstrap-datetimepicker-widget dropdown-menu">'+'<div class="datepicker">'+DPGlobal.template+"</div>"+"</div>"}}function UTCDate(){return new Date(Date.UTC.apply(Date,arguments))}var DPGlobal={modes:[{clsName:"days",navFnc:"UTCMonth",navStep:1},{clsName:"months",navFnc:"UTCFullYear",navStep:1},{clsName:"years",navFnc:"UTCFullYear",navStep:10}],isLeapYear:function(year){return year%4===0&&year%100!==0||year%400===0},getDaysInMonth:function(year,month){return[31,DPGlobal.isLeapYear(year)?29:28,31,30,31,30,31,31,30,31,30,31][month]},headTemplate:"<thead>"+"<tr>"+'<th class="prev">‹</th>'+'<th colspan="5" class="switch"></th>'+'<th class="next">›</th>'+"</tr>"+"</thead>",contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>'};DPGlobal.template='<div class="datepicker-days">'+'<table class="table-condensed">'+DPGlobal.headTemplate+"<tbody></tbody>"+"</table>"+"</div>"+'<div class="datepicker-months">'+'<table class="table-condensed">'+DPGlobal.headTemplate+DPGlobal.contTemplate+"</table>"+"</div>"+'<div class="datepicker-years">'+'<table class="table-condensed">'+DPGlobal.headTemplate+DPGlobal.contTemplate+"</table>"+"</div>";var TPGlobal={hourTemplate:'<span data-action="showHours" data-time-component="hours" class="timepicker-hour"></span>',minuteTemplate:'<span data-action="showMinutes" data-time-component="minutes" class="timepicker-minute"></span>',secondTemplate:'<span data-action="showSeconds" data-time-component="seconds" class="timepicker-second"></span>'};TPGlobal.getTemplate=function(is12Hours,showSeconds){return'<div class="timepicker-picker">'+'<table class="table-condensed"'+(is12Hours?' data-hour-format="12"':"")+">"+"<tr>"+'<td><a href="#" class="btn" data-action="incrementHours"><i class="icon-chevron-up"></i></a></td>'+'<td class="separator"></td>'+'<td><a href="#" class="btn" data-action="incrementMinutes"><i class="icon-chevron-up"></i></a></td>'+(showSeconds?'<td class="separator"></td>'+'<td><a href="#" class="btn" data-action="incrementSeconds"><i class="icon-chevron-up"></i></a></td>':"")+(is12Hours?'<td class="separator"></td>':"")+"</tr>"+"<tr>"+"<td>"+TPGlobal.hourTemplate+"</td> "+'<td class="separator">:</td>'+"<td>"+TPGlobal.minuteTemplate+"</td> "+(showSeconds?'<td class="separator">:</td>'+"<td>"+TPGlobal.secondTemplate+"</td>":"")+(is12Hours?'<td class="separator"></td>'+"<td>"+'<button type="button" class="btn btn-primary" data-action="togglePeriod"></button>'+"</td>":"")+"</tr>"+"<tr>"+'<td><a href="#" class="btn" data-action="decrementHours"><i class="icon-chevron-down"></i></a></td>'+'<td class="separator"></td>'+'<td><a href="#" class="btn" data-action="decrementMinutes"><i class="icon-chevron-down"></i></a></td>'+(showSeconds?'<td class="separator"></td>'+'<td><a href="#" class="btn" data-action="decrementSeconds"><i class="icon-chevron-down"></i></a></td>':"")+(is12Hours?'<td class="separator"></td>':"")+"</tr>"+"</table>"+"</div>"+'<div class="timepicker-hours" data-action="selectHour">'+'<table class="table-condensed">'+"</table>"+"</div>"+'<div class="timepicker-minutes" data-action="selectMinute">'+'<table class="table-condensed">'+"</table>"+"</div>"+(showSeconds?'<div class="timepicker-seconds" data-action="selectSecond">'+'<table class="table-condensed">'+"</table>"+"</div>":"")}})(window.jQuery);
\ No newline at end of file
Added: trunk/pollen-ui-js/src/main/webapp/js/models/choices.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/models/choices.js (rev 0)
+++ trunk/pollen-ui-js/src/main/webapp/js/models/choices.js 2013-06-26 17:50:48 UTC (rev 3840)
@@ -0,0 +1,7 @@
+var Choice = can.Model({
+ findAll : "GET " + backendUrl + "/polls/{pollId}/choices",
+ findOne : "GET " + backendUrl + "/polls/{pollId}/choices/{id}",
+ create : "POST " + backendUrl + "/polls/{pollId}/choices",
+ update : "PUT " + backendUrl + "/polls/{pollId}/choices/{id}",
+ destroy : "DELETE " + backendUrl + "/polls/{pollId}/choices/{id}"
+},{});
\ No newline at end of file
Modified: trunk/pollen-ui-js/src/main/webapp/js/models/comments.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/models/comments.js 2013-06-21 21:26:23 UTC (rev 3839)
+++ trunk/pollen-ui-js/src/main/webapp/js/models/comments.js 2013-06-26 17:50:48 UTC (rev 3840)
@@ -50,7 +50,7 @@
];
can.fixture("GET " + backendUrl + "/polls/{pollId}/comments", function(orig) {
- return COMMENTS[orig.data.pollId - 1];
+ return [];
});
var idToInc= 3;
Modified: trunk/pollen-ui-js/src/main/webapp/js/models/polls.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/models/polls.js 2013-06-21 21:26:23 UTC (rev 3839)
+++ trunk/pollen-ui-js/src/main/webapp/js/models/polls.js 2013-06-26 17:50:48 UTC (rev 3840)
@@ -21,20 +21,19 @@
* #L%
*/
var Poll = can.Model({
- findAll : "GET " + backendUrl + "/polls",
- findOne : "GET " + backendUrl + "/polls/{id}",
- create : function(attrs) {
- var t = paramForWM(attrs, 'poll') + 'userId=' + currentUser.id;
- return can.ajax(backendUrl + "/polls",{
- type: "POST",
- data: t
- });
- },
- update : "PUT " + backendUrl + "/polls/{id}",
- destroy : "DELETE " + backendUrl + "/polls/{id}"
-},{});
+ findAll : "GET " + backendUrl + "/polls/{category}",
+ findOne : "GET " + backendUrl + "/polls/{id}",
+ create : function(attrs) {
+ var t = paramForWM(attrs, 'poll') + 'userId=' + currentUser.id;
+ return can.ajax(backendUrl + "/polls", {
+ type: "POST",
+ data: t
+ });
+ },
+ update : "PUT " + backendUrl + "/polls/{id}",
+ destroy : "DELETE " + backendUrl + "/polls/{id}"
+}, {});
-console.log("load polls")
var POLLS = [
{
id: 1,
Modified: trunk/pollen-ui-js/src/main/webapp/js/models/votes.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/models/votes.js 2013-06-21 21:26:23 UTC (rev 3839)
+++ trunk/pollen-ui-js/src/main/webapp/js/models/votes.js 2013-06-26 17:50:48 UTC (rev 3840)
@@ -148,7 +148,7 @@
];
can.fixture("GET " + backendUrl + "/polls/{pollId}/votes", function(orig) {
- return VOTES[orig.data.pollId - 1];
+ return [];
});
var idToInc= 3;
Added: trunk/pollen-ui-js/src/main/webapp/js/pollen-utils.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/pollen-utils.js (rev 0)
+++ trunk/pollen-ui-js/src/main/webapp/js/pollen-utils.js 2013-06-26 17:50:48 UTC (rev 3840)
@@ -0,0 +1,13 @@
+var backendUrl = 'http://localhost:8080/pollen/v1';
+
+var paramForWM = function(obj, objName) {
+ var result = "";
+ for (var k in obj) {
+ if (typeof obj[k] === "object") {
+ result += paramForWM(obj[k], objName + '.' + k);
+ } else {
+ result += objName + '.' + k + '=' + obj[k] + '&';
+ }
+ }
+ return result;
+}
\ No newline at end of file
Modified: trunk/pollen-ui-js/src/main/webapp/views/poll_form.ejs
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/views/poll_form.ejs 2013-06-21 21:26:23 UTC (rev 3839)
+++ trunk/pollen-ui-js/src/main/webapp/views/poll_form.ejs 2013-06-26 17:50:48 UTC (rev 3840)
@@ -1,27 +1,319 @@
<h1><%= pollen.poll.form.create.title %></h1>
+<ul class="breadcrumb">
+ <li class='active' <%= (el) -> el.data('step', 1) %>><span class='step'>Step 1</span> <span class="divider">/</span></li>
+ <li <%= (el) -> el.data('step', 2) %>><span class='step'>Step 2</span> <span class="divider">/</span></li>
+<li <%= (el) -> el.data('step', 3) %>><span class='step'>Step 3</span> <span class="divider">/</span></li>
+</ul>
+
<form id='pollCreationForm' class="form-horizontal">
- <div class="control-group">
- <label class="control-label" for="pollCreationFormTitle"><%= pollen.poll.title.label %></label>
- <div class="controls">
- <input type='text' name='title' id='pollCreationFormTitle'
- placeholder='<%= pollen.poll.title.placeholder %>'
- value='<%= poll.attr("title")%>'/>
+ <!-- Basic info step -->
+ <div class='step1'>
+ <div class="control-group">
+ <label class="control-label" for="pollCreationFormTitle"><%= pollen.poll.title.label %></label>
+ <div class="controls">
+ <input type='text' name='title' id='pollCreationFormTitle'
+ placeholder='<%= pollen.poll.title.placeholder %>'
+ value='<%= poll.attr("title")%>'
+ <%= (el) -> el.data('owner', poll) %>/>
+ </div>
</div>
+
+ <div class="control-group">
+ <label class="control-label" for='pollCreationFormDescription'><%= pollen.poll.description.label %></label>
+ <div class="controls">
+ <textarea id='pollCreationFormDescription'
+ name='description'
+ placeholder="<%= pollen.poll.description.placeholder %>"
+ <%= (el) -> el.data('owner', poll) %>><%= poll.attr('description') %></textarea>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for='pollCreationFormCreatorName'><%= pollen.poll.creator.name.label %></label>
+ <div class="controls">
+ <input type='text' name='creator.name' id='pollCreationFormCreatorName'
+ placeholder='<%= pollen.poll.creator.name.placeholder %>'
+ value='<%= poll.attr("creator.name")%>'
+ <%= (el) -> el.data('owner', poll) %>/>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for='pollCreationFormCreatorEmail'><%= pollen.poll.creator.email.label %></label>
+ <div class="controls">
+ <input type='text' name='creator.email' id='pollCreationFormCreatorEmail'
+ placeholder='<%= pollen.poll.creator.email.placeholder %>'
+ value='<%= poll.attr("creator.email")%>'
+ <%= (el) -> el.data('owner', poll) %>/>
+ </div>
+ </div>
+
+ <div class="form-actions">
+ <button type="button" class="btn btn-primary nextStep"><%= pollen.poll.form.create.button.next %></button>
+ </div>
</div>
- <div class="control-group">
- <label class="control-label" for='pollCreationFormDescription'><%= pollen.poll.description.label %></label>
- <div class="controls">
- <textarea id='pollCreationFormDescription'
- name='description'
- placeholder="<%= pollen.poll.description.placeholder %>"><%= poll.attr('description') %></textarea>
+ <!-- choices step -->
+ <div class='step2 hide'>
+ <div class="control-group">
+ <label class="control-label" for="pollCreationFormVoteCountingType"><%= pollen.poll.voteCountingType.label %></label>
+ <div class="controls">
+ <select name='voteCountingType' id='pollCreationFormVoteCountingType' <%= (el) -> el.data('owner', poll) %>>
+ <option value="1" <%= (el) -> el.data('description', 'normal') %>><%= pollen.choice.voteType.normal.label %></option>
+ <option value="2" <%= (el) -> el.data('description', 'percentage') %>><%= pollen.choice.voteType.percentage.label %></option>
+ <option value="3" <%= (el) -> el.data('description', 'condorcet') %>><%= pollen.choice.voteType.condorcet.label %></option>
+ <option value="4" <%= (el) -> el.data('description', 'number') %>><%= pollen.choice.voteType.number.label %></option>
+ <option value="5" <%= (el) -> el.data('description', 'borda') %>><%= pollen.choice.voteType.borda.label %></option>
+ <option value="6" <%= (el) -> el.data('description', 'alternative') %>><%= pollen.choice.voteType.alternative.label %></option>
+ <option value="7" <%= (el) -> el.data('description', 'coombs') %>><%= pollen.choice.voteType.coombs.label %></option>
+ </select>
+ <span id='pollCreationFormVoteCountingTypeHelp' class="help-block"><%= pollen.choice.voteType.normal.description %></span>
+ </div>
</div>
+
+ <% choices.each(function(choice) { %>
+ <div class="control-group controls-row">
+ <label class="control-label span1" for='pollCreationFormCreatorName'><%= pollen.poll.choice.name.label %></label>
+ <div class="controls span2">
+ <input type='text' name='name'
+ placeholder='<%= pollen.poll.choice.name.placeholder %>'
+ value="<%= choice.attr('name') %>"
+ <%= (el) -> el.data('owner', choice) %>/>
+ </div>
+
+ <label class="control-label span1" for='pollCreationFormCreatorName'><%= pollen.poll.choice.description.label %></label>
+ <div class="controls span3">
+ <textarea name='description' class=""
+ placeholder="<%= pollen.poll.choice.description.placeholder %>"
+ <%= (el) -> el.data('owner', choice) %>><%= choice.attr('description') %></textarea>
+ </div>
+ </div>
+ <% }) %>
+
+ <div class="form-actions">
+ <button type='button' class='btn addChoice'><%= pollen.poll.form.create.button.addChoice %></button>
+ <button type="button" class="btn btn-primary nextStep"><%= pollen.poll.form.create.button.next %></button>
+ </div>
+
</div>
- <div class="form-actions">
+ <!-- Options step -->
+ <div class='step3 hide'>
+
+ <!-- dates -->
+ <fieldset>
+ <legend><%= pollen.poll.form.create.legend.validityDates %></legend>
+
+ <div class="control-group">
+ <label class="control-label" for='pollCreationFormBeginDate'><%= pollen.poll.beginDate.label %></label>
+ <div class="controls">
+ <div class="input-append dateTimePicker">
+ <input type="text" name='beginDate' id='pollCreationFormBeginDate'
+ placeholder='<%= pollen.poll.beginDate.placeholder %>'
+ value='<%= poll.attr("beginDate") ? moment(poll.attr("beginDate")).format(pollen.common.format.dateTime.moment) : "" %>'
+ <%= (el) -> el.data('owner', poll) %>/>
+ <span class="add-on">
+ <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
+ </span>
+ </div>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for='pollCreationFormEndDate'><%= pollen.poll.endDate.label %></label>
+ <div class="controls">
+ <div class="input-append dateTimePicker">
+ <input type="text" name='endDate' id='pollCreationFormEndDate'
+ placeholder='<%= pollen.poll.endDate.placeholder %>'
+ value='<%= poll.attr("endDate") ? moment(poll.attr("endDate")).format(pollen.common.format.dateTime.moment) : "" %>'
+ <%= (el) -> el.data('owner', poll) %>/>
+ <span class="add-on">
+ <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
+ </span>
+ </div>
+ </div>
+ </div>
+
+ </fieldset>
+
+ <!-- choices -->
+ <fieldset>
+ <legend><%= pollen.poll.form.create.legend.choices %></legend>
+
+ <div class="control-group">
+ <div class="controls">
+ <label class="checkbox">
+ <input type="checkbox" id='pollCreationFormChoiceAddAllowed' name="choiceAddAllowed"
+ <%= poll.attr('choiceAddAllowed') ? "checked": "" %>
+ <%= (el) -> el.data('owner', poll) %>/>
+ <%= pollen.poll.choiceAddAllowed.label %>
+ </label>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for='pollCreationFormAddChoiceBeginDate'><%= pollen.poll.addChoiceBeginDate.label %></label>
+ <div class="controls">
+ <div class="input-append dateTimePicker addChoiceDate">
+ <input type="text" name='addChoiceBeginDate' id='pollCreationFormAddChoiceBeginDate'
+ placeholder='<%= pollen.poll.addChoiceBeginDate.placeholder %>'
+ value='<%= poll.attr("addChoiceBeginDate") ? moment(poll.attr("addChoiceBeginDate")).format(pollen.common.format.dateTime.moment) : "" %>'
+ <%= (el) -> el.data('owner', poll) %>/>
+ <span class="add-on">
+ <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
+ </span>
+ </div>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for='pollCreationFormAddChoiceEndDate'><%= pollen.poll.addChoiceEndDate.label %></label>
+ <div class="controls">
+ <div class="input-append dateTimePicker addChoiceDate">
+ <input type="text" name='addChoiceEndDate' id='pollCreationFormAddChoiceEndDate'
+ placeholder='<%= pollen.poll.addChoiceEndDate.placeholder %>'
+ value='<%= poll.attr("addChoiceEndDate") ? moment(poll.attr("addChoiceEndDate")).format(pollen.common.format.dateTime.moment) : "" %>'
+ <%= (el) -> el.data('owner', poll) %>/>
+ <span class="add-on">
+ <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
+ </span>
+ </div>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for='pollCreationFormMaxChoiceNumber'><%= pollen.poll.maxChoiceNumber.label %></label>
+ <div class="controls">
+ <input type='number' name='maxChoiceNumber' id='pollCreationFormMaxChoiceNumber'
+ placeholder='<%= pollen.poll.maxChoiceNumber.placeholder %>'
+ value='<%= poll.attr("maxChoiceNumber")%>'
+ <%= (el) -> el.data('owner', poll) %>/>
+ </div>
+ </div>
+
+ </fieldset>
+
+ <!-- votes -->
+ <fieldset>
+ <legend><%= pollen.poll.form.create.legend.votes %></legend>
+
+ <div class="control-group">
+ <label class="control-label" for="pollCreationFormCommentVisibility"><%= pollen.poll.commentVisibility.label %></label>
+ <div class="controls">
+ <select name='commentVisibility' id='pollCreationFormCommentVisibility' <%= (el) -> el.data('owner', poll) %>>
+ <option value="EVERYBODY"><%= pollen.poll.commentVisibility.everybody.label %></option>
+ <option value="VOTER"><%= pollen.poll.commentVisibility.voter.label %></option>
+ <option value="NOBODY"><%= pollen.poll.commentVisibility.nobody.label %></option>
+ </select>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for="pollCreationFormVoteVisibility"><%= pollen.poll.voteVisibility.label %></label>
+ <div class="controls">
+ <select name='voteVisibility' id='pollCreationFormVoteVisibility' <%= (el) -> el.data('owner', poll) %>>
+ <option value="EVERYBODY"><%= pollen.poll.voteVisibility.everybody.label %></option>
+ <option value="VOTER"><%= pollen.poll.voteVisibility.voter.label %></option>
+ <option value="CREATOR"><%= pollen.poll.voteVisibility.creator.label %></option>
+ <option value="ANONYMOUS"><%= pollen.poll.voteVisibility.anonymous.label %></option>
+ </select>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <div class="controls">
+ <label class="checkbox">
+ <input type="checkbox" id='pollCreationFormAnonymousVoteAllowed' name="anonymousVoteAllowed"
+ <%= poll.attr('anonymousVoteAllowed') ? "checked": "" %>
+ <%= (el) -> el.data('owner', poll) %>/>
+ <%= pollen.poll.anonymousVoteAllowed.label %>
+ </label>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for="pollCreationFormPollType"><%= pollen.poll.pollType.label %></label>
+ <div class="controls">
+ <select name='pollType' id='pollCreationFormPollType' <%= (el) -> el.data('owner', poll) %>>
+ <option value="FREE"><%= pollen.poll.pollType.free.label %></option>
+ <option value="RESTRICTED"><%= pollen.poll.pollType.restricted.label %></option>
+ <option value="GROUP"><%= pollen.poll.pollType.group.label %></option>
+ </select>
+ </div>
+ </div>
+
+ </fieldset>
+
+ <!-- results -->
+ <fieldset>
+ <legend><%= pollen.poll.form.create.legend.results %></legend>
+
+ <div class="control-group">
+ <label class="control-label" for="pollCreationFormResultVisibility"><%= pollen.poll.resultVisibility.label %></label>
+ <div class="controls">
+ <select name='resultVisibility' id='pollCreationFormResultVisibility' <%= (el) -> el.data('owner', poll) %>>
+ <option value="EVERYBODY"><%= pollen.poll.resultVisibility.everybody.label %></option>
+ <option value="VOTER"><%= pollen.poll.resultVisibility.voter.label %></option>
+ <option value="CREATOR"><%= pollen.poll.resultVisibility.creator.label %></option>
+ </select>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <div class="controls">
+ <label class="checkbox">
+ <input type="checkbox" id='pollCreationFormContinuousResults' name="continuousResults"
+ <%= poll.attr('continuousResults') ? "checked": "" %>
+ <%= (el) -> el.data('owner', poll) %>/>
+ <%= pollen.poll.continuousResults.label %>
+ </label>
+ </div>
+ </div>
+
+ </fieldset>
+
+ <!-- notifications -->
+ <fieldset>
+ <legend><%= pollen.poll.form.create.legend.notifications %></legend>
+
+ <div class="control-group">
+ <label class="control-label" for="pollCreationFormResultVisibility"><%= pollen.poll.resultVisibility.label %></label>
+ <div class="controls">
+ <select name='resultVisibility' id='pollCreationFormResultVisibility' <%= (el) -> el.data('owner', poll) %>>
+ <option value="EVERYBODY"><%= pollen.poll.resultVisibility.everybody.label %></option>
+ <option value="VOTER"><%= pollen.poll.resultVisibility.voter.label %></option>
+ <option value="CREATOR"><%= pollen.poll.resultVisibility.creator.label %></option>
+ </select>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <div class="controls">
+ <label class="checkbox">
+ <input type="checkbox" id='pollCreationFormContinuousResults' name="continuousResults"
+ <%= poll.attr('continuousResults') ? "checked": "" %>
+ <%= (el) -> el.data('owner', poll) %>/>
+ <%= pollen.poll.continuousResults.label %>
+ </label>
+ </div>
+ </div>
+
+ </fieldset>
+ <div class="form-actions">
<button type='submit' class="btn btn-primary"><%= pollen.poll.form.create.button.save %></button>
+ </div>
</div>
-</form>
\ No newline at end of file
+</form>
+
+<%
+ $(function() {
+ $('.dateTimePicker').datetimepicker({
+ language: 'fr_FR',
+ pickSeconds: false,
+ format: pollen.common.format.dateTime.input
+ });
+ });
+%>
\ No newline at end of file
Modified: trunk/pollen-ui-js/src/main/webapp/views/vote.ejs
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/views/vote.ejs 2013-06-21 21:26:23 UTC (rev 3839)
+++ trunk/pollen-ui-js/src/main/webapp/views/vote.ejs 2013-06-26 17:50:48 UTC (rev 3840)
@@ -3,18 +3,18 @@
<h1><%= poll.attr('title') %></h1>
<p>
- <%= pollen.vote.poll.author(poll.attr('creatorName')) %>
+ <%= pollen.vote.poll.author(poll.attr('creator.name')) %>
<!-- number of votes -->
| <a id="voteSummary" class='link'><i class='icon-user'></i> <%= votes.attr('length') %></a>
<!-- number of comments-->
| <a id="commentSummary" class='link'><i class='icon-comment'></i> <%= comments.attr('length') %></a>
<!-- poll dates -->
<% if (poll.attr('beginDate') && poll.attr('endDate')) { %>
- | <i class='icon-time'></i> <%= pollen.common.date.fromTo(moment(poll.attr('beginDate')).format(pollen.common.format.date), moment(poll.attr('endDate')).format(pollen.common.format.date)) %>
+ | <i class='icon-time'></i> <%= pollen.common.date.fromTo(moment(poll.attr('beginDate')).format(pollen.common.format.dateTime.moment), moment(poll.attr('endDate')).format(pollen.common.format.dateTime.moment)) %>
<% } else if (poll.attr('beginDate')) { %>
- | <i class='icon-time'></i> <%= pollen.common.date.from(moment(poll.attr('beginDate')).format(pollen.common.format.date)) %>
+ | <i class='icon-time'></i> <%= pollen.common.date.from(moment(poll.attr('beginDate')).format(pollen.common.format.dateTime.moment)) %>
<% } else if (poll.attr('endDate')) { %>
- | <i class='icon-time'></i> <%= pollen.common.date.to(moment(poll.attr('endDate')).format(pollen.common.format.date)) %>
+ | <i class='icon-time'></i> <%= pollen.common.date.to(moment(poll.attr('endDate')).format(pollen.common.format.dateTime.moment)) %>
<% } %>
</p>
@@ -36,8 +36,9 @@
<h3><%= pollen.vote.choices.list.title %></h3>
<ol>
- <% poll.choices.each(function(choice) { %>
- <li><strong><%= choice.attr('name') %></strong> : <%= choice.attr('description') %></li>
+ <% choices.each(function(choice) { %>
+ <li><strong><%= choice.attr('name') %></strong> :
+ <%== choice.attr('description') ? choice.attr('description') : "<em>" + pollen.choice.noDescription + "</em>" %></li>
<% }); %>
</ol>
<% var now = moment().valueOf();
@@ -80,7 +81,7 @@
<thead>
<tr>
<th><%= pollen.vote.votes.list.header.voter %></th>
- <% poll.choices.each(function(choice, i) { %>
+ <% choices.each(function(choice, i) { %>
<th data-container='body' data-placement='top' title='<%= choice.attr("description") %>'>
<%= choice.attr('name') %>
</th>
@@ -92,7 +93,7 @@
<tr>
<td><%= vote.attr('voterListMember.name') %></td>
<%
- poll.choices.each(function(choice) {
+ choices.each(function(choice) {
var voteChoice = vote.voteToChoices[choice.id];
if (voteChoice == null) {
%>
@@ -110,7 +111,7 @@
<tr>
<td>Resultats</td>
- <% poll.choices.each(function(choice) { %>
+ <% choices.each(function(choice) { %>
<td class='result'>
<%= poll.results.attr(choice.id) %>
</td>
@@ -130,7 +131,7 @@
</div>
</div>
</td>
- <%poll.choices.each(function(choice, i) { %>
+ <% choices.each(function(choice, i) { %>
<td><input name="<%= i %>" type='checkbox'/></td>
<% }); %>
</tr>
@@ -182,7 +183,7 @@
<%= comment.attr('text') %>
</p>
<div class='footer'>
- <small><%= comment.attr('author') %> | <%= moment(comment.attr('postDate')).format(pollen.common.format.dateTime) %></small>
+ <small><%= comment.attr('author') %> | <%= moment(comment.attr('postDate')).format(pollen.common.format.dateTime.moment) %></small>
</div>
</div>
1
0
21 Jun '13
Author: kmorin
Date: 2013-06-21 23:26:23 +0200 (Fri, 21 Jun 2013)
New Revision: 3839
Url: http://chorem.org/projects/pollen/repository/revisions/3839
Log:
- fix CORS server side
- real user creation and login
Modified:
trunk/pollen-persistence/pom.xml
trunk/pollen-persistence/src/main/java/org/chorem/pollen/persistence/JpaPollenPersistenceContext.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRender.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceContextFilter.java
trunk/pollen-rest-api/src/main/resources/mapping
trunk/pollen-ui-js/src/main/webapp/bundle/Messages.properties
trunk/pollen-ui-js/src/main/webapp/index.html
trunk/pollen-ui-js/src/main/webapp/js/controls/menu.js
trunk/pollen-ui-js/src/main/webapp/js/controls/poll_form.js
trunk/pollen-ui-js/src/main/webapp/js/controls/user_form.js
trunk/pollen-ui-js/src/main/webapp/js/models/polls.js
trunk/pollen-ui-js/src/main/webapp/js/models/users.js
trunk/pollen-ui-js/src/main/webapp/views/poll_list.ejs
trunk/pollen-ui-js/src/main/webapp/views/user_form.ejs
trunk/pom.xml
Modified: trunk/pollen-persistence/pom.xml
===================================================================
--- trunk/pollen-persistence/pom.xml 2013-06-20 07:55:10 UTC (rev 3838)
+++ trunk/pollen-persistence/pom.xml 2013-06-21 21:26:23 UTC (rev 3839)
@@ -60,6 +60,11 @@
</dependency>
<dependency>
+ <groupId>org.nuiton.jpa</groupId>
+ <artifactId>nuiton-jpa-hibernate</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
</dependency>
Modified: trunk/pollen-persistence/src/main/java/org/chorem/pollen/persistence/JpaPollenPersistenceContext.java
===================================================================
--- trunk/pollen-persistence/src/main/java/org/chorem/pollen/persistence/JpaPollenPersistenceContext.java 2013-06-20 07:55:10 UTC (rev 3838)
+++ trunk/pollen-persistence/src/main/java/org/chorem/pollen/persistence/JpaPollenPersistenceContext.java 2013-06-21 21:26:23 UTC (rev 3839)
@@ -25,7 +25,7 @@
import org.nuiton.jpa.api.JpaEntity;
import org.nuiton.jpa.api.JpaEntityIdFactory;
-import org.nuiton.jpa.api.hibernate.HibernateUtil;
+import org.nuiton.jpa.hibernate.HibernateUtil;
import javax.persistence.EntityManager;
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRender.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRender.java 2013-06-20 07:55:10 UTC (rev 3838)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRender.java 2013-06-21 21:26:23 UTC (rev 3839)
@@ -25,7 +25,7 @@
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
-import com.google.gson.Gson;
+import com.google.gson.*;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.debux.webmotion.server.call.Call;
@@ -92,7 +92,7 @@
}
Object map = toMap(model, includeCollection);
- Gson gson = new Gson();
+ Gson gson = new GsonBuilder().create();
String json = gson.toJson(map);
PrintWriter out = context.getOut();
out.print(json);
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceContextFilter.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceContextFilter.java 2013-06-20 07:55:10 UTC (rev 3838)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceContextFilter.java 2013-06-21 21:26:23 UTC (rev 3839)
@@ -32,6 +32,7 @@
import org.debux.webmotion.server.call.HttpContext;
import javax.persistence.EntityManager;
+import javax.servlet.http.HttpServletResponse;
/**
* Inject le service context dans les controlleurs.
@@ -58,6 +59,10 @@
addSecurityContext(context, serviceContext);
doProcess();
+
+ HttpServletResponse response = context.getResponse();
+ response.addHeader(HttpContext.HEADER_ACCESS_CONTROL_ALLOW_ORIGIN, "*");
+ response.addHeader(HttpContext.HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS, "true");
}
protected void addSecurityContext(HttpContext context,
Modified: trunk/pollen-rest-api/src/main/resources/mapping
===================================================================
--- trunk/pollen-rest-api/src/main/resources/mapping 2013-06-20 07:55:10 UTC (rev 3838)
+++ trunk/pollen-rest-api/src/main/resources/mapping 2013-06-21 21:26:23 UTC (rev 3839)
@@ -13,10 +13,8 @@
[errors]
org.chorem.pollen.services.exception.EntityNotFoundException ErrorAction.on404
-org.chorem.pollen.services.exception.UserEmailAlreadyUsedException ErrorAction.on500
-org.chorem.pollen.services.exception.UserLoginAlreadyUsedException ErrorAction.on500
org.chorem.pollen.services.exception.UserInvalidPasswordException ErrorAction.on500
-org.chorem.pollen.services.exception.UserInvalidEmailActiviationTokenException ErrorAction.on500
+org.chorem.pollen.services.exception.UserInvalidEmailActivationTokenException ErrorAction.on500
org.chorem.pollen.services.exception.AbstractInvalidFormException ErrorAction.on500Form
[actions]
Modified: trunk/pollen-ui-js/src/main/webapp/bundle/Messages.properties
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/bundle/Messages.properties 2013-06-20 07:55:10 UTC (rev 3838)
+++ trunk/pollen-ui-js/src/main/webapp/bundle/Messages.properties 2013-06-21 21:26:23 UTC (rev 3839)
@@ -80,6 +80,7 @@
#poll lists
pollen.polls.created.title=Sondages créés
+pollen.polls.created.empty=Vous n'avez créé aucun sondage
#poll summary
pollen.poll.summary.title=Sondage \'{0}\'
Modified: trunk/pollen-ui-js/src/main/webapp/index.html
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/index.html 2013-06-20 07:55:10 UTC (rev 3838)
+++ trunk/pollen-ui-js/src/main/webapp/index.html 2013-06-21 21:26:23 UTC (rev 3839)
@@ -53,7 +53,14 @@
<script src="js/libs/jquery.scrollto.js"></script>
<script type="text/javascript">
- var backendUrl = 'http://localhost:8080/pollen-rest-api/v1';
+ var backendUrl = 'http://localhost:8080/pollen/v1';
+ var paramForWM = function(obj, objName) {
+ var result = "";
+ for (var k in obj) {
+ result += objName + '.' + k + '=' + obj[k] + '&';
+ }
+ return result;
+ }
</script>
<script src="js/models/polls.js"></script>
@@ -96,8 +103,6 @@
}
});
-
-
</script>
</body>
Modified: trunk/pollen-ui-js/src/main/webapp/js/controls/menu.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/controls/menu.js 2013-06-20 07:55:10 UTC (rev 3838)
+++ trunk/pollen-ui-js/src/main/webapp/js/controls/menu.js 2013-06-21 21:26:23 UTC (rev 3839)
@@ -26,17 +26,17 @@
},
'#loginForm submit': function(form) {
- can.ajax({
- url: backendUrl + '/login',
+ can.ajax(backendUrl + '/login', {
+ type: 'PUT',
data: {
login: form.find('[name="login"]').val(),
password: form.find('[name="password"]').val()
},
- type: "PUT",
success: function(user) {
form[0].reset();
form.parents(".dropdown.open").removeClass("open");
- currentUser.attr(user, true);
+ currentUser.attr(user.pollenUser, true);
+ currentUser.attr("token", user.id);
window.localStorage.setItem('currentUser', JSON.stringify(currentUser._data));
}
});
@@ -44,7 +44,16 @@
},
'#menuItemLogout click': function() {
- currentUser.attr(new User(), true);
- window.localStorage.set('currentUser', currentUser._data);
+ can.ajax(backendUrl + '/logout', {
+ type: 'GET',
+ data: {
+ login: currentUser.login,
+ token: currentUser.token
+ },
+ success: function(user) {
+ currentUser.attr({}, true);
+ window.localStorage.setItem('currentUser', '{}');
+ }
+ });
}
});
\ No newline at end of file
Modified: trunk/pollen-ui-js/src/main/webapp/js/controls/poll_form.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/controls/poll_form.js 2013-06-20 07:55:10 UTC (rev 3838)
+++ trunk/pollen-ui-js/src/main/webapp/js/controls/poll_form.js 2013-06-21 21:26:23 UTC (rev 3839)
@@ -37,7 +37,16 @@
':type/:action route': function(data) {
if (data.type === "poll" && data.action === "create") {
- this.editPoll(new Poll());
+ var self = this;
+ $.when(can.ajax(backendUrl + "/polls/new", {
+ data: {
+ choiceType: "TEXT",
+ userId: currentUser.id
+ }
+ })).then(function(poll) {
+ console.log(poll)
+ self.editPoll(new Poll(poll));
+ });
}
},
Modified: trunk/pollen-ui-js/src/main/webapp/js/controls/user_form.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/controls/user_form.js 2013-06-20 07:55:10 UTC (rev 3838)
+++ trunk/pollen-ui-js/src/main/webapp/js/controls/user_form.js 2013-06-21 21:26:23 UTC (rev 3839)
@@ -62,15 +62,26 @@
'#userEditionForm submit': function(form) {
var self = this,
user = this.options.user,
+ password = user.password,
errors = user.errors();
if (errors == null) {
user.repeatPassword = null;
- //TODO 20130618 kmorin encrypt password
user.save(function(data) {
- if (data.id) {
- user.id = data.id;
- }
+ form[0].reset();
+ can.ajax(backendUrl + '/login', {
+ type: 'PUT',
+ data: {
+ login: user.login,
+ password: password
+ },
+ success: function(user) {
+ currentUser.attr(user.pollenUser, true);
+ currentUser.attr("token", user.id);
+ window.localStorage.setItem('currentUser', JSON.stringify(currentUser._data));
+ can.route.attr({ type: 'polls', action: 'created' });
+ }
+ });
});
} else {
Modified: trunk/pollen-ui-js/src/main/webapp/js/models/polls.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/models/polls.js 2013-06-20 07:55:10 UTC (rev 3838)
+++ trunk/pollen-ui-js/src/main/webapp/js/models/polls.js 2013-06-21 21:26:23 UTC (rev 3839)
@@ -23,7 +23,13 @@
var Poll = can.Model({
findAll : "GET " + backendUrl + "/polls",
findOne : "GET " + backendUrl + "/polls/{id}",
- create : "POST " + backendUrl + "/polls",
+ create : function(attrs) {
+ var t = paramForWM(attrs, 'poll') + 'userId=' + currentUser.id;
+ return can.ajax(backendUrl + "/polls",{
+ type: "POST",
+ data: t
+ });
+ },
update : "PUT " + backendUrl + "/polls/{id}",
destroy : "DELETE " + backendUrl + "/polls/{id}"
},{});
@@ -74,19 +80,19 @@
},
];
-can.fixture("GET " + backendUrl + "/polls", function(){
- return POLLS;
-});
+//can.fixture("GET " + backendUrl + "/polls", function(){
+// return POLLS;
+//});
-can.fixture("GET " + backendUrl + "/polls/{id}", function(orig) {
- return POLLS[orig.data.id - 1];
-});
+//can.fixture("GET " + backendUrl + "/polls/{id}", function(orig) {
+// return POLLS[orig.data.id - 1];
+//});
var idToInc= 3;
-can.fixture("POST " + backendUrl + "/polls", function() {
- console.log("create poll " + idToInc);
- return {id: (idToInc++)}
-});
+//can.fixture("POST " + backendUrl + "/polls", function() {
+// console.log("create poll " + idToInc);
+// return {id: (idToInc++)}
+//});
can.fixture("PUT " + backendUrl + "/polls/{id}", function(orig) {
console.log("update poll " + orig.data.id);
Modified: trunk/pollen-ui-js/src/main/webapp/js/models/users.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/models/users.js 2013-06-20 07:55:10 UTC (rev 3838)
+++ trunk/pollen-ui-js/src/main/webapp/js/models/users.js 2013-06-21 21:26:23 UTC (rev 3839)
@@ -23,7 +23,12 @@
var User = can.Model({
findAll : "GET " + backendUrl + "/users",
findOne : "GET " + backendUrl + "/users/{id}",
- create : "POST " + backendUrl + "/users",
+ create : function(attrs) {
+ return can.ajax(backendUrl + "/users",{
+ type: "POST",
+ data: paramForWM(attrs, 'user') + 'generatePassword=false'
+ });
+ },
update : "PUT " + backendUrl + "/users/{id}",
init: function() {
@@ -67,31 +72,31 @@
},
];
-can.fixture("GET " + backendUrl + "/users", function(){
- return USERS;
-});
-
-can.fixture("GET " + backendUrl + "/users/{id}", function(orig) {
- return USERS[orig.data.id - 1];
-});
-
-var idToInc= 3;
-can.fixture("POST " + backendUrl + "/users", function() {
- console.log("create user " + idToInc);
- return {id: (idToInc++)}
-});
-
-can.fixture("PUT " + backendUrl + "/users/{id}", function(orig) {
- console.log("update user " + orig.data.id);
- return {};
-});
-
-can.fixture("PUT " + backendUrl + "/login", function(orig) {
- console.log("login user " + orig.data.login);
- for (var i = 0 ; i < USERS.length ; i++) {
- if (USERS[i].login == orig.data.login) {
- return USERS[i];
- }
- }
- return {};
-});
\ No newline at end of file
+//can.fixture("GET " + backendUrl + "/users", function(){
+// return USERS;
+//});
+//
+//can.fixture("GET " + backendUrl + "/users/{id}", function(orig) {
+// return USERS[orig.data.id - 1];
+//});
+//
+//var idToInc= 3;
+//can.fixture("POST " + backendUrl + "/users", function() {
+// console.log("create user " + idToInc);
+// return {id: (idToInc++)}
+//});
+//
+//can.fixture("PUT " + backendUrl + "/users/{id}", function(orig) {
+// console.log("update user " + orig.data.id);
+// return {};
+//});
+//
+//can.fixture("PUT " + backendUrl + "/login", function(orig) {
+// console.log("login user " + orig.data.login);
+// for (var i = 0 ; i < USERS.length ; i++) {
+// if (USERS[i].login == orig.data.login) {
+// return USERS[i];
+// }
+// }
+// return {};
+//});
\ No newline at end of file
Modified: trunk/pollen-ui-js/src/main/webapp/views/poll_list.ejs
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/views/poll_list.ejs 2013-06-20 07:55:10 UTC (rev 3838)
+++ trunk/pollen-ui-js/src/main/webapp/views/poll_list.ejs 2013-06-21 21:26:23 UTC (rev 3839)
@@ -1,7 +1,11 @@
<h1><%= $.i18n.prop("pollen.polls." + can.route.attr('action') + ".title") %></h1>
-<% polls.each(function(poll) { %>
+<% if (polls.length == 0) { %>
+<p><%= pollen.polls.created.empty %></p>
+<% } else {
+ polls.each(function(poll) { %>
<div>
<%== can.route.link(poll.attr('title'), {type: 'poll', action: 'summary', id: poll.attr('id')}) %>
</div>
-<% }); %>
\ No newline at end of file
+<% });
+ } %>
\ No newline at end of file
Modified: trunk/pollen-ui-js/src/main/webapp/views/user_form.ejs
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/views/user_form.ejs 2013-06-20 07:55:10 UTC (rev 3838)
+++ trunk/pollen-ui-js/src/main/webapp/views/user_form.ejs 2013-06-21 21:26:23 UTC (rev 3839)
@@ -1,6 +1,6 @@
<h1><%= user.attr('id') ? pollen.user.form.edit.title.update : pollen.user.form.edit.title.creation %></h1>
-<form id='userEditionForm' class="form-horizontal">
+<form method="post" id='userEditionForm' class="form-horizontal">
<div class="control-group">
<label class="control-label" for="userEditionFormLogin"><%= pollen.user.login.label %></label>
@@ -9,7 +9,7 @@
id='userEditionFormLogin'
placeholder='<%= pollen.user.login.placeholder %>'
value='<%= user.attr("login")%>'
- required/>
+ />
<span class="help-inline"></span>
</div>
</div>
@@ -22,7 +22,7 @@
id='userEditionFormPassword'
placeholder='<%= pollen.user.password.placeholder %>'
value='<%= user.attr("password")%>'
- required/>
+ />
<span class="help-inline"></span>
</div>
</div>
@@ -35,7 +35,7 @@
id='userEditionFormRepeatPassword'
placeholder='<%= pollen.user.repeatPassword.placeholder %>'
value='<%= user.attr("repeatPassword")%>'
- required/>
+ />
<span class="help-inline"></span>
</div>
</div>
@@ -48,7 +48,7 @@
id='userEditionFormName'
placeholder='<%= pollen.user.name.placeholder %>'
value='<%= user.attr("name")%>'
- required/>
+ />
<span class="help-inline"></span>
</div>
</div>
@@ -61,7 +61,7 @@
id='userEditionFormEmail'
placeholder='<%= pollen.user.email.placeholder %>'
value='<%= user.attr("email")%>'
- required/>
+ />
<span class="help-inline"></span>
</div>
</div>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2013-06-20 07:55:10 UTC (rev 3838)
+++ trunk/pom.xml 2013-06-21 21:26:23 UTC (rev 3839)
@@ -174,7 +174,7 @@
<!--<jqueryPluginVersion>3.5.0</jqueryPluginVersion>-->
<shiroVersion>1.2.2</shiroVersion>
<slf4jVersion>1.7.5</slf4jVersion>
- <jettyVersion>8.1.11.v20130520</jettyVersion>
+ <jettyVersion>9.0.3.v20130506</jettyVersion>
<!--jettyVersion>${jettyPluginVersion}</jettyVersion-->
<hibernateVersion>4.2.2.Final</hibernateVersion>
<seleniumVersion>2.33.0</seleniumVersion>
@@ -257,6 +257,12 @@
<dependency>
<groupId>org.nuiton.jpa</groupId>
+ <artifactId>nuiton-jpa-hibernate</artifactId>
+ <version>${nuitonJpaVersion}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton.jpa</groupId>
<artifactId>nuiton-jpa-junit</artifactId>
<version>${nuitonJpaVersion}</version>
</dependency>
1
0
Author: tchemit
Date: 2013-06-20 09:55:10 +0200 (Thu, 20 Jun 2013)
New Revision: 3838
Url: http://chorem.org/projects/pollen/repository/revisions/3838
Log:
- continue security
- add svn properties
- make rest service works again
Added:
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PermissionVerb.java
Modified:
trunk/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Poll.java
trunk/pollen-persistence/src/main/xmi/pollen.properties
trunk/pollen-persistence/src/main/xmi/pollen.zargo
trunk/pollen-rest-api/pom.xml
trunk/pollen-rest-api/src/jetty/jetty-context.xml
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceContextFilter.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceListener.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/AuthService.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/ChoiceService.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/CommentService.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollService.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollenUserService.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoteService.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoterListService.java
trunk/pollen-rest-api/src/main/resources/mapping
trunk/pollen-services/src/main/java/org/chorem/pollen/services/DefaultPollenServiceContext.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/PollenSecurityContext.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceContext.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/AbstractPollenService.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/AuthService.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/CommentService.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenUserService.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/SecurityService.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/VoteService.java
trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollServiceTest.java
trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollenUserServiceTest.java
trunk/pollen-ui-js/src/main/resources/nuiton-js/wro.properties
trunk/pollen-ui-js/src/main/resources/nuiton-js/wro.xml
trunk/pollen-ui-js/src/main/webapp/bundle/Messages.properties
trunk/pollen-ui-js/src/main/webapp/css/style.css
trunk/pollen-ui-js/src/main/webapp/index.html
trunk/pollen-ui-js/src/main/webapp/js/controls/menu.js
trunk/pollen-ui-js/src/main/webapp/js/controls/poll_form.js
trunk/pollen-ui-js/src/main/webapp/js/controls/poll_list.js
trunk/pollen-ui-js/src/main/webapp/js/controls/poll_summary.js
trunk/pollen-ui-js/src/main/webapp/js/controls/user_form.js
trunk/pollen-ui-js/src/main/webapp/js/controls/vote.js
trunk/pollen-ui-js/src/main/webapp/js/libs/jquery.scrollto.js
trunk/pollen-ui-js/src/main/webapp/js/models/comments.js
trunk/pollen-ui-js/src/main/webapp/js/models/polls.js
trunk/pollen-ui-js/src/main/webapp/js/models/users.js
trunk/pollen-ui-js/src/main/webapp/js/models/votes.js
trunk/pollen-ui-js/src/main/webapp/js/route.js
trunk/pollen-ui-js/src/main/webapp/views/poll_list.ejs
trunk/pollen-ui-js/src/main/webapp/views/user_form.ejs
Modified: trunk/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Poll.java
===================================================================
--- trunk/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Poll.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Poll.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -23,8 +23,11 @@
* #L%
*/
+import com.google.common.collect.Sets;
+
import javax.persistence.Entity;
import java.util.Date;
+import java.util.Set;
/**
* TODO
@@ -81,4 +84,16 @@
(endChoiceDate != null && endChoiceDate.before(currentDate));
}
+ public Set<VoterListMember> getAllVoters() {
+ Set<VoterListMember> result = Sets.newHashSet();
+ if (!isVoterListEmpty()) {
+ for (VoterList list : getVoterList()) {
+
+ if (!list.isVoterListMemberEmpty()) {
+ result.addAll(list.getVoterListMember());
+ }
+ }
+ }
+ return result;
+ }
} //Poll
Modified: trunk/pollen-persistence/src/main/xmi/pollen.properties
===================================================================
--- trunk/pollen-persistence/src/main/xmi/pollen.properties 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-persistence/src/main/xmi/pollen.properties 2013-06-20 07:55:10 UTC (rev 3838)
@@ -20,10 +20,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# #L%
###m
+model.tagvalue.version=2.0
model.tagValue.idFactory=true
model.tagValue.generateVisitors=true
-model.tagvalue.version=2.0
-#model.tagvalue.entitySuperClass=org.chorem.pollen.persistence.entity.AbstractJpaPollenEntity
+model.tagValue.generateExtraTechnicalFields=true
org.chorem.pollen.persistence.entity.Poll.attribute.choice.stereotype=ordered
org.chorem.pollen.persistence.entity.Poll.attribute.voterList.stereotype=ordered
Modified: trunk/pollen-persistence/src/main/xmi/pollen.zargo
===================================================================
(Binary files differ)
Modified: trunk/pollen-rest-api/pom.xml
===================================================================
--- trunk/pollen-rest-api/pom.xml 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-rest-api/pom.xml 2013-06-20 07:55:10 UTC (rev 3838)
@@ -147,6 +147,16 @@
<defaultDbDir>${basedir}/target</defaultDbDir>
</properties>
<build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>**/mapping</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+
<pluginManagement>
<plugins>
<plugin>
Modified: trunk/pollen-rest-api/src/jetty/jetty-context.xml
===================================================================
--- trunk/pollen-rest-api/src/jetty/jetty-context.xml 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-rest-api/src/jetty/jetty-context.xml 2013-06-20 07:55:10 UTC (rev 3838)
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
#%L
- Pollen :: UI (struts2)
+ Pollen :: Rest Api
$Id$
$HeadURL$
%%
- Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit
+ Copyright (C) 2009 - 2013 CodeLutin
%%
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@@ -27,6 +27,6 @@
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Call name="setAttribute">
<Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg>
- <Arg>.*/.*jsp-api-[^/]\.jar$|./.*jsp-[^/]\.jar$|./.*taglibs[^/]*\.jar$</Arg>
+ <Arg>.*/.*webmotion.*[^/]\.jar$</Arg>
</Call>
</Configure>
\ No newline at end of file
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceContextFilter.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceContextFilter.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceContextFilter.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -75,10 +75,8 @@
sessionToken = serviceContext.getAuthService().getUserByAuth(authParam);
}
- PollenSecurityContext securityContext;
- securityContext = PollenSecurityContext.newContext(
- sessionToken == null ? null : sessionToken.getPollenUser()
- );
+ PollenSecurityContext securityContext =
+ PollenSecurityContext.newContext(sessionToken);
serviceContext.setSecurityContext(securityContext);
}
}
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceListener.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceListener.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenServiceListener.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -55,7 +55,6 @@
public void onStart(Mapping mapping, ServerContext serverContext) {
serverContext.addInjector(new PollenServiceContextInjector());
- serverContext.addInjector(new SessionTokenInjector());
// Create application context
PollenApplicationContext applicationContext =
@@ -70,7 +69,7 @@
try {
PollenServiceContext serviceContext =
applicationContext.newServiceContext(entityManager);
- serviceContext.getUserService().createDefaultUsers();
+ serviceContext.getPollenUserService().createDefaultUsers();
} catch (InvalidPollenUserFormException e) {
//Can't happen
} catch (EntityNotFoundException e) {
@@ -108,17 +107,5 @@
}
}
- protected static class SessionTokenInjector implements ExecutorParametersInjectorHandler.Injector {
- @Override
- public Object getValue(Mapping mapping, Call call, String name, Class<?> type, Type generic) {
- PollenServiceContext result = null;
- if (PollenServiceContext.class.isAssignableFrom(type)) {
- HttpContext httpContext = call.getContext();
- HttpServletRequest request = httpContext.getRequest();
- result = PollenServices.getServiceContext(request);
- }
- return result;
- }
- }
}
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/AuthService.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/AuthService.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/AuthService.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -23,6 +23,7 @@
* #L%
*/
+import org.chorem.pollen.persistence.entity.SessionToken;
import org.chorem.pollen.services.PollenServiceContext;
import org.chorem.pollen.services.exception.EntityNotFoundException;
import org.chorem.pollen.services.exception.UserInvalidPasswordException;
@@ -36,7 +37,7 @@
*/
public class AuthService extends WebMotionController {
- public String login(PollenServiceContext context, String login, String password) throws UserInvalidPasswordException, EntityNotFoundException {
+ public SessionToken login(PollenServiceContext context, String login, String password) throws UserInvalidPasswordException, EntityNotFoundException {
return context.getAuthService().login(login, password);
}
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/ChoiceService.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/ChoiceService.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/ChoiceService.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -40,23 +40,28 @@
public class ChoiceService extends WebMotionController {
public List<Choice> getChoices(PollenServiceContext context, String pollId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(pollId);
List<Choice> choices = context.getChoiceService().getChoices(pollId);
return choices;
}
public Choice getChoice(PollenServiceContext context, String pollId, String choiceId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(choiceId);
return context.getChoiceService().getChoice(pollId, choiceId);
}
public Choice addChoice(PollenServiceContext context, String pollId, Choice choice) throws EntityNotFoundException, InvalidChoiceFormException {
+ context.getSecurityService().prepareSubject(pollId);
return context.getChoiceService().addChoice(pollId, choice);
}
public Choice editChoice(PollenServiceContext context, String pollId, Choice choice) throws EntityNotFoundException, InvalidChoiceFormException {
+ context.getSecurityService().prepareSubject(choice);
return context.getChoiceService().editChoice(pollId, choice);
}
public void deleteChoice(PollenServiceContext context, String pollId, String choiceId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(choiceId);
context.getChoiceService().deleteChoice(pollId, choiceId);
}
}
\ No newline at end of file
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/CommentService.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/CommentService.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/CommentService.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -40,23 +40,28 @@
public class CommentService extends WebMotionController {
public List<Comment> getComments(PollenServiceContext context, String pollId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(pollId);
List<Comment> comments = context.getCommentService().getComments(pollId);
return comments;
}
public Comment getComment(PollenServiceContext context, String pollId, String commentId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(commentId);
return context.getCommentService().getComment(pollId, commentId);
}
public Comment addComment(PollenServiceContext context, String pollId, Comment comment) throws EntityNotFoundException, InvalidCommentFormException {
+ context.getSecurityService().prepareSubject(pollId);
return context.getCommentService().addComment(pollId, comment);
}
public Comment editComment(PollenServiceContext context, String pollId, Comment comment) throws EntityNotFoundException, InvalidCommentFormException {
+ context.getSecurityService().prepareSubject(comment);
return context.getCommentService().editComment(pollId, comment);
}
public void deleteComment(PollenServiceContext context, String pollId, String commentId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(commentId);
context.getCommentService().deleteComment(pollId, commentId);
}
}
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollService.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollService.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollService.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -66,6 +66,7 @@
}
public Poll getPoll(PollenServiceContext context, String pollId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(pollId);
return context.getPollService().getPoll(pollId);
}
@@ -74,22 +75,27 @@
}
public Poll editPoll(PollenServiceContext context, Poll poll) throws EntityNotFoundException, InvalidPollFormException {
+ context.getSecurityService().prepareSubject(poll);
return context.getPollService().editPoll(poll);
}
public void deletePoll(PollenServiceContext context, String pollId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(pollId);
context.getPollService().deletePoll(pollId);
}
public Poll clonePoll(PollenServiceContext context, String pollId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(pollId);
return context.getPollService().clonePoll(pollId);
}
public File closePoll(PollenServiceContext context, String pollId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(pollId);
return context.getPollService().closePoll(pollId);
}
public File exportPoll(PollenServiceContext context, String pollId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(pollId);
return context.getPollService().exportPoll(pollId);
}
}
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollenUserService.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollenUserService.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollenUserService.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -42,36 +42,36 @@
public class PollenUserService extends WebMotionController {
public List<PollenUser> getUsers(PollenServiceContext context) {
- List<PollenUser> users = context.getUserService().getUsers();
+ List<PollenUser> users = context.getPollenUserService().getUsers();
return users;
}
public PollenUser getUser(PollenServiceContext context, String userId) throws EntityNotFoundException {
- return context.getUserService().getUser(userId);
+ return context.getPollenUserService().getUser(userId);
}
public PollenUser createUser(PollenServiceContext context,
PollenUser user,
boolean generatePassword) throws EntityNotFoundException, InvalidPollenUserFormException {
- return context.getUserService().createUser(user, generatePassword);
+ return context.getPollenUserService().createUser(user, generatePassword);
}
public PollenUser editUser(PollenServiceContext context,
PollenUser user) throws EntityNotFoundException, InvalidPollenUserFormException {
- return context.getUserService().editUser(user);
+ return context.getPollenUserService().editUser(user);
}
public void validateUserEmail(PollenServiceContext context,
String userId,
String token) throws EntityNotFoundException, UserInvalidEmailActivationTokenException {
- context.getUserService().validateUserEmail(userId, token);
+ context.getPollenUserService().validateUserEmail(userId, token);
}
public void changePassword(PollenServiceContext context,
String userId,
String oldPassword,
String newPassword) throws EntityNotFoundException, UserInvalidPasswordException {
- context.getUserService().changePassword(userId, oldPassword, newPassword);
+ context.getPollenUserService().changePassword(userId, oldPassword, newPassword);
}
}
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoteService.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoteService.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoteService.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -40,23 +40,28 @@
public class VoteService extends WebMotionController {
public List<Vote> getVotes(PollenServiceContext context, String pollId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(pollId);
List<Vote> votes = context.getVoteService().getVotes(pollId);
return votes;
}
public Vote getVote(PollenServiceContext context, String pollId, String voteId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(voteId);
return context.getVoteService().getVote(pollId, voteId);
}
public Vote addVote(PollenServiceContext context, String pollId, Vote vote) throws EntityNotFoundException, InvalidVoteFormException {
+ context.getSecurityService().prepareSubject(pollId);
return context.getVoteService().addVote(pollId, vote);
}
public Vote editVote(PollenServiceContext context, String pollId, Vote vote) throws EntityNotFoundException, InvalidVoteFormException {
+ context.getSecurityService().prepareSubject(vote);
return context.getVoteService().editVote(pollId, vote);
}
public void deleteVote(PollenServiceContext context, String pollId, String voteId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(voteId);
context.getVoteService().deleteVote(pollId, voteId);
}
}
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoterListService.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoterListService.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoterListService.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -47,44 +47,54 @@
}
public List<VoterList> getVoterLists(PollenServiceContext context, String pollId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(pollId);
List<VoterList> voterLists = context.getVoterListService().getVoterLists(pollId);
return voterLists;
}
public VoterList getVoterList(PollenServiceContext context, String pollId, String voterListId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(voterListId);
return context.getVoterListService().getVoterList(pollId, voterListId);
}
public VoterList addVoterList(PollenServiceContext context, String pollId, VoterList voterList) throws EntityNotFoundException, InvalidVoterListFormException {
+ context.getSecurityService().prepareSubject(pollId);
return context.getVoterListService().addVoterList(pollId, voterList);
}
public VoterList editVoterList(PollenServiceContext context, String pollId, VoterList voterList) throws EntityNotFoundException, InvalidVoterListFormException {
+ context.getSecurityService().prepareSubject(voterList);
return context.getVoterListService().editVoterList(pollId, voterList);
}
public void deleteVoterList(PollenServiceContext context, String pollId, String voterListId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(voterListId);
context.getVoterListService().deleteVoterList(pollId, voterListId);
}
public Set<VoterListMember> getMembers(PollenServiceContext context, String pollId, String voterListId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(voterListId);
Set<VoterListMember> members = context.getVoterListService().getVoterListMembers(pollId, voterListId);
return members;
}
public VoterListMember getMember(PollenServiceContext context, String pollId, String voterListId, String memberId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(memberId);
return context.getVoterListService().getVoterListMember(pollId, voterListId, memberId);
}
public VoterListMember addMember(PollenServiceContext context, String pollId, String voterListId, VoterListMember member) throws EntityNotFoundException, InvalidVoterListMemberFormException {
+ context.getSecurityService().prepareSubject(member);
return context.getVoterListService().addVoterListMember(pollId, voterListId, member);
}
public VoterListMember editMember(PollenServiceContext context, String pollId, String voterListId, VoterListMember member) throws EntityNotFoundException, InvalidVoterListMemberFormException {
+ context.getSecurityService().prepareSubject(member);
return context.getVoterListService().editVoterListMember(pollId, voterListId, member);
}
public void deleteMember(PollenServiceContext context, String pollId, String voterListId, String memberId) throws EntityNotFoundException {
+ context.getSecurityService().prepareSubject(memberId);
context.getVoterListService().deleteVoterListMember(pollId, voterListId, memberId);
}
}
Modified: trunk/pollen-rest-api/src/main/resources/mapping
===================================================================
--- trunk/pollen-rest-api/src/main/resources/mapping 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-rest-api/src/main/resources/mapping 2013-06-20 07:55:10 UTC (rev 3838)
@@ -1,9 +1,9 @@
[config]
-package.filters=org.chorem.pollen.rest
-package.actions=org.chorem.pollen.rest.api
-package.errors=org.chorem.pollen.rest.api
-server.listener.class=org.chorem.pollen.rest.PollenServiceListener
-default.render=org.chorem.pollen.rest.PollenRender
+package.filters=org.chorem.pollen.rest.api
+package.actions=org.chorem.pollen.rest.api.v1
+package.errors=org.chorem.pollen.rest.api.v1
+server.listener.class=org.chorem.pollen.rest.api.PollenServiceListener
+default.render=org.chorem.pollen.rest.api.PollenRender
[filters]
* /* PollenServiceContextFilter.inject
@@ -12,12 +12,12 @@
[errors]
-org.chorem.pollen.service.exception.EntityNotFoundException ErrorAction.on404
-org.chorem.pollen.service.exception.UserEmailAlreadyUsedException ErrorAction.on500
-org.chorem.pollen.service.exception.UserLoginAlreadyUsedException ErrorAction.on500
-org.chorem.pollen.service.exception.UserInvalidPasswordException ErrorAction.on500
-org.chorem.pollen.service.exception.UserInvalidEmailActiviationTokenException ErrorAction.on500
-org.chorem.pollen.service.exception.AbstractInvalidFormException ErrorAction.on500Form
+org.chorem.pollen.services.exception.EntityNotFoundException ErrorAction.on404
+org.chorem.pollen.services.exception.UserEmailAlreadyUsedException ErrorAction.on500
+org.chorem.pollen.services.exception.UserLoginAlreadyUsedException ErrorAction.on500
+org.chorem.pollen.services.exception.UserInvalidPasswordException ErrorAction.on500
+org.chorem.pollen.services.exception.UserInvalidEmailActiviationTokenException ErrorAction.on500
+org.chorem.pollen.services.exception.AbstractInvalidFormException ErrorAction.on500Form
[actions]
@@ -73,13 +73,13 @@
GET /v1/polls/{pollId}/export PollService.exportPoll
PUT /v1/polls/{pollId}/close PollService.closePoll
-# UserService
+# PollenUserService
-GET /v1/users UserService.getUsers
-GET /v1/users/{userId} UserService.getUser
-POST /v1/users UserService.createUser
-PUT /v1/users/{userId} UserService.editUser
-PUT /v1/users/{userId}?token={} UserService.validateUserEmail
+GET /v1/users PollenUserService.getUsers
+GET /v1/users/{userId} PollenUserService.getUser
+POST /v1/users PollenUserService.createUser
+PUT /v1/users/{userId} PollenUserService.editUser
+PUT /v1/users/{userId}?token={} PollenUserService.validateUserEmail
# VoteCountingService
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/DefaultPollenServiceContext.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/DefaultPollenServiceContext.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/DefaultPollenServiceContext.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -128,7 +128,7 @@
}
@Override
- public PollenUserService getUserService() {
+ public PollenUserService getPollenUserService() {
return newService(PollenUserService.class);
}
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/PollenSecurityContext.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/PollenSecurityContext.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/PollenSecurityContext.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -23,14 +23,11 @@
* #L%
*/
-import com.google.common.collect.ImmutableSet;
-import org.apache.commons.collections.CollectionUtils;
+import org.apache.shiro.subject.Subject;
import org.chorem.pollen.persistence.entity.PollenUser;
-import org.nuiton.jpa.api.JpaEntity;
+import org.chorem.pollen.persistence.entity.SessionToken;
import java.io.Serializable;
-import java.util.Collections;
-import java.util.Set;
/**
* TODO
@@ -40,8 +37,10 @@
*/
public class PollenSecurityContext implements Serializable {
- private static final long serialVersionUID = 5348851531764083245L;
+ private static final long serialVersionUID = 1L;
+ protected Subject subject;
+
/**
* Connected user account.
* <p/>
@@ -49,130 +48,35 @@
*
* @since 2.0
*/
- protected final PollenUser connectedUser;
+ protected final SessionToken sessionToken;
- /**
- * Resource to edit/delete (can be null for some creation contexts).
- *
- * @since 2.0
- */
- protected ObjectSecurityContext<?> resource;
-
- /**
- * User roles on the poll.
- *
- * @since 2.0
- */
- protected Set<PollenUserSecurityRole> userRoles;
-
- public static PollenSecurityContext newContext(PollenUser userAccount) {
+ public static PollenSecurityContext newContext(SessionToken sessionToken) {
PollenSecurityContext result = new PollenSecurityContext(
- userAccount);
+ sessionToken);
return result;
}
- public static <E extends JpaEntity> ObjectSecurityContext<E> ObjectSecurityContext(Class<E> type,
- String id,
- String token) {
- return new ObjectSecurityContext<E>(type, id, token);
+ public Subject getSubject() {
+ return subject;
}
- public void setResource(ObjectSecurityContext<?> resource) {
- this.resource = resource;
+ public SessionToken getSessionToken() {
+ return sessionToken;
}
- public void setUserRoles(Set<PollenUserSecurityRole> userRoles) {
- this.userRoles = userRoles == null ? null : ImmutableSet.copyOf(userRoles);
- }
-
- public boolean isAdministrator() {
- return userRoles != null && userRoles.contains(PollenUserSecurityRole.ADMINISTRATOR);
- }
-
- public boolean isCreator() {
- return userRoles != null && userRoles.contains(PollenUserSecurityRole.CREATOR);
- }
-
- public boolean isVoter() {
- return userRoles != null && userRoles.contains(PollenUserSecurityRole.VOTER);
- }
-
- public boolean isRestrictedVoter() {
- return userRoles != null && userRoles.contains(PollenUserSecurityRole.RESTRICTED_VOTER);
- }
-
- public boolean hasNoRole() {
- return CollectionUtils.isEmpty(userRoles);
- }
-
- public Set<PollenUserSecurityRole> getUserRoles() {
- return userRoles == null ?
- Collections.<PollenUserSecurityRole>emptySet() :
- userRoles;
- }
-
public PollenUser getPollenUser() {
- return connectedUser;
+ return isConnected() ? sessionToken.getPollenUser() : null;
}
- protected PollenSecurityContext(PollenUser connectedUser) {
- this.connectedUser = connectedUser;
- }
-
public boolean isConnected() {
- return connectedUser != null;
+ return sessionToken != null;
}
- /**
- * To define a security role for a given pollen user which can be
- * identified by his user account or a accountId.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 2.0
- */
- public enum PollenUserSecurityRole {
-
- /**
- * Connected user with administration rights.
- * <p/>
- * This role can access to everything, but can not vote.
- */
- ADMINISTRATOR,
-
- /**
- * Creator of the poll.
- * <p/>
- * This role can access to everything, but can not vote.
- */
- CREATOR,
-
- /** A user that has voted on a poll. */
- VOTER,
- /**
- * A user that was invited to a restricted poll.
- * <p/>
- * It might have alreay voted or not.
- */
- RESTRICTED_VOTER
-
+ public void setSubject(Subject subject) {
+ this.subject = subject;
}
- public static class ObjectSecurityContext<E extends JpaEntity> implements Serializable {
-
- private static final long serialVersionUID = 8554648867841712974L;
-
- protected final Class<E> type;
-
- protected final String id;
-
- protected final String token;
-
- public ObjectSecurityContext(Class<E> type,
- String id,
- String token) {
- this.type = type;
- this.id = id;
- this.token = token;
- }
+ protected PollenSecurityContext(SessionToken sessionToken) {
+ this.sessionToken = sessionToken;
}
}
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceContext.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceContext.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceContext.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -68,7 +68,7 @@
PollService getPollService();
- PollenUserService getUserService();
+ PollenUserService getPollenUserService();
VoteCountingService getVoteCountingService();
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/AbstractPollenService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/AbstractPollenService.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/AbstractPollenService.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -51,6 +51,10 @@
protected PollenServiceContext serviceContext;
+ public String createPermission(PermissionVerb verb, String id) {
+ return ":" + verb.name() + ":" + id;
+ }
+
@Override
public void setServiceContext(PollenServiceContext serviceContext) {
this.serviceContext = serviceContext;
@@ -103,7 +107,7 @@
}
protected PollenUserService getUserService() {
- return serviceContext.getUserService();
+ return serviceContext.getPollenUserService();
}
protected VoteCountingService getVoteCountingService() {
@@ -120,6 +124,11 @@
// -- check method -- //
+ protected void checkPermission(PermissionVerb verb, String id) {
+ String permission = createPermission(verb, id);
+// serviceContext.getSecurityContext().getSubject().checkPermission(permission);
+ }
+
protected void checkHasId(JpaEntity entity) {
Preconditions.checkState(JpaEntities.isEntityHasId(entity));
}
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/AuthService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/AuthService.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/AuthService.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -40,14 +40,11 @@
*/
public class AuthService extends AbstractPollenService {
- public String login(String login, String password) throws EntityNotFoundException, UserInvalidPasswordException {
+ public SessionToken login(String login, String password) throws EntityNotFoundException, UserInvalidPasswordException {
Preconditions.checkNotNull(login);
Preconditions.checkNotNull(password);
- PollenUser user = getPersistenceContext().getPollenUserDao().findByLogin(login);
- if (user == null) {
- throw new EntityNotFoundException(PollenUser.class, login);
- }
+ PollenUser user = getUserService().getUserByLogin(login);
String encodedPassword = serviceContext.encodePassword(password);
if (!encodedPassword.equals(user.getPassword())) {
@@ -67,7 +64,7 @@
dao.persist(sessionToken);
getPersistenceContext().commit();
- return token;
+ return sessionToken;
}
public void lostPassword(String login) throws EntityNotFoundException {
@@ -75,10 +72,7 @@
PollenUserJpaDao dao = getPersistenceContext().getPollenUserDao();
- PollenUser user = dao.findByLogin(login);
- if (user == null) {
- throw new EntityNotFoundException(PollenUser.class, login);
- }
+ PollenUser user = getUserService().getUserByLogin(login);
// Generate a new password
String newPassword = serviceContext.generatePassword();
@@ -87,25 +81,21 @@
dao.merge(user);
getPersistenceContext().commit();
- notifyPasswordChanged(user, newPassword);
+ //TODO Notifiy Password changed
}
public void logout(String login, String token) throws EntityNotFoundException {
Preconditions.checkNotNull(login);
Preconditions.checkNotNull(token);
- PollenUser user = getPersistenceContext().getPollenUserDao().findByLogin(login);
- if (user == null) {
- throw new EntityNotFoundException(PollenUser.class, login);
- }
+ getUserService().getUserByLogin(login);
+
String encodedToken = serviceContext.encodePassword(token);
SessionTokenJpaDao dao = getPersistenceContext().getSessionTokenDao();
SessionToken sessionToken = dao.findByToken(encodedToken);
- if (sessionToken == null) {
- throw new EntityNotFoundException(SessionToken.class, token);
- }
+ checkEntityExists(SessionToken.class, sessionToken, token);
dao.remove(sessionToken);
getPersistenceContext().commit();
@@ -121,7 +111,4 @@
return sessionToken;
}
- protected void notifyPasswordChanged(PollenUser user, String newPassword) {
- //TODO
- }
}
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -57,6 +57,7 @@
public Choice getChoice(String pollId, String choiceId) throws EntityNotFoundException {
Preconditions.checkNotNull(pollId);
Preconditions.checkNotNull(choiceId);
+ checkPermission(PermissionVerb.editChoice, choiceId);
Poll poll = getPollService().getPoll(pollId);
Choice result = getChoice(poll, choiceId);
@@ -69,10 +70,11 @@
checkHasNoId(choice);
Poll poll = getPollService().getPoll(pollId);
+ checkPermission(PermissionVerb.addChoice, pollId);
checkChoiceForm(poll, choice);
- Choice result = saveChoice(poll, choice, null);
+ Choice result = saveChoice(poll, choice);
getPersistenceContext().getPollDao().merge(poll);
getPersistenceContext().commit();
@@ -83,12 +85,13 @@
public Choice editChoice(String pollId, Choice choice) throws EntityNotFoundException, InvalidChoiceFormException {
Preconditions.checkNotNull(choice);
checkHasId(choice);
+ checkPermission(PermissionVerb.editChoice, choice.getId());
Poll poll = getPollService().getPoll(pollId);
checkChoiceForm(poll, choice);
- Choice result = saveChoice(poll, choice, null);
+ Choice result = saveChoice(poll, choice);
getPersistenceContext().getChoiceDao().merge(choice);
getPersistenceContext().commit();
@@ -99,6 +102,7 @@
public void deleteChoice(String pollId, String choiceId) throws EntityNotFoundException {
Preconditions.checkNotNull(pollId);
Preconditions.checkNotNull(choiceId);
+ checkPermission(PermissionVerb.deleteChoice, choiceId);
Poll poll = getPollService().getPoll(pollId);
Choice choice = getChoice(poll, choiceId);
@@ -118,8 +122,7 @@
}
protected Choice saveChoice(Poll poll,
- Choice choice,
- PollenPrincipal principal) throws EntityNotFoundException {
+ Choice choice) throws EntityNotFoundException {
ChoiceJpaDao choiceDao = getPersistenceContext().getChoiceDao();
@@ -136,22 +139,15 @@
// create a new choice
choiceToPersist = choiceDao.newInstance();
- if (principal == null) {
+ // create a new principal
+ PollenPrincipal principal = getSecurityService().generatePrincipal();
- // create a new principal
-
- principal = getSecurityService().generatePrincipal();
-
- if (choice.getCreator() == null) {
-
- //TODO Should we use the poll creator ?
-
- } else {
-
- principal.setName(choice.getCreator().getName());
- principal.setEmail(choice.getCreator().getEmail());
- }
+ PollenPrincipal creator = choice.getCreator();
+ if (creator != null) {
+ principal.setName(creator.getName());
+ principal.setEmail(creator.getEmail());
}
+
choiceToPersist.setCreator(principal);
poll.addChoice(choiceToPersist);
}
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/CommentService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/CommentService.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/CommentService.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -55,6 +55,7 @@
Preconditions.checkNotNull(commentId);
Poll poll = getPollService().getPoll(pollId);
+ checkPermission(PermissionVerb.readComment, commentId);
Comment result = getComment(poll, commentId);
return result;
@@ -64,7 +65,7 @@
Preconditions.checkNotNull(pollId);
Preconditions.checkNotNull(comment);
checkHasNoId(comment);
-
+ checkPermission(PermissionVerb.addComment, pollId);
Poll poll = getPollService().getPoll(pollId);
checkCommentForm(poll, comment);
@@ -80,6 +81,8 @@
Preconditions.checkNotNull(comment);
checkHasId(comment);
+ checkPermission(PermissionVerb.editComment, comment.getId());
+
Poll poll = getPollService().getPoll(pollId);
checkCommentForm(poll, comment);
@@ -94,6 +97,8 @@
Preconditions.checkNotNull(pollId);
Preconditions.checkNotNull(commentId);
+ checkPermission(PermissionVerb.deleteComment, commentId);
+
Poll poll = getPollService().getPoll(pollId);
Comment comment = getComment(poll, commentId);
Added: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PermissionVerb.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PermissionVerb.java (rev 0)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PermissionVerb.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -0,0 +1,57 @@
+package org.chorem.pollen.services.service;
+
+/*
+ * #%L
+ * Pollen :: Service
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2013 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+
+/**
+ * TODO
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public enum PermissionVerb {
+ readPoll,
+ readChoice,
+ readComment,
+ readVote,
+
+ addPoll,
+ addChoice,
+ addComment,
+ addVote,
+
+ editPoll,
+ editChoice,
+ editComment,
+ editVote,
+
+ deletePoll,
+ deleteChoice,
+ deleteComment,
+ deleteVote,
+
+ closePoll,
+ clonePoll,
+ exportPoll,
+
+}
Property changes on: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PermissionVerb.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -82,6 +82,7 @@
public Poll getPoll(String pollId) throws EntityNotFoundException {
Preconditions.checkNotNull(pollId);
+ checkPermission(PermissionVerb.readPoll, pollId);
Poll result = getPersistenceContext().getPollDao().findById(pollId);
checkEntityExists(Poll.class, result, pollId);
return result;
@@ -136,6 +137,8 @@
Preconditions.checkNotNull(poll);
checkHasId(poll);
+ checkPermission(PermissionVerb.editPoll, poll.getId());
+
checkPollForm(poll);
Poll toSave = savePoll(null, poll);
@@ -150,6 +153,8 @@
public void deletePoll(String pollId) throws EntityNotFoundException {
Preconditions.checkNotNull(pollId);
+ checkPermission(PermissionVerb.deletePoll, pollId);
+
Poll poll = getPoll(pollId);
getPersistenceContext().getPollDao().remove(poll);
@@ -164,6 +169,8 @@
public Poll clonePoll(String pollId) throws EntityNotFoundException {
Preconditions.checkNotNull(pollId);
+ checkPermission(PermissionVerb.clonePoll, pollId);
+
Poll poll = getPoll(pollId);
//TODO
getPersistenceContext().commit();
@@ -172,6 +179,7 @@
public File closePoll(String pollId) throws EntityNotFoundException {
Preconditions.checkNotNull(pollId);
+ checkPermission(PermissionVerb.closePoll, pollId);
Poll poll = getPoll(pollId);
//TODO
@@ -181,6 +189,7 @@
public File exportPoll(String pollId) throws EntityNotFoundException {
Preconditions.checkNotNull(pollId);
+ checkPermission(PermissionVerb.exportPoll, pollId);
Poll poll = getPoll(pollId);
//TODO
return null;
@@ -242,7 +251,7 @@
for (Choice choice : poll.getChoice()) {
- getChoiceService().saveChoice(toSave, choice, toSave.getCreator());
+ getChoiceService().saveChoice(toSave, choice);
}
// -- voting list -- //
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenUserService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenUserService.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenUserService.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -58,6 +58,14 @@
return result;
}
+ public PollenUser getUserByLogin(String login) throws EntityNotFoundException {
+ Preconditions.checkNotNull(login);
+
+ PollenUser result = getPersistenceContext().getPollenUserDao().findByLogin(login);
+ checkEntityExists(PollenUser.class, result, login);
+ return result;
+ }
+
public PollenUser createUser(PollenUser user, boolean generatePassword) throws InvalidPollenUserFormException, EntityNotFoundException {
Preconditions.checkNotNull(user);
checkHasNoId(user);
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/SecurityService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/SecurityService.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/SecurityService.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -23,9 +23,32 @@
* #L%
*/
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+import org.apache.shiro.subject.SimplePrincipalCollection;
+import org.apache.shiro.subject.Subject;
+import org.chorem.pollen.persistence.dao.ChoiceJpaDao;
+import org.chorem.pollen.persistence.dao.CommentJpaDao;
+import org.chorem.pollen.persistence.dao.PollJpaDao;
import org.chorem.pollen.persistence.dao.PollenPrincipalJpaDao;
+import org.chorem.pollen.persistence.dao.VoteJpaDao;
+import org.chorem.pollen.persistence.entity.Choice;
+import org.chorem.pollen.persistence.entity.Comment;
+import org.chorem.pollen.persistence.entity.CommentVisibility;
+import org.chorem.pollen.persistence.entity.Poll;
import org.chorem.pollen.persistence.entity.PollenPrincipal;
+import org.chorem.pollen.persistence.entity.PollenUser;
+import org.chorem.pollen.persistence.entity.Vote;
+import org.chorem.pollen.persistence.entity.VoterListMember;
+import org.chorem.pollen.services.PollenSecurityContext;
+import org.nuiton.jpa.api.JpaEntity;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
/**
* TODO
*
@@ -37,10 +60,230 @@
public PollenPrincipal generatePrincipal() {
PollenPrincipalJpaDao pollenPrincipalDao = getPersistenceContext().getPollenPrincipalDao();
PollenPrincipal principal = pollenPrincipalDao.newInstance();
- principal.setToken(serviceContext.generateToken());
principal.setCreationDate(serviceContext.getNow());
pollenPrincipalDao.persist(principal);
return principal;
+ }
+ public void prepareSubject(JpaEntity entity) {
+ Preconditions.checkNotNull(entity);
+ prepareSubject(entity.getId());
}
+
+ public void prepareSubject(String principalId) {
+ PollenSecurityContext securityContext = serviceContext.getSecurityContext();
+ Preconditions.checkNotNull(securityContext);
+ PollenUser pollenUser = securityContext.getPollenUser();
+ Subject subject = getSubject(principalId, pollenUser);
+ securityContext.setSubject(subject);
+ }
+
+ protected Subject getSubject(String principalId, PollenUser user) {
+ Set<String> permissions = Sets.newHashSet();
+
+ boolean userConnected = user != null;
+ boolean userIsAdmin = userConnected && user.isAdministrator();
+
+ if (userIsAdmin) {
+ permissions.add("*:*:*");
+ } else {
+
+ Set<PollenPrincipal> principals = Sets.newHashSet();
+
+ PollenPrincipalJpaDao pollenPrincipalDao =
+ getPersistenceContext().getPollenPrincipalDao();
+
+ if (principalId != null) {
+ PollenPrincipal pollenPrincipal =
+ pollenPrincipalDao.findById(principalId);
+ principals.add(pollenPrincipal);
+ }
+
+ if (userConnected) {
+
+ // find all principals
+ List<PollenPrincipal> allByPollenUser =
+ pollenPrincipalDao.findAllByPollenUser(user);
+ principals.addAll(allByPollenUser);
+ }
+
+ Map<PollenPrincipal, JpaEntity> principalJpaEntityMap = Maps.newHashMap();
+
+ for (PollenPrincipal principal : principals) {
+
+ // find out which entity is using this principal
+ JpaEntity entity = getPrincipalEntity(principal);
+ principalJpaEntityMap.put(principal, entity);
+
+ if (entity instanceof Poll) {
+
+ // add all poll entities
+ Poll poll = (Poll) entity;
+
+ if (!poll.isChoiceEmpty()) {
+ for (Choice choice : poll.getChoice()) {
+ principalJpaEntityMap.put(choice.getCreator(), choice);
+ }
+ }
+
+ if (!poll.isCommentEmpty()) {
+ for (Comment comment : poll.getComment()) {
+ principalJpaEntityMap.put(comment.getAuthor(), comment);
+ }
+ }
+
+ if (!poll.isVoteEmpty()) {
+ for (Vote vote : poll.getVote()) {
+ principalJpaEntityMap.put(vote.getVoter(), vote);
+ }
+ }
+ }
+ }
+
+ Date now = serviceContext.getNow();
+ for (Map.Entry<PollenPrincipal, JpaEntity> entry : principalJpaEntityMap.entrySet()) {
+ JpaEntity entity = entry.getValue();
+
+ if (entity instanceof Choice) {
+ permissions.add(createWildcardSubjectPermission(entity));
+ continue;
+ }
+ if (entity instanceof Comment) {
+ permissions.add(createWildcardSubjectPermission(entity));
+ continue;
+ }
+ if (entity instanceof Vote) {
+ permissions.add(createWildcardSubjectPermission(entity));
+ continue;
+ }
+ if (entity instanceof Poll) {
+ //TODO Get alls possible permissions on poll
+
+ Poll poll = (Poll) entity;
+
+ Set<VoterListMember> members = poll.getAllVoters();
+
+ boolean freePoll = poll.isFreePoll();
+
+ if (freePoll) {
+
+ // everybody can read poll ?
+ permissions.add(createSubjectPermission(PermissionVerb.readPoll, entity));
+ } else {
+
+ // only his creator / participants / voters can read it
+
+ for (VoterListMember member : members) {
+ permissions.add(createSubjectPermission(member.getId(), PermissionVerb.readPoll, entity));
+ }
+ }
+
+ if (poll.isAddChoiceRunning(now)) {
+
+ permissions.add(createSubjectPermission(PermissionVerb.addChoice, entity));
+ }
+
+ if (poll.getCommentVisibility() != CommentVisibility.NOBODY) {
+ //FIXME Should see with voter ?
+ permissions.add(createSubjectPermission(PermissionVerb.addComment, entity));
+ }
+
+ if (poll.isRunning(now)) {
+ permissions.add(createSubjectPermission(PermissionVerb.addVote, entity));
+ }
+
+ //TODO Do for editVote,...
+ }
+ }
+ }
+
+// SimplePrincipalCollection principalCollection = new SimplePrincipalCollection();
+// principalCollection.addAll(permissions, "pollenRealm");
+// Subject subject = new Subject.Builder().principals(principalCollection).buildSubject();
+// return subject;
+ return null;
+ }
+
+ protected JpaEntity getPrincipalEntity(PollenPrincipal principal) {
+
+ JpaEntity result = null;
+
+ // try a poll
+ Poll poll = getPollDao().findByCreator(principal);
+ if (poll == null) {
+
+ // try a choice
+ Choice choice = getChoiceDao().findByCreator(principal);
+ if (choice == null) {
+
+ // try a vote
+ Vote vote = getVoteDao().findByVoter(principal);
+ if (vote == null) {
+
+ // try a comment
+ Comment comment = getCommentDao().findByAuthor(principal);
+ if (comment != null) {
+ result = comment;
+ }
+ } else {
+ result = vote;
+ }
+ } else {
+ result = choice;
+ }
+ } else {
+ result = poll;
+ }
+
+ Preconditions.checkNotNull(result);
+ return result;
+ }
+
+ protected CommentJpaDao commentDao;
+
+ protected VoteJpaDao voteDao;
+
+ protected ChoiceJpaDao choiceDao;
+
+ protected PollJpaDao pollDao;
+
+ protected CommentJpaDao getCommentDao() {
+ if (commentDao == null) {
+ commentDao = getPersistenceContext().getCommentDao();
+ }
+ return commentDao;
+ }
+
+ protected VoteJpaDao getVoteDao() {
+ if (voteDao == null) {
+ voteDao = getPersistenceContext().getVoteDao();
+ }
+ return voteDao;
+ }
+
+ protected ChoiceJpaDao getChoiceDao() {
+ if (choiceDao == null) {
+ choiceDao = getPersistenceContext().getChoiceDao();
+ }
+ return choiceDao;
+ }
+
+ protected PollJpaDao getPollDao() {
+ if (pollDao == null) {
+ pollDao = getPersistenceContext().getPollDao();
+ }
+ return pollDao;
+ }
+
+ protected String createSubjectPermission(String people, PermissionVerb verb, JpaEntity entity) {
+ return people + ":" + verb.name() + ":" + entity.getId();
+ }
+
+ protected String createSubjectPermission(PermissionVerb verb, JpaEntity entity) {
+ return createSubjectPermission("*", verb, entity);
+ }
+
+ protected String createWildcardSubjectPermission(JpaEntity entity) {
+ return "*:*:" + entity.getId();
+ }
}
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/VoteService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/VoteService.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/VoteService.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -54,6 +54,7 @@
public Vote getVote(String pollId, String voteId) throws EntityNotFoundException {
Preconditions.checkNotNull(voteId);
+ checkPermission(PermissionVerb.readVote, voteId);
Poll poll = getPollService().getPoll(pollId);
Vote result = getVote(poll, voteId);
@@ -65,6 +66,7 @@
Preconditions.checkNotNull(pollId);
Preconditions.checkNotNull(vote);
checkHasNoId(vote);
+ checkPermission(PermissionVerb.addVote, pollId);
Poll poll = getPollService().getPoll(pollId);
checkVoteForm(poll, vote);
@@ -80,6 +82,7 @@
public Vote editVote(String pollId, Vote vote) throws EntityNotFoundException, InvalidVoteFormException {
Preconditions.checkNotNull(vote);
checkHasId(vote);
+ checkPermission(PermissionVerb.editVote, vote.getId());
Poll poll = getPollService().getPoll(pollId);
checkVoteForm(poll, vote);
@@ -96,6 +99,8 @@
Preconditions.checkNotNull(pollId);
Preconditions.checkNotNull(voteId);
+ checkPermission(PermissionVerb.deleteVote, voteId);
+
Poll poll = getPollService().getPoll(pollId);
Vote vote = getVote(poll, voteId);
@@ -136,6 +141,7 @@
Vote toSave;
+ //TODO Finish save
if (commentExists) {
toSave = getVote(poll, vote.getId());
Modified: trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollServiceTest.java
===================================================================
--- trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollServiceTest.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollServiceTest.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -29,6 +29,7 @@
import org.chorem.pollen.persistence.entity.PollType;
import org.chorem.pollen.persistence.entity.VoterList;
import org.chorem.pollen.persistence.entity.VoterListMember;
+import org.chorem.pollen.services.PollenSecurityContext;
import org.chorem.pollen.services.exception.EntityNotFoundException;
import org.chorem.pollen.services.exception.InvalidPollFormException;
import org.chorem.pollen.services.service.PollService;
@@ -57,6 +58,8 @@
service = serviceContext.getPollService();
serviceContext.setDate(new Date(1363948427576l));
+
+ serviceContext.setSecurityContext(PollenSecurityContext.newContext(null));
}
@Test
@@ -109,6 +112,8 @@
Assert.assertNotNull(createdPoll);
Assert.assertNotNull(createdPoll.getId());
+ serviceContext.getSecurityService().prepareSubject(createdPoll.getCreator().getId());
+
Poll reloadedPoll = service.getPoll(createdPoll.getId());
Assert.assertEquals(createdPoll, reloadedPoll);
@@ -116,7 +121,6 @@
Assert.assertNotNull(createdPoll.getCreator());
Assert.assertNotNull(createdPoll.getCreator().getId());
- Assert.assertNotNull(createdPoll.getCreator().getToken());
Assert.assertNull(createdPoll.getCreator().getName());
Assert.assertNull(createdPoll.getCreator().getEmail());
Assert.assertNull(createdPoll.getComment());
@@ -236,7 +240,6 @@
voterListMember2.setName("voter2");
voterListMember2.setEmail("voter2(a)pollen.org");
-
Poll createdPoll = service.createPoll(null, poll);
Assert.assertNotNull(createdPoll);
Assert.assertNotNull(createdPoll.getId());
@@ -248,7 +251,6 @@
Assert.assertNotNull(createdPoll.getCreator());
Assert.assertNotNull(createdPoll.getCreator().getId());
- Assert.assertNotNull(createdPoll.getCreator().getToken());
Assert.assertNull(createdPoll.getCreator().getName());
Assert.assertNull(createdPoll.getCreator().getEmail());
Assert.assertNull(createdPoll.getComment());
Modified: trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollenUserServiceTest.java
===================================================================
--- trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollenUserServiceTest.java 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollenUserServiceTest.java 2013-06-20 07:55:10 UTC (rev 3838)
@@ -54,7 +54,7 @@
loadFixtures("fixtures");
- service = serviceContext.getUserService();
+ service = serviceContext.getPollenUserService();
serviceContext.setDate(new Date(1363948427576l));
Modified: trunk/pollen-ui-js/src/main/resources/nuiton-js/wro.properties
===================================================================
--- trunk/pollen-ui-js/src/main/resources/nuiton-js/wro.properties 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-ui-js/src/main/resources/nuiton-js/wro.properties 2013-06-20 07:55:10 UTC (rev 3838)
@@ -1,3 +1,25 @@
+###
+# #%L
+# Pollen :: UI (JS)
+# $Id$
+# $HeadURL$
+# %%
+# Copyright (C) 2009 - 2013 CodeLutin
+# %%
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# #L%
+###
debug=false
preProcessors=forceCssDataUri,cssUrlRewriting,cssImport,semicolonAppender,cssMinJawr
postProcessors=cssVariables,jsMin
Modified: trunk/pollen-ui-js/src/main/resources/nuiton-js/wro.xml
===================================================================
--- trunk/pollen-ui-js/src/main/resources/nuiton-js/wro.xml 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-ui-js/src/main/resources/nuiton-js/wro.xml 2013-06-20 07:55:10 UTC (rev 3838)
@@ -1,3 +1,25 @@
+<!--
+ #%L
+ Pollen :: UI (JS)
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2013 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
<groups xmlns="http://www.isdc.ro/wro">
<group name='pollen-ui-js'>
Modified: trunk/pollen-ui-js/src/main/webapp/bundle/Messages.properties
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/bundle/Messages.properties 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-ui-js/src/main/webapp/bundle/Messages.properties 2013-06-20 07:55:10 UTC (rev 3838)
@@ -1,3 +1,25 @@
+###
+# #%L
+# Pollen :: UI (JS)
+# $Id$
+# $HeadURL$
+# %%
+# Copyright (C) 2009 - 2013 CodeLutin
+# %%
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# #L%
+###
pollen.app.title=Pollen
#common
Modified: trunk/pollen-ui-js/src/main/webapp/css/style.css
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/css/style.css 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-ui-js/src/main/webapp/css/style.css 2013-06-20 07:55:10 UTC (rev 3838)
@@ -1,3 +1,25 @@
+/*
+ * #%L
+ * Pollen :: UI (JS)
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2013 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
.dropdown-menu.form {
padding: 0;
padding-top: 15px;
Modified: trunk/pollen-ui-js/src/main/webapp/index.html
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/index.html 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-ui-js/src/main/webapp/index.html 2013-06-20 07:55:10 UTC (rev 3838)
@@ -1,3 +1,25 @@
+<!--
+ #%L
+ Pollen :: UI (JS)
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2013 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
<!DOCTYPE html>
<html lang="fr" xmlns="http://www.w3.org/1999/xhtml">
<head>
Modified: trunk/pollen-ui-js/src/main/webapp/js/controls/menu.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/controls/menu.js 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-ui-js/src/main/webapp/js/controls/menu.js 2013-06-20 07:55:10 UTC (rev 3838)
@@ -1,3 +1,25 @@
+/*
+ * #%L
+ * Pollen :: UI (JS)
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2013 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
var Menu = can.Control({
init: function() {
this.element.html(can.view('views/menu.ejs', {currentUser: currentUser}));
Modified: trunk/pollen-ui-js/src/main/webapp/js/controls/poll_form.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/controls/poll_form.js 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-ui-js/src/main/webapp/js/controls/poll_form.js 2013-06-20 07:55:10 UTC (rev 3838)
@@ -1,3 +1,25 @@
+/*
+ * #%L
+ * Pollen :: UI (JS)
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2013 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
var PollForm = can.Control({
defaults: {
Modified: trunk/pollen-ui-js/src/main/webapp/js/controls/poll_list.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/controls/poll_list.js 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-ui-js/src/main/webapp/js/controls/poll_list.js 2013-06-20 07:55:10 UTC (rev 3838)
@@ -1,3 +1,25 @@
+/*
+ * #%L
+ * Pollen :: UI (JS)
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2013 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
var PollList = can.Control({
defaults: {
Property changes on: trunk/pollen-ui-js/src/main/webapp/js/controls/poll_list.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/pollen-ui-js/src/main/webapp/js/controls/poll_summary.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/controls/poll_summary.js 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-ui-js/src/main/webapp/js/controls/poll_summary.js 2013-06-20 07:55:10 UTC (rev 3838)
@@ -1,3 +1,25 @@
+/*
+ * #%L
+ * Pollen :: UI (JS)
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2013 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
var PollSummary = can.Control({
defaults: {
Modified: trunk/pollen-ui-js/src/main/webapp/js/controls/user_form.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/controls/user_form.js 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-ui-js/src/main/webapp/js/controls/user_form.js 2013-06-20 07:55:10 UTC (rev 3838)
@@ -1,3 +1,25 @@
+/*
+ * #%L
+ * Pollen :: UI (JS)
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2013 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
var UserForm = can.Control({
defaults: {
Modified: trunk/pollen-ui-js/src/main/webapp/js/controls/vote.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/controls/vote.js 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-ui-js/src/main/webapp/js/controls/vote.js 2013-06-20 07:55:10 UTC (rev 3838)
@@ -1,3 +1,25 @@
+/*
+ * #%L
+ * Pollen :: UI (JS)
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2013 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
var PollVote = can.Control({
// route
Modified: trunk/pollen-ui-js/src/main/webapp/js/libs/jquery.scrollto.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/libs/jquery.scrollto.js 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-ui-js/src/main/webapp/js/libs/jquery.scrollto.js 2013-06-20 07:55:10 UTC (rev 3838)
@@ -1,3 +1,25 @@
+/*
+ * #%L
+ * Pollen :: UI (JS)
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2013 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
/*!
* jquery.scrollto.js 0.0.1 - https://github.com/yckart/jquery.scrollto.js
* Scroll smooth to any element in your DOM.
Modified: trunk/pollen-ui-js/src/main/webapp/js/models/comments.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/models/comments.js 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-ui-js/src/main/webapp/js/models/comments.js 2013-06-20 07:55:10 UTC (rev 3838)
@@ -1,3 +1,25 @@
+/*
+ * #%L
+ * Pollen :: UI (JS)
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2013 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
var Comment = can.Model({
findAll : "GET " + backendUrl + "/polls/{pollId}/comments",
findOne : "GET " + backendUrl + "/polls/{pollId}/comments/{id}",
Modified: trunk/pollen-ui-js/src/main/webapp/js/models/polls.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/models/polls.js 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-ui-js/src/main/webapp/js/models/polls.js 2013-06-20 07:55:10 UTC (rev 3838)
@@ -1,3 +1,25 @@
+/*
+ * #%L
+ * Pollen :: UI (JS)
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2013 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
var Poll = can.Model({
findAll : "GET " + backendUrl + "/polls",
findOne : "GET " + backendUrl + "/polls/{id}",
Modified: trunk/pollen-ui-js/src/main/webapp/js/models/users.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/models/users.js 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-ui-js/src/main/webapp/js/models/users.js 2013-06-20 07:55:10 UTC (rev 3838)
@@ -1,3 +1,25 @@
+/*
+ * #%L
+ * Pollen :: UI (JS)
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2013 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
var User = can.Model({
findAll : "GET " + backendUrl + "/users",
findOne : "GET " + backendUrl + "/users/{id}",
Property changes on: trunk/pollen-ui-js/src/main/webapp/js/models/users.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/pollen-ui-js/src/main/webapp/js/models/votes.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/models/votes.js 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-ui-js/src/main/webapp/js/models/votes.js 2013-06-20 07:55:10 UTC (rev 3838)
@@ -1,3 +1,25 @@
+/*
+ * #%L
+ * Pollen :: UI (JS)
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2013 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
var Vote = can.Model({
findAll : "GET " + backendUrl + "/polls/{pollId}/votes",
findOne : "GET " + backendUrl + "/polls/{pollId}/votes/{id}",
Modified: trunk/pollen-ui-js/src/main/webapp/js/route.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/route.js 2013-06-19 17:50:01 UTC (rev 3837)
+++ trunk/pollen-ui-js/src/main/webapp/js/route.js 2013-06-20 07:55:10 UTC (rev 3838)
@@ -1,3 +1,25 @@
+/*
+ * #%L
+ * Pollen :: UI (JS)
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2013 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
var Routing = can.Control({
'route': function() {
// Matches every routing change, but gets passed no data.
Property changes on: trunk/pollen-ui-js/src/main/webapp/views/poll_list.ejs
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/pollen-ui-js/src/main/webapp/views/user_form.ejs
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
1
0
r3837 - in trunk/pollen-ui-js/src/main/webapp: . bundle css js/controls js/models views
by kmorin@users.chorem.org 19 Jun '13
by kmorin@users.chorem.org 19 Jun '13
19 Jun '13
Author: kmorin
Date: 2013-06-19 19:50:01 +0200 (Wed, 19 Jun 2013)
New Revision: 3837
Url: http://chorem.org/projects/pollen/repository/revisions/3837
Log:
- add login
- add poll list
Added:
trunk/pollen-ui-js/src/main/webapp/js/controls/poll_list.js
trunk/pollen-ui-js/src/main/webapp/views/poll_list.ejs
Removed:
trunk/pollen-ui-js/src/main/webapp/css/bootstrap.min.css
Modified:
trunk/pollen-ui-js/src/main/webapp/bundle/Messages.properties
trunk/pollen-ui-js/src/main/webapp/css/style.css
trunk/pollen-ui-js/src/main/webapp/index.html
trunk/pollen-ui-js/src/main/webapp/js/controls/menu.js
trunk/pollen-ui-js/src/main/webapp/js/controls/poll_form.js
trunk/pollen-ui-js/src/main/webapp/js/controls/poll_summary.js
trunk/pollen-ui-js/src/main/webapp/js/controls/vote.js
trunk/pollen-ui-js/src/main/webapp/js/models/comments.js
trunk/pollen-ui-js/src/main/webapp/js/models/polls.js
trunk/pollen-ui-js/src/main/webapp/js/models/users.js
trunk/pollen-ui-js/src/main/webapp/js/models/votes.js
trunk/pollen-ui-js/src/main/webapp/views/menu.ejs
trunk/pollen-ui-js/src/main/webapp/views/poll_form.ejs
trunk/pollen-ui-js/src/main/webapp/views/summary.ejs
trunk/pollen-ui-js/src/main/webapp/views/vote.ejs
Modified: trunk/pollen-ui-js/src/main/webapp/bundle/Messages.properties
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/bundle/Messages.properties 2013-06-18 16:48:04 UTC (rev 3836)
+++ trunk/pollen-ui-js/src/main/webapp/bundle/Messages.properties 2013-06-19 17:50:01 UTC (rev 3837)
@@ -36,8 +36,19 @@
#menu
pollen.menu.home=Accueil
-pollen.menu.polls=Sondages
+pollen.menu.polls.label=Sondages
+pollen.menu.polls.create=Créer un sondage
+pollen.menu.polls.list=Mes sondages
pollen.menu.register=Créer un compte
+pollen.menu.login.label=S'identifier
+pollen.menu.login.form.login.label=Identifiant
+pollen.menu.login.form.login.placeholder=Votre identifiant
+pollen.menu.login.form.password.label=Mot de passe
+pollen.menu.login.form.password.placeholder=Votre mot de passe
+pollen.menu.login.form.rememberMe.label=Rester connecté
+pollen.menu.login.form.button=M'identifier
+pollen.menu.user.profile=Mon profile
+pollen.menu.logout=Déconnexion
#poll creation form
pollen.poll.form.create.button.save=Créer le sondage
@@ -45,6 +56,9 @@
pollen.poll.form.create.field.title.placeholder=Titre
pollen.poll.form.create.title=Création de sondage
+#poll lists
+pollen.polls.created.title=Sondages créés
+
#poll summary
pollen.poll.summary.title=Sondage \'{0}\'
pollen.poll.summary.linkToVote=Lien pour participer :
Deleted: trunk/pollen-ui-js/src/main/webapp/css/bootstrap.min.css
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/css/bootstrap.min.css 2013-06-18 16:48:04 UTC (rev 3836)
+++ trunk/pollen-ui-js/src/main/webapp/css/bootstrap.min.css 2013-06-19 17:50:01 UTC (rev 3837)
@@ -1,874 +0,0 @@
-/*!
- * Bootstrap v2.3.2
- *
- * Copyright 2012 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- */
-.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0;}
-.clearfix:after{clear:both;}
-.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;}
-.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}
-article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
-audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
-audio:not([controls]){display:none;}
-html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
-a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
-a:hover,a:active{outline:0;}
-sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;}
-sup{top:-0.5em;}
-sub{bottom:-0.25em;}
-img{max-width:100%;width:auto\9;height:auto;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;}
-#map_canvas img,.google-maps img{max-width:none;}
-button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;}
-button,input{*overflow:visible;line-height:normal;}
-button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;}
-button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;}
-label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer;}
-input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield;}
-input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
-textarea{overflow:auto;vertical-align:top;}
-@media print{*{text-shadow:none !important;color:#000 !important;background:transparent !important;box-shadow:none !important;} a,a:visited{text-decoration:underline;} a[href]:after{content:" (" attr(href) ")";} abbr[title]:after{content:" (" attr(title) ")";} .ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:"";} pre,blockquote{border:1px solid #999;page-break-inside:avoid;} thead{display:table-header-group;} tr,img{page-break-inside:avoid;} img{max-width:100% !important;} @page {margin:0.5cm;}p,h2,h3{orphans:3;widows:3;} h2,h3{page-break-after:avoid;}}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333333;background-color:#ffffff;}
-a{color:#0088cc;text-decoration:none;}
-a:hover,a:focus{color:#005580;text-decoration:underline;}
-.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
-.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);}
-.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px;}
-.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";line-height:0;}
-.row:after{clear:both;}
-[class*="span"]{float:left;min-height:1px;margin-left:20px;}
-.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
-.span12{width:940px;}
-.span11{width:860px;}
-.span10{width:780px;}
-.span9{width:700px;}
-.span8{width:620px;}
-.span7{width:540px;}
-.span6{width:460px;}
-.span5{width:380px;}
-.span4{width:300px;}
-.span3{width:220px;}
-.span2{width:140px;}
-.span1{width:60px;}
-.offset12{margin-left:980px;}
-.offset11{margin-left:900px;}
-.offset10{margin-left:820px;}
-.offset9{margin-left:740px;}
-.offset8{margin-left:660px;}
-.offset7{margin-left:580px;}
-.offset6{margin-left:500px;}
-.offset5{margin-left:420px;}
-.offset4{margin-left:340px;}
-.offset3{margin-left:260px;}
-.offset2{margin-left:180px;}
-.offset1{margin-left:100px;}
-.row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0;}
-.row-fluid:after{clear:both;}
-.row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;}
-.row-fluid [class*="span"]:first-child{margin-left:0;}
-.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%;}
-.row-fluid .span12{width:100%;*width:99.94680851063829%;}
-.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%;}
-.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%;}
-.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%;}
-.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%;}
-.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%;}
-.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%;}
-.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%;}
-.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%;}
-.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%;}
-.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%;}
-.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%;}
-.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%;}
-.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%;}
-.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%;}
-.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%;}
-.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%;}
-.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%;}
-.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%;}
-.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%;}
-.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%;}
-.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%;}
-.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%;}
-.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%;}
-.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%;}
-.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%;}
-.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%;}
-.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%;}
-.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%;}
-.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%;}
-.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%;}
-.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%;}
-.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%;}
-.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%;}
-.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%;}
-.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%;}
-[class*="span"].hide,.row-fluid [class*="span"].hide{display:none;}
-[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right;}
-.container{margin-right:auto;margin-left:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";line-height:0;}
-.container:after{clear:both;}
-.container-fluid{padding-right:20px;padding-left:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";line-height:0;}
-.container-fluid:after{clear:both;}
-p{margin:0 0 10px;}
-.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px;}
-small{font-size:85%;}
-strong{font-weight:bold;}
-em{font-style:italic;}
-cite{font-style:normal;}
-.muted{color:#999999;}
-a.muted:hover,a.muted:focus{color:#808080;}
-.text-warning{color:#c09853;}
-a.text-warning:hover,a.text-warning:focus{color:#a47e3c;}
-.text-error{color:#b94a48;}
-a.text-error:hover,a.text-error:focus{color:#953b39;}
-.text-info{color:#3a87ad;}
-a.text-info:hover,a.text-info:focus{color:#2d6987;}
-.text-success{color:#468847;}
-a.text-success:hover,a.text-success:focus{color:#356635;}
-.text-left{text-align:left;}
-.text-right{text-align:right;}
-.text-center{text-align:center;}
-h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999999;}
-h1,h2,h3{line-height:40px;}
-h1{font-size:38.5px;}
-h2{font-size:31.5px;}
-h3{font-size:24.5px;}
-h4{font-size:17.5px;}
-h5{font-size:14px;}
-h6{font-size:11.9px;}
-h1 small{font-size:24.5px;}
-h2 small{font-size:17.5px;}
-h3 small{font-size:14px;}
-h4 small{font-size:14px;}
-.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eeeeee;}
-ul,ol{padding:0;margin:0 0 10px 25px;}
-ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
-li{line-height:20px;}
-ul.unstyled,ol.unstyled{margin-left:0;list-style:none;}
-ul.inline,ol.inline{margin-left:0;list-style:none;}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;*zoom:1;padding-left:5px;padding-right:5px;}
-dl{margin-bottom:20px;}
-dt,dd{line-height:20px;}
-dt{font-weight:bold;}
-dd{margin-left:10px;}
-.dl-horizontal{*zoom:1;}.dl-horizontal:before,.dl-horizontal:after{display:table;content:"";line-height:0;}
-.dl-horizontal:after{clear:both;}
-.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
-.dl-horizontal dd{margin-left:180px;}
-hr{margin:20px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;}
-abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999999;}
-abbr.initialism{font-size:90%;text-transform:uppercase;}
-blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25;}
-blockquote small{display:block;line-height:20px;color:#999999;}blockquote small:before{content:'\2014 \00A0';}
-blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;}
-blockquote.pull-right small:before{content:'';}
-blockquote.pull-right small:after{content:'\00A0 \2014';}
-q:before,q:after,blockquote:before,blockquote:after{content:"";}
-address{display:block;margin-bottom:20px;font-style:normal;line-height:20px;}
-code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
-code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;white-space:nowrap;}
-pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}pre.prettyprint{margin-bottom:20px;}
-pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0;}
-.pre-scrollable{max-height:340px;overflow-y:scroll;}
-.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#ffffff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;}
-.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
-.badge{padding-left:9px;padding-right:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;}
-.label:empty,.badge:empty{display:none;}
-a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#ffffff;text-decoration:none;cursor:pointer;}
-.label-important,.badge-important{background-color:#b94a48;}
-.label-important[href],.badge-important[href]{background-color:#953b39;}
-.label-warning,.badge-warning{background-color:#f89406;}
-.label-warning[href],.badge-warning[href]{background-color:#c67605;}
-.label-success,.badge-success{background-color:#468847;}
-.label-success[href],.badge-success[href]{background-color:#356635;}
-.label-info,.badge-info{background-color:#3a87ad;}
-.label-info[href],.badge-info[href]{background-color:#2d6987;}
-.label-inverse,.badge-inverse{background-color:#333333;}
-.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a;}
-.btn .label,.btn .badge{position:relative;top:-1px;}
-.btn-mini .label,.btn-mini .badge{top:0;}
-table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;}
-.table{width:100%;margin-bottom:20px;}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}
-.table th{font-weight:bold;}
-.table thead th{vertical-align:bottom;}
-.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;}
-.table tbody+tbody{border-top:2px solid #dddddd;}
-.table .table{background-color:#ffffff;}
-.table-condensed th,.table-condensed td{padding:4px 5px;}
-.table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;}
-.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;}
-.table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;}
-.table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;}
-.table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
-.table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;}
-.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;}
-.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;}
-.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;}
-.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;}
-.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9;}
-.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5;}
-table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0;}
-.table td.span1,.table th.span1{float:none;width:44px;margin-left:0;}
-.table td.span2,.table th.span2{float:none;width:124px;margin-left:0;}
-.table td.span3,.table th.span3{float:none;width:204px;margin-left:0;}
-.table td.span4,.table th.span4{float:none;width:284px;margin-left:0;}
-.table td.span5,.table th.span5{float:none;width:364px;margin-left:0;}
-.table td.span6,.table th.span6{float:none;width:444px;margin-left:0;}
-.table td.span7,.table th.span7{float:none;width:524px;margin-left:0;}
-.table td.span8,.table th.span8{float:none;width:604px;margin-left:0;}
-.table td.span9,.table th.span9{float:none;width:684px;margin-left:0;}
-.table td.span10,.table th.span10{float:none;width:764px;margin-left:0;}
-.table td.span11,.table th.span11{float:none;width:844px;margin-left:0;}
-.table td.span12,.table th.span12{float:none;width:924px;margin-left:0;}
-.table tbody tr.success>td{background-color:#dff0d8;}
-.table tbody tr.error>td{background-color:#f2dede;}
-.table tbody tr.warning>td{background-color:#fcf8e3;}
-.table tbody tr.info>td{background-color:#d9edf7;}
-.table-hover tbody tr.success:hover>td{background-color:#d0e9c6;}
-.table-hover tbody tr.error:hover>td{background-color:#ebcccc;}
-.table-hover tbody tr.warning:hover>td{background-color:#faf2cc;}
-.table-hover tbody tr.info:hover>td{background-color:#c4e3f3;}
-form{margin:0 0 20px;}
-fieldset{padding:0;margin:0;border:0;}
-legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333333;border:0;border-bottom:1px solid #e5e5e5;}legend small{font-size:15px;color:#999999;}
-label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px;}
-input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;}
-label{display:block;margin-bottom:5px;}
-select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555555;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;vertical-align:middle;}
-input,textarea,.uneditable-input{width:206px;}
-textarea{height:auto;}
-textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#ffffff;border:1px solid #cccccc;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear .2s, box-shadow linear .2s;-moz-transition:border linear .2s, box-shadow linear .2s;-o-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82, 168, 236, 0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);}
-input[type="radio"],input[type="checkbox"]{margin:4px 0 0;*margin-top:0;margin-top:1px \9;line-height:normal;}
-input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto;}
-select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px;}
-select{width:220px;border:1px solid #cccccc;background-color:#ffffff;}
-select[multiple],select[size]{height:auto;}
-select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
-.uneditable-input,.uneditable-textarea{color:#999999;background-color:#fcfcfc;border-color:#cccccc;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;}
-.uneditable-input{overflow:hidden;white-space:nowrap;}
-.uneditable-textarea{width:auto;height:auto;}
-input:-moz-placeholder,textarea:-moz-placeholder{color:#999999;}
-input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999999;}
-input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999999;}
-.radio,.checkbox{min-height:20px;padding-left:20px;}
-.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px;}
-.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;}
-.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle;}
-.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;}
-.input-mini{width:60px;}
-.input-small{width:90px;}
-.input-medium{width:150px;}
-.input-large{width:210px;}
-.input-xlarge{width:270px;}
-.input-xxlarge{width:530px;}
-input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0;}
-.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block;}
-input,textarea,.uneditable-input{margin-left:0;}
-.controls-row [class*="span"]+[class*="span"]{margin-left:20px;}
-input.span12,textarea.span12,.uneditable-input.span12{width:926px;}
-input.span11,textarea.span11,.uneditable-input.span11{width:846px;}
-input.span10,textarea.span10,.uneditable-input.span10{width:766px;}
-input.span9,textarea.span9,.uneditable-input.span9{width:686px;}
-input.span8,textarea.span8,.uneditable-input.span8{width:606px;}
-input.span7,textarea.span7,.uneditable-input.span7{width:526px;}
-input.span6,textarea.span6,.uneditable-input.span6{width:446px;}
-input.span5,textarea.span5,.uneditable-input.span5{width:366px;}
-input.span4,textarea.span4,.uneditable-input.span4{width:286px;}
-input.span3,textarea.span3,.uneditable-input.span3{width:206px;}
-input.span2,textarea.span2,.uneditable-input.span2{width:126px;}
-input.span1,textarea.span1,.uneditable-input.span1{width:46px;}
-.controls-row{*zoom:1;}.controls-row:before,.controls-row:after{display:table;content:"";line-height:0;}
-.controls-row:after{clear:both;}
-.controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left;}
-.controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px;}
-input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eeeeee;}
-input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent;}
-.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;}
-.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;}
-.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;}
-.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;}
-.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;}
-.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;}
-.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;}
-.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;}
-.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;}
-.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;}
-.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;}
-.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;}
-.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad;}
-.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad;}
-.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;}
-.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad;}
-input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;}
-.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1;}.form-actions:before,.form-actions:after{display:table;content:"";line-height:0;}
-.form-actions:after{clear:both;}
-.help-block,.help-inline{color:#595959;}
-.help-block{display:block;margin-bottom:10px;}
-.help-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding-left:5px;}
-.input-append,.input-prepend{display:inline-block;margin-bottom:10px;vertical-align:middle;font-size:0;white-space:nowrap;}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu,.input-append .popover,.input-prepend .popover{font-size:14px;}
-.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2;}
-.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #ffffff;background-color:#eeeeee;border:1px solid #ccc;}
-.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
-.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546;}
-.input-prepend .add-on,.input-prepend .btn{margin-right:-1px;}
-.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}
-.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
-.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px;}
-.input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
-.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
-.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}
-.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
-.input-prepend.input-append .btn-group:first-child{margin-left:0;}
-input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}
-.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
-.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px;}
-.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0;}
-.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0;}
-.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px;}
-.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;*zoom:1;margin-bottom:0;vertical-align:middle;}
-.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none;}
-.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block;}
-.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0;}
-.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle;}
-.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0;}
-.control-group{margin-bottom:10px;}
-legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate;}
-.form-horizontal .control-group{margin-bottom:20px;*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";line-height:0;}
-.form-horizontal .control-group:after{clear:both;}
-.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right;}
-.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0;}.form-horizontal .controls:first-child{*padding-left:180px;}
-.form-horizontal .help-block{margin-bottom:0;}
-.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px;}
-.form-horizontal .form-actions{padding-left:180px;}
-.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333333;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top, #ffffff, #e6e6e6);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(top, #ffffff, #e6e6e6);background-image:-o-linear-gradient(top, #ffffff, #e6e6e6);background-image:linear-gradient(to bottom, #ffffff, #e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border:1px solid #cccccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333333;background-color:#e6e6e6;*background-color:#d9d9d9;}
-.btn:active,.btn.active{background-color:#cccccc \9;}
-.btn:first-child{*margin-left:0;}
-.btn:hover,.btn:focus{color:#333333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;}
-.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
-.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);}
-.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
-.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
-.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px;}
-.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
-.btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0;}
-.btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px;}
-.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
-.btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}
-.btn-block+.btn-block{margin-top:5px;}
-input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%;}
-.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255, 255, 255, 0.75);}
-.btn-primary{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#006dcc;background-image:-moz-linear-gradient(top, #0088cc, #0044cc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));background-image:-webkit-linear-gradient(top, #0088cc, #0044cc);background-image:-o-linear-gradient(top, #0088cc, #0044cc);background-image:linear-gradient(to bottom, #0088cc, #0044cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);border-color:#0044cc #0044cc #002a80;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#0044cc;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#ffffff;background-color:#0044cc;*background-color:#003bb3;}
-.btn-primary:active,.btn-primary.active{background-color:#003399 \9;}
-.btn-warning{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(to bottom, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#ffffff;background-color:#f89406;*background-color:#df8505;}
-.btn-warning:active,.btn-warning.active{background-color:#c67605 \9;}
-.btn-danger{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(to bottom, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#bd362f;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#ffffff;background-color:#bd362f;*background-color:#a9302a;}
-.btn-danger:active,.btn-danger.active{background-color:#942a25 \9;}
-.btn-success{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#5bb75b;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(to bottom, #62c462, #51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#51a351;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#ffffff;background-color:#51a351;*background-color:#499249;}
-.btn-success:active,.btn-success.active{background-color:#408140 \9;}
-.btn-info{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(to bottom, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#2f96b4;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#ffffff;background-color:#2f96b4;*background-color:#2a85a0;}
-.btn-info:active,.btn-info.active{background-color:#24748c \9;}
-.btn-inverse{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#363636;background-image:-moz-linear-gradient(top, #444444, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));background-image:-webkit-linear-gradient(top, #444444, #222222);background-image:-o-linear-gradient(top, #444444, #222222);background-image:linear-gradient(to bottom, #444444, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#222222;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#ffffff;background-color:#222222;*background-color:#151515;}
-.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9;}
-button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;}
-button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px;}
-button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px;}
-button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px;}
-.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
-.btn-link{border-color:transparent;cursor:pointer;color:#0088cc;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
-.btn-link:hover,.btn-link:focus{color:#005580;text-decoration:underline;background-color:transparent;}
-.btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333333;text-decoration:none;}
-[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;margin-top:1px;}
-.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:focus>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:focus>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png");}
-.icon-glass{background-position:0 0;}
-.icon-music{background-position:-24px 0;}
-.icon-search{background-position:-48px 0;}
-.icon-envelope{background-position:-72px 0;}
-.icon-heart{background-position:-96px 0;}
-.icon-star{background-position:-120px 0;}
-.icon-star-empty{background-position:-144px 0;}
-.icon-user{background-position:-168px 0;}
-.icon-film{background-position:-192px 0;}
-.icon-th-large{background-position:-216px 0;}
-.icon-th{background-position:-240px 0;}
-.icon-th-list{background-position:-264px 0;}
-.icon-ok{background-position:-288px 0;}
-.icon-remove{background-position:-312px 0;}
-.icon-zoom-in{background-position:-336px 0;}
-.icon-zoom-out{background-position:-360px 0;}
-.icon-off{background-position:-384px 0;}
-.icon-signal{background-position:-408px 0;}
-.icon-cog{background-position:-432px 0;}
-.icon-trash{background-position:-456px 0;}
-.icon-home{background-position:0 -24px;}
-.icon-file{background-position:-24px -24px;}
-.icon-time{background-position:-48px -24px;}
-.icon-road{background-position:-72px -24px;}
-.icon-download-alt{background-position:-96px -24px;}
-.icon-download{background-position:-120px -24px;}
-.icon-upload{background-position:-144px -24px;}
-.icon-inbox{background-position:-168px -24px;}
-.icon-play-circle{background-position:-192px -24px;}
-.icon-repeat{background-position:-216px -24px;}
-.icon-refresh{background-position:-240px -24px;}
-.icon-list-alt{background-position:-264px -24px;}
-.icon-lock{background-position:-287px -24px;}
-.icon-flag{background-position:-312px -24px;}
-.icon-headphones{background-position:-336px -24px;}
-.icon-volume-off{background-position:-360px -24px;}
-.icon-volume-down{background-position:-384px -24px;}
-.icon-volume-up{background-position:-408px -24px;}
-.icon-qrcode{background-position:-432px -24px;}
-.icon-barcode{background-position:-456px -24px;}
-.icon-tag{background-position:0 -48px;}
-.icon-tags{background-position:-25px -48px;}
-.icon-book{background-position:-48px -48px;}
-.icon-bookmark{background-position:-72px -48px;}
-.icon-print{background-position:-96px -48px;}
-.icon-camera{background-position:-120px -48px;}
-.icon-font{background-position:-144px -48px;}
-.icon-bold{background-position:-167px -48px;}
-.icon-italic{background-position:-192px -48px;}
-.icon-text-height{background-position:-216px -48px;}
-.icon-text-width{background-position:-240px -48px;}
-.icon-align-left{background-position:-264px -48px;}
-.icon-align-center{background-position:-288px -48px;}
-.icon-align-right{background-position:-312px -48px;}
-.icon-align-justify{background-position:-336px -48px;}
-.icon-list{background-position:-360px -48px;}
-.icon-indent-left{background-position:-384px -48px;}
-.icon-indent-right{background-position:-408px -48px;}
-.icon-facetime-video{background-position:-432px -48px;}
-.icon-picture{background-position:-456px -48px;}
-.icon-pencil{background-position:0 -72px;}
-.icon-map-marker{background-position:-24px -72px;}
-.icon-adjust{background-position:-48px -72px;}
-.icon-tint{background-position:-72px -72px;}
-.icon-edit{background-position:-96px -72px;}
-.icon-share{background-position:-120px -72px;}
-.icon-check{background-position:-144px -72px;}
-.icon-move{background-position:-168px -72px;}
-.icon-step-backward{background-position:-192px -72px;}
-.icon-fast-backward{background-position:-216px -72px;}
-.icon-backward{background-position:-240px -72px;}
-.icon-play{background-position:-264px -72px;}
-.icon-pause{background-position:-288px -72px;}
-.icon-stop{background-position:-312px -72px;}
-.icon-forward{background-position:-336px -72px;}
-.icon-fast-forward{background-position:-360px -72px;}
-.icon-step-forward{background-position:-384px -72px;}
-.icon-eject{background-position:-408px -72px;}
-.icon-chevron-left{background-position:-432px -72px;}
-.icon-chevron-right{background-position:-456px -72px;}
-.icon-plus-sign{background-position:0 -96px;}
-.icon-minus-sign{background-position:-24px -96px;}
-.icon-remove-sign{background-position:-48px -96px;}
-.icon-ok-sign{background-position:-72px -96px;}
-.icon-question-sign{background-position:-96px -96px;}
-.icon-info-sign{background-position:-120px -96px;}
-.icon-screenshot{background-position:-144px -96px;}
-.icon-remove-circle{background-position:-168px -96px;}
-.icon-ok-circle{background-position:-192px -96px;}
-.icon-ban-circle{background-position:-216px -96px;}
-.icon-arrow-left{background-position:-240px -96px;}
-.icon-arrow-right{background-position:-264px -96px;}
-.icon-arrow-up{background-position:-289px -96px;}
-.icon-arrow-down{background-position:-312px -96px;}
-.icon-share-alt{background-position:-336px -96px;}
-.icon-resize-full{background-position:-360px -96px;}
-.icon-resize-small{background-position:-384px -96px;}
-.icon-plus{background-position:-408px -96px;}
-.icon-minus{background-position:-433px -96px;}
-.icon-asterisk{background-position:-456px -96px;}
-.icon-exclamation-sign{background-position:0 -120px;}
-.icon-gift{background-position:-24px -120px;}
-.icon-leaf{background-position:-48px -120px;}
-.icon-fire{background-position:-72px -120px;}
-.icon-eye-open{background-position:-96px -120px;}
-.icon-eye-close{background-position:-120px -120px;}
-.icon-warning-sign{background-position:-144px -120px;}
-.icon-plane{background-position:-168px -120px;}
-.icon-calendar{background-position:-192px -120px;}
-.icon-random{background-position:-216px -120px;width:16px;}
-.icon-comment{background-position:-240px -120px;}
-.icon-magnet{background-position:-264px -120px;}
-.icon-chevron-up{background-position:-288px -120px;}
-.icon-chevron-down{background-position:-313px -119px;}
-.icon-retweet{background-position:-336px -120px;}
-.icon-shopping-cart{background-position:-360px -120px;}
-.icon-folder-close{background-position:-384px -120px;width:16px;}
-.icon-folder-open{background-position:-408px -120px;width:16px;}
-.icon-resize-vertical{background-position:-432px -119px;}
-.icon-resize-horizontal{background-position:-456px -118px;}
-.icon-hdd{background-position:0 -144px;}
-.icon-bullhorn{background-position:-24px -144px;}
-.icon-bell{background-position:-48px -144px;}
-.icon-certificate{background-position:-72px -144px;}
-.icon-thumbs-up{background-position:-96px -144px;}
-.icon-thumbs-down{background-position:-120px -144px;}
-.icon-hand-right{background-position:-144px -144px;}
-.icon-hand-left{background-position:-168px -144px;}
-.icon-hand-up{background-position:-192px -144px;}
-.icon-hand-down{background-position:-216px -144px;}
-.icon-circle-arrow-right{background-position:-240px -144px;}
-.icon-circle-arrow-left{background-position:-264px -144px;}
-.icon-circle-arrow-up{background-position:-288px -144px;}
-.icon-circle-arrow-down{background-position:-312px -144px;}
-.icon-globe{background-position:-336px -144px;}
-.icon-wrench{background-position:-360px -144px;}
-.icon-tasks{background-position:-384px -144px;}
-.icon-filter{background-position:-408px -144px;}
-.icon-briefcase{background-position:-432px -144px;}
-.icon-fullscreen{background-position:-456px -144px;}
-.btn-group{position:relative;display:inline-block;*display:inline;*zoom:1;font-size:0;vertical-align:middle;white-space:nowrap;*margin-left:.3em;}.btn-group:first-child{*margin-left:0;}
-.btn-group+.btn-group{margin-left:5px;}
-.btn-toolbar{font-size:0;margin-top:10px;margin-bottom:10px;}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px;}
-.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
-.btn-group>.btn+.btn{margin-left:-1px;}
-.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px;}
-.btn-group>.btn-mini{font-size:10.5px;}
-.btn-group>.btn-small{font-size:11.9px;}
-.btn-group>.btn-large{font-size:17.5px;}
-.btn-group>.btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
-.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;}
-.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;}
-.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;}
-.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2;}
-.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0;}
-.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);*padding-top:5px;*padding-bottom:5px;}
-.btn-group>.btn-mini+.dropdown-toggle{padding-left:5px;padding-right:5px;*padding-top:2px;*padding-bottom:2px;}
-.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px;}
-.btn-group>.btn-large+.dropdown-toggle{padding-left:12px;padding-right:12px;*padding-top:7px;*padding-bottom:7px;}
-.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);}
-.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6;}
-.btn-group.open .btn-primary.dropdown-toggle{background-color:#0044cc;}
-.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406;}
-.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f;}
-.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351;}
-.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4;}
-.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222222;}
-.btn .caret{margin-top:8px;margin-left:0;}
-.btn-large .caret{margin-top:6px;}
-.btn-large .caret{border-left-width:5px;border-right-width:5px;border-top-width:5px;}
-.btn-mini .caret,.btn-small .caret{margin-top:8px;}
-.dropup .btn-large .caret{border-bottom-width:5px;}
-.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;}
-.btn-group-vertical{display:inline-block;*display:inline;*zoom:1;}
-.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
-.btn-group-vertical>.btn+.btn{margin-left:0;margin-top:-1px;}
-.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}
-.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}
-.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0;}
-.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;}
-.nav{margin-left:0;margin-bottom:20px;list-style:none;}
-.nav>li>a{display:block;}
-.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eeeeee;}
-.nav>li>a>img{max-width:none;}
-.nav>.pull-right{float:right;}
-.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999999;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);text-transform:uppercase;}
-.nav li+.nav-header{margin-top:9px;}
-.nav-list{padding-left:15px;padding-right:15px;margin-bottom:0;}
-.nav-list>li>a,.nav-list .nav-header{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}
-.nav-list>li>a{padding:3px 15px;}
-.nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background-color:#0088cc;}
-.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px;}
-.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;}
-.nav-tabs,.nav-pills{*zoom:1;}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";line-height:0;}
-.nav-tabs:after,.nav-pills:after{clear:both;}
-.nav-tabs>li,.nav-pills>li{float:left;}
-.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px;}
-.nav-tabs{border-bottom:1px solid #ddd;}
-.nav-tabs>li{margin-bottom:-1px;}
-.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eeeeee #eeeeee #dddddd;}
-.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555555;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;}
-.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
-.nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#ffffff;background-color:#0088cc;}
-.nav-stacked>li{float:none;}
-.nav-stacked>li>a{margin-right:0;}
-.nav-tabs.nav-stacked{border-bottom:0;}
-.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
-.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;}
-.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
-.nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{border-color:#ddd;z-index:2;}
-.nav-pills.nav-stacked>li>a{margin-bottom:3px;}
-.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px;}
-.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;}
-.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
-.nav .dropdown-toggle .caret{border-top-color:#0088cc;border-bottom-color:#0088cc;margin-top:6px;}
-.nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#005580;border-bottom-color:#005580;}
-.nav-tabs .dropdown-toggle .caret{margin-top:8px;}
-.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff;}
-.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555555;border-bottom-color:#555555;}
-.nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer;}
-.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#ffffff;background-color:#999999;border-color:#999999;}
-.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;opacity:1;filter:alpha(opacity=100);}
-.tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999999;}
-.tabbable{*zoom:1;}.tabbable:before,.tabbable:after{display:table;content:"";line-height:0;}
-.tabbable:after{clear:both;}
-.tab-content{overflow:auto;}
-.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0;}
-.tab-content>.tab-pane,.pill-content>.pill-pane{display:none;}
-.tab-content>.active,.pill-content>.active{display:block;}
-.tabs-below>.nav-tabs{border-top:1px solid #ddd;}
-.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0;}
-.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-bottom-color:transparent;border-top-color:#ddd;}
-.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd #ddd;}
-.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none;}
-.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px;}
-.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd;}
-.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}
-.tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eeeeee #dddddd #eeeeee #eeeeee;}
-.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#ffffff;}
-.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd;}
-.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
-.tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eeeeee #eeeeee #eeeeee #dddddd;}
-.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#ffffff;}
-.nav>.disabled>a{color:#999999;}
-.nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;background-color:transparent;cursor:default;}
-.navbar{overflow:visible;margin-bottom:20px;*position:relative;*z-index:2;}
-.navbar-inner{min-height:40px;padding-left:20px;padding-right:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top, #ffffff, #f2f2f2);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));background-image:-webkit-linear-gradient(top, #ffffff, #f2f2f2);background-image:-o-linear-gradient(top, #ffffff, #f2f2f2);background-image:linear-gradient(to bottom, #ffffff, #f2f2f2);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);-moz-box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);*zoom:1;}.navbar-inner:before,.navbar-inner:after{display:table;content:"";line-height:0;}
-.navbar-inner:after{clear:both;}
-.navbar .container{width:auto;}
-.nav-collapse.collapse{height:auto;overflow:visible;}
-.navbar .brand{float:left;display:block;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777777;text-shadow:0 1px 0 #ffffff;}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none;}
-.navbar-text{margin-bottom:0;line-height:40px;color:#777777;}
-.navbar-link{color:#777777;}.navbar-link:hover,.navbar-link:focus{color:#333333;}
-.navbar .divider-vertical{height:40px;margin:0 9px;border-left:1px solid #f2f2f2;border-right:1px solid #ffffff;}
-.navbar .btn,.navbar .btn-group{margin-top:5px;}
-.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0;}
-.navbar-form{margin-bottom:0;*zoom:1;}.navbar-form:before,.navbar-form:after{display:table;content:"";line-height:0;}
-.navbar-form:after{clear:both;}
-.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px;}
-.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0;}
-.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px;}
-.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap;}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0;}
-.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0;}.navbar-search .search-query{margin-bottom:0;padding:4px 14px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}
-.navbar-static-top{position:static;margin-bottom:0;}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
-.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0;}
-.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px;}
-.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0;}
-.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
-.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
-.navbar-fixed-top{top:0;}
-.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,.1);box-shadow:0 1px 10px rgba(0,0,0,.1);}
-.navbar-fixed-bottom{bottom:0;}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,.1);box-shadow:0 -1px 10px rgba(0,0,0,.1);}
-.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;}
-.navbar .nav.pull-right{float:right;margin-right:0;}
-.navbar .nav>li{float:left;}
-.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777777;text-decoration:none;text-shadow:0 1px 0 #ffffff;}
-.navbar .nav .dropdown-toggle .caret{margin-top:8px;}
-.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{background-color:transparent;color:#333333;text-decoration:none;}
-.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);-moz-box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);}
-.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#ededed;background-image:-moz-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));background-image:-webkit-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:-o-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:linear-gradient(to bottom, #f2f2f2, #e5e5e5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#e5e5e5;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#ffffff;background-color:#e5e5e5;*background-color:#d9d9d9;}
-.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#cccccc \9;}
-.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);}
-.btn-navbar .icon-bar+.icon-bar{margin-top:3px;}
-.navbar .nav>li>.dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0, 0, 0, 0.2);position:absolute;top:-7px;left:9px;}
-.navbar .nav>li>.dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;position:absolute;top:-6px;left:10px;}
-.navbar-fixed-bottom .nav>li>.dropdown-menu:before{border-top:7px solid #ccc;border-top-color:rgba(0, 0, 0, 0.2);border-bottom:0;bottom:-7px;top:auto;}
-.navbar-fixed-bottom .nav>li>.dropdown-menu:after{border-top:6px solid #ffffff;border-bottom:0;bottom:-6px;top:auto;}
-.navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333333;border-bottom-color:#333333;}
-.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{background-color:#e5e5e5;color:#555555;}
-.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777777;border-bottom-color:#777777;}
-.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555555;border-bottom-color:#555555;}
-.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{left:auto;right:0;}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{left:auto;right:12px;}
-.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{left:auto;right:13px;}
-.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{left:auto;right:100%;margin-left:0;margin-right:-1px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px;}
-.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top, #222222, #111111);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));background-image:-webkit-linear-gradient(top, #222222, #111111);background-image:-o-linear-gradient(top, #222222, #111111);background-image:linear-gradient(to bottom, #222222, #111111);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);border-color:#252525;}
-.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999999;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#ffffff;}
-.navbar-inverse .brand{color:#999999;}
-.navbar-inverse .navbar-text{color:#999999;}
-.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{background-color:transparent;color:#ffffff;}
-.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#ffffff;background-color:#111111;}
-.navbar-inverse .navbar-link{color:#999999;}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#ffffff;}
-.navbar-inverse .divider-vertical{border-left-color:#111111;border-right-color:#222222;}
-.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{background-color:#111111;color:#ffffff;}
-.navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;}
-.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999999;border-bottom-color:#999999;}
-.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;}
-.navbar-inverse .navbar-search .search-query{color:#ffffff;background-color:#515151;border-color:#111111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none;}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#cccccc;}
-.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#cccccc;}
-.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#cccccc;}
-.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333333;text-shadow:0 1px 0 #ffffff;background-color:#ffffff;border:0;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);outline:0;}
-.navbar-inverse .btn-navbar{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e0e0e;background-image:-moz-linear-gradient(top, #151515, #040404);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));background-image:-webkit-linear-gradient(top, #151515, #040404);background-image:-o-linear-gradient(top, #151515, #040404);background-image:linear-gradient(to bottom, #151515, #040404);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);border-color:#040404 #040404 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#040404;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#ffffff;background-color:#040404;*background-color:#000000;}
-.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000000 \9;}
-.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.breadcrumb>li{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 0 #ffffff;}.breadcrumb>li>.divider{padding:0 5px;color:#ccc;}
-.breadcrumb>.active{color:#999999;}
-.pagination{margin:20px 0;}
-.pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);}
-.pagination ul>li{display:inline;}
-.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#ffffff;border:1px solid #dddddd;border-left-width:0;}
-.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5;}
-.pagination ul>.active>a,.pagination ul>.active>span{color:#999999;cursor:default;}
-.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999999;background-color:transparent;cursor:default;}
-.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
-.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;}
-.pagination-centered{text-align:center;}
-.pagination-right{text-align:right;}
-.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px;}
-.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;}
-.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;}
-.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-top-left-radius:3px;-moz-border-radius-topleft:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-bottomleft:3px;border-bottom-left-radius:3px;}
-.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;-moz-border-radius-topright:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-radius-bottomright:3px;border-bottom-right-radius:3px;}
-.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px;}
-.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px;}
-.pager{margin:20px 0;list-style:none;text-align:center;*zoom:1;}.pager:before,.pager:after{display:table;content:"";line-height:0;}
-.pager:after{clear:both;}
-.pager li{display:inline;}
-.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}
-.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5;}
-.pager .next>a,.pager .next>span{float:right;}
-.pager .previous>a,.pager .previous>span{float:left;}
-.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999999;background-color:#fff;cursor:default;}
-.thumbnails{margin-left:-20px;list-style:none;*zoom:1;}.thumbnails:before,.thumbnails:after{display:table;content:"";line-height:0;}
-.thumbnails:after{clear:both;}
-.row-fluid .thumbnails{margin-left:0;}
-.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px;}
-.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;}
-a.thumbnail:hover,a.thumbnail:focus{border-color:#0088cc;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);}
-.thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto;}
-.thumbnail .caption{padding:9px;color:#555555;}
-.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
-.alert,.alert h4{color:#c09853;}
-.alert h4{margin:0;}
-.alert .close{position:relative;top:-2px;right:-21px;line-height:20px;}
-.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847;}
-.alert-success h4{color:#468847;}
-.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48;}
-.alert-danger h4,.alert-error h4{color:#b94a48;}
-.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#3a87ad;}
-.alert-info h4{color:#3a87ad;}
-.alert-block{padding-top:14px;padding-bottom:14px;}
-.alert-block>p,.alert-block>ul{margin-bottom:0;}
-.alert-block p+p{margin-top:5px;}
-@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-o-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));background-image:-webkit-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-o-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:linear-gradient(to bottom, #f5f5f5, #f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
-.progress .bar{width:0%;height:100%;color:#ffffff;float:left;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top, #149bdf, #0480be);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));background-image:-webkit-linear-gradient(top, #149bdf, #0480be);background-image:-o-linear-gradient(top, #149bdf, #0480be);background-image:linear-gradient(to bottom, #149bdf, #0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width 0.6s ease;-moz-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease;}
-.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);}
-.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px;}
-.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite;}
-.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(to bottom, #ee5f5b, #c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0);}
-.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
-.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(to bottom, #62c462, #57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0);}
-.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
-.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(to bottom, #5bc0de, #339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0);}
-.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
-.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(to bottom, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);}
-.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
-.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eeeeee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;color:inherit;letter-spacing:-1px;}
-.hero-unit li{line-height:30px;}
-.media,.media-body{overflow:hidden;*overflow:visible;zoom:1;}
-.media,.media .media{margin-top:15px;}
-.media:first-child{margin-top:0;}
-.media-object{display:block;}
-.media-heading{margin:0 0 5px;}
-.media>.pull-left{margin-right:10px;}
-.media>.pull-right{margin-left:10px;}
-.media-list{margin-left:0;list-style:none;}
-.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0);}.tooltip.in{opacity:0.8;filter:alpha(opacity=80);}
-.tooltip.top{margin-top:-3px;padding:5px 0;}
-.tooltip.right{margin-left:3px;padding:0 5px;}
-.tooltip.bottom{margin-top:3px;padding:5px 0;}
-.tooltip.left{margin-left:-3px;padding:0 5px;}
-.tooltip-inner{max-width:200px;padding:8px;color:#ffffff;text-align:center;text-decoration:none;background-color:#000000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
-.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid;}
-.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000000;}
-.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000000;}
-.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000000;}
-.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000000;}
-.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#ffffff;-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);white-space:normal;}.popover.top{margin-top:-10px;}
-.popover.right{margin-left:10px;}
-.popover.bottom{margin-top:10px;}
-.popover.left{margin-left:-10px;}
-.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0;}.popover-title:empty{display:none;}
-.popover-content{padding:9px 14px;}
-.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid;}
-.popover .arrow{border-width:11px;}
-.popover .arrow:after{border-width:10px;content:"";}
-.popover.top .arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0, 0, 0, 0.25);bottom:-11px;}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#ffffff;}
-.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0, 0, 0, 0.25);}.popover.right .arrow:after{left:1px;bottom:-10px;border-left-width:0;border-right-color:#ffffff;}
-.popover.bottom .arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0, 0, 0, 0.25);top:-11px;}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#ffffff;}
-.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0, 0, 0, 0.25);}.popover.left .arrow:after{right:1px;border-right-width:0;border-left-color:#ffffff;bottom:-10px;}
-.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000;}.modal-backdrop.fade{opacity:0;}
-.modal-backdrop,.modal-backdrop.fade.in{opacity:0.8;filter:alpha(opacity=80);}
-.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;outline:none;}.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;}
-.modal.fade.in{top:10%;}
-.modal-header{padding:9px 15px;border-bottom:1px solid #eee;}.modal-header .close{margin-top:2px;}
-.modal-header h3{margin:0;line-height:30px;}
-.modal-body{position:relative;overflow-y:auto;max-height:400px;padding:15px;}
-.modal-form{margin-bottom:0;}
-.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;*zoom:1;}.modal-footer:before,.modal-footer:after{display:table;content:"";line-height:0;}
-.modal-footer:after{clear:both;}
-.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0;}
-.modal-footer .btn-group .btn+.btn{margin-left:-1px;}
-.modal-footer .btn-block+.btn-block{margin-left:0;}
-.dropup,.dropdown{position:relative;}
-.dropdown-toggle{*margin-bottom:-3px;}
-.dropdown-toggle:active,.open .dropdown-toggle{outline:0;}
-.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000000;border-right:4px solid transparent;border-left:4px solid transparent;content:"";}
-.dropdown .caret{margin-top:8px;margin-left:2px;}
-.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#ffffff;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;}.dropdown-menu.pull-right{right:0;left:auto;}
-.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;}
-.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333333;white-space:nowrap;}
-.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{text-decoration:none;color:#ffffff;background-color:#0081c2;background-image:-moz-linear-gradient(top, #0088cc, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));background-image:-webkit-linear-gradient(top, #0088cc, #0077b3);background-image:-o-linear-gradient(top, #0088cc, #0077b3);background-image:linear-gradient(to bottom, #0088cc, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);}
-.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#ffffff;text-decoration:none;outline:0;background-color:#0081c2;background-image:-moz-linear-gradient(top, #0088cc, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));background-image:-webkit-linear-gradient(top, #0088cc, #0077b3);background-image:-o-linear-gradient(top, #0088cc, #0077b3);background-image:linear-gradient(to bottom, #0088cc, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);}
-.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999999;}
-.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);cursor:default;}
-.open{*z-index:1000;}.open>.dropdown-menu{display:block;}
-.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990;}
-.pull-right>.dropdown-menu{right:0;left:auto;}
-.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000000;content:"";}
-.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px;}
-.dropdown-submenu{position:relative;}
-.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;}
-.dropdown-submenu:hover>.dropdown-menu{display:block;}
-.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0;}
-.dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#cccccc;margin-top:5px;margin-right:-10px;}
-.dropdown-submenu:hover>a:after{border-left-color:#ffffff;}
-.dropdown-submenu.pull-left{float:none;}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px;}
-.dropdown .dropdown-menu .nav-header{padding-left:20px;padding-right:20px;}
-.typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
-.accordion{margin-bottom:20px;}
-.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
-.accordion-heading{border-bottom:0;}
-.accordion-heading .accordion-toggle{display:block;padding:8px 15px;}
-.accordion-toggle{cursor:pointer;}
-.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5;}
-.carousel{position:relative;margin-bottom:20px;line-height:1;}
-.carousel-inner{overflow:hidden;width:100%;position:relative;}
-.carousel-inner>.item{display:none;position:relative;-webkit-transition:0.6s ease-in-out left;-moz-transition:0.6s ease-in-out left;-o-transition:0.6s ease-in-out left;transition:0.6s ease-in-out left;}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;line-height:1;}
-.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block;}
-.carousel-inner>.active{left:0;}
-.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%;}
-.carousel-inner>.next{left:100%;}
-.carousel-inner>.prev{left:-100%;}
-.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0;}
-.carousel-inner>.active.left{left:-100%;}
-.carousel-inner>.active.right{left:100%;}
-.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#ffffff;text-align:center;background:#222222;border:3px solid #ffffff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:0.5;filter:alpha(opacity=50);}.carousel-control.right{left:auto;right:15px;}
-.carousel-control:hover,.carousel-control:focus{color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90);}
-.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none;}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:rgba(255, 255, 255, 0.25);border-radius:5px;}
-.carousel-indicators .active{background-color:#fff;}
-.carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:15px;background:#333333;background:rgba(0, 0, 0, 0.75);}
-.carousel-caption h4,.carousel-caption p{color:#ffffff;line-height:20px;}
-.carousel-caption h4{margin:0 0 5px;}
-.carousel-caption p{margin-bottom:0;}
-.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);}
-.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
-.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
-.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20);}.close:hover,.close:focus{color:#000000;text-decoration:none;cursor:pointer;opacity:0.4;filter:alpha(opacity=40);}
-button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;}
-.pull-right{float:right;}
-.pull-left{float:left;}
-.hide{display:none;}
-.show{display:block;}
-.invisible{visibility:hidden;}
-.affix{position:fixed;}
-.fade{opacity:0;-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;}.fade.in{opacity:1;}
-.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height 0.35s ease;-moz-transition:height 0.35s ease;-o-transition:height 0.35s ease;transition:height 0.35s ease;}.collapse.in{height:auto;}
-@-ms-viewport{width:device-width;}.hidden{display:none;visibility:hidden;}
-.visible-phone{display:none !important;}
-.visible-tablet{display:none !important;}
-.hidden-desktop{display:none !important;}
-.visible-desktop{display:inherit !important;}
-@media (min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit !important;} .visible-desktop{display:none !important ;} .visible-tablet{display:inherit !important;} .hidden-tablet{display:none !important;}}@media (max-width:767px){.hidden-desktop{display:inherit !important;} .visible-desktop{display:none !important;} .visible-phone{display:inherit !important;} .hidden-phone{display:none !important;}}.visible-print{display:none !important;}
-@media print{.visible-print{display:inherit !important;} .hidden-print{display:none !important;}}@media (max-width:767px){body{padding-left:20px;padding-right:20px;} .navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-left:-20px;margin-right:-20px;} .container-fluid{padding:0;} .dl-horizontal dt{float:none;clear:none;width:auto;text-align:left;} .dl-horizontal dd{margin-left:0;} .container{width:auto;} .row-fluid{width:100%;} .row,.thumbnails{margin-left:0;} .thumbnails>li{float:none;margin-left:0;} [class*="span"],.uneditable-input[class*="span"],.row-fluid [class*="span"]{float:none;display:block;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} .span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} .row-fluid [class*="offset"]:first-child{margin-left:0;} .input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} .input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto;} .controls-row [class*="span"]+[class*="span"]{margin-left:0;} .modal{position:fixed;top:20px;left:20px;right:20px;width:auto;margin:0;}.modal.fade{top:-100px;} .modal.fade.in{top:20px;}}@media (max-width:480px){.nav-collapse{-webkit-transform:translate3d(0, 0, 0);} .page-header h1 small{display:block;line-height:20px;} input[type="checkbox"],input[type="radio"]{border:1px solid #ccc;} .form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left;} .form-horizontal .controls{margin-left:0;} .form-horizontal .control-list{padding-top:0;} .form-horizontal .form-actions{padding-left:10px;padding-right:10px;} .media .pull-left,.media .pull-right{float:none;display:block;margin-bottom:10px;} .media-object{margin-right:0;margin-left:0;} .modal{top:10px;left:10px;right:10px;} .modal-header .close{padding:10px;margin:-10px;} .carousel-caption{position:static;}}@media (min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";line-height:0;} .row:after{clear:both;} [class*="span"]{float:left;min-height:1px;margin-left:20px;} .container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px;} .span12{width:724px;} .span11{width:662px;} .span10{width:600px;} .span9{width:538px;} .span8{width:476px;} .span7{width:414px;} .span6{width:352px;} .span5{width:290px;} .span4{width:228px;} .span3{width:166px;} .span2{width:104px;} .span1{width:42px;} .offset12{margin-left:764px;} .offset11{margin-left:702px;} .offset10{margin-left:640px;} .offset9{margin-left:578px;} .offset8{margin-left:516px;} .offset7{margin-left:454px;} .offset6{margin-left:392px;} .offset5{margin-left:330px;} .offset4{margin-left:268px;} .offset3{margin-left:206px;} .offset2{margin-left:144px;} .offset1{margin-left:82px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0;} .row-fluid:after{clear:both;} .row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;} .row-fluid [class*="span"]:first-child{margin-left:0;} .row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.7624309392265194%;} .row-fluid .span12{width:100%;*width:99.94680851063829%;} .row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%;} .row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%;} .row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%;} .row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%;} .row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%;} .row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%;} .row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%;} .row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%;} .row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%;} .row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%;} .row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%;} .row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%;} .row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%;} .row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%;} .row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%;} .row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%;} .row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%;} .row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%;} .row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%;} .row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%;} .row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%;} .row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%;} .row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%;} .row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%;} .row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%;} .row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%;} .row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%;} .row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%;} .row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%;} .row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%;} .row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%;} .row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%;} .row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%;} .row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%;} .row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%;} input,textarea,.uneditable-input{margin-left:0;} .controls-row [class*="span"]+[class*="span"]{margin-left:20px;} input.span12,textarea.span12,.uneditable-input.span12{width:710px;} input.span11,textarea.span11,.uneditable-input.span11{width:648px;} input.span10,textarea.span10,.uneditable-input.span10{width:586px;} input.span9,textarea.span9,.uneditable-input.span9{width:524px;} input.span8,textarea.span8,.uneditable-input.span8{width:462px;} input.span7,textarea.span7,.uneditable-input.span7{width:400px;} input.span6,textarea.span6,.uneditable-input.span6{width:338px;} input.span5,textarea.span5,.uneditable-input.span5{width:276px;} input.span4,textarea.span4,.uneditable-input.span4{width:214px;} input.span3,textarea.span3,.uneditable-input.span3{width:152px;} input.span2,textarea.span2,.uneditable-input.span2{width:90px;} input.span1,textarea.span1,.uneditable-input.span1{width:28px;}}@media (min-width:1200px){.row{margin-left:-30px;*zoom:1;}.row:before,.row:after{display:table;content:"";line-height:0;} .row:after{clear:both;} [class*="span"]{float:left;min-height:1px;margin-left:30px;} .container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px;} .span12{width:1170px;} .span11{width:1070px;} .span10{width:970px;} .span9{width:870px;} .span8{width:770px;} .span7{width:670px;} .span6{width:570px;} .span5{width:470px;} .span4{width:370px;} .span3{width:270px;} .span2{width:170px;} .span1{width:70px;} .offset12{margin-left:1230px;} .offset11{margin-left:1130px;} .offset10{margin-left:1030px;} .offset9{margin-left:930px;} .offset8{margin-left:830px;} .offset7{margin-left:730px;} .offset6{margin-left:630px;} .offset5{margin-left:530px;} .offset4{margin-left:430px;} .offset3{margin-left:330px;} .offset2{margin-left:230px;} .offset1{margin-left:130px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0;} .row-fluid:after{clear:both;} .row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;} .row-fluid [class*="span"]:first-child{margin-left:0;} .row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.564102564102564%;} .row-fluid .span12{width:100%;*width:99.94680851063829%;} .row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%;} .row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%;} .row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%;} .row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%;} .row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%;} .row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%;} .row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%;} .row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%;} .row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%;} .row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%;} .row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%;} .row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%;} .row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%;} .row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%;} .row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%;} .row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%;} .row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%;} .row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%;} .row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%;} .row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%;} .row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%;} .row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%;} .row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%;} .row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%;} .row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%;} .row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%;} .row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%;} .row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%;} .row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%;} .row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%;} .row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%;} .row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%;} .row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%;} .row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%;} .row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%;} input,textarea,.uneditable-input{margin-left:0;} .controls-row [class*="span"]+[class*="span"]{margin-left:30px;} input.span12,textarea.span12,.uneditable-input.span12{width:1156px;} input.span11,textarea.span11,.uneditable-input.span11{width:1056px;} input.span10,textarea.span10,.uneditable-input.span10{width:956px;} input.span9,textarea.span9,.uneditable-input.span9{width:856px;} input.span8,textarea.span8,.uneditable-input.span8{width:756px;} input.span7,textarea.span7,.uneditable-input.span7{width:656px;} input.span6,textarea.span6,.uneditable-input.span6{width:556px;} input.span5,textarea.span5,.uneditable-input.span5{width:456px;} input.span4,textarea.span4,.uneditable-input.span4{width:356px;} input.span3,textarea.span3,.uneditable-input.span3{width:256px;} input.span2,textarea.span2,.uneditable-input.span2{width:156px;} input.span1,textarea.span1,.uneditable-input.span1{width:56px;} .thumbnails{margin-left:-30px;} .thumbnails>li{margin-left:30px;} .row-fluid .thumbnails{margin-left:0;}}@media (max-width:979px){body{padding-top:0;} .navbar-fixed-top,.navbar-fixed-bottom{position:static;} .navbar-fixed-top{margin-bottom:20px;} .navbar-fixed-bottom{margin-top:20px;} .navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px;} .navbar .container{width:auto;padding:0;} .navbar .brand{padding-left:10px;padding-right:10px;margin:0 0 0 -5px;} .nav-collapse{clear:both;} .nav-collapse .nav{float:none;margin:0 0 10px;} .nav-collapse .nav>li{float:none;} .nav-collapse .nav>li>a{margin-bottom:2px;} .nav-collapse .nav>.divider-vertical{display:none;} .nav-collapse .nav .nav-header{color:#777777;text-shadow:none;} .nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} .nav-collapse .dropdown-menu li+li a{margin-bottom:2px;} .nav-collapse .nav>li>a:hover,.nav-collapse .nav>li>a:focus,.nav-collapse .dropdown-menu a:hover,.nav-collapse .dropdown-menu a:focus{background-color:#f2f2f2;} .navbar-inverse .nav-collapse .nav>li>a,.navbar-inverse .nav-collapse .dropdown-menu a{color:#999999;} .navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .nav>li>a:focus,.navbar-inverse .nav-collapse .dropdown-menu a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:focus{background-color:#111111;} .nav-collapse.in .btn-group{margin-top:5px;padding:0;} .nav-collapse .dropdown-menu{position:static;top:auto;left:auto;float:none;display:none;max-width:none;margin:0 15px;padding:0;background-color:transparent;border:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} .nav-collapse .open>.dropdown-menu{display:block;} .nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none;} .nav-collapse .dropdown-menu .divider{display:none;} .nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none;} .nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);} .navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111111;border-bottom-color:#111111;} .navbar .nav-collapse .nav.pull-right{float:none;margin-left:0;} .nav-collapse,.nav-collapse.collapse{overflow:hidden;height:0;} .navbar .btn-navbar{display:block;} .navbar-static .navbar-inner{padding-left:10px;padding-right:10px;}}@media (min-width:980px){.nav-collapse.collapse{height:auto !important;overflow:visible !important;}}
Modified: trunk/pollen-ui-js/src/main/webapp/css/style.css
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/css/style.css 2013-06-18 16:48:04 UTC (rev 3836)
+++ trunk/pollen-ui-js/src/main/webapp/css/style.css 2013-06-19 17:50:01 UTC (rev 3837)
@@ -1,3 +1,23 @@
+.dropdown-menu.form {
+ padding: 0;
+ padding-top: 15px;
+}
+
+.dropdown-menu.form > form {
+ margin: 0;
+}
+
+.dropdown-menu.form .form-actions {
+ padding: 15px 20px 20px;
+ margin-bottom: 0;
+ border-radius: 0 0 6px 6px;
+}
+
+.dropdown-menu.form .control-group {
+ padding: 0 15px;
+ margin-bottom: 5px;
+}
+
.noListStyle {
list-style-type: none;
}
Modified: trunk/pollen-ui-js/src/main/webapp/index.html
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/index.html 2013-06-18 16:48:04 UTC (rev 3836)
+++ trunk/pollen-ui-js/src/main/webapp/index.html 2013-06-19 17:50:01 UTC (rev 3837)
@@ -20,6 +20,7 @@
<!--Body content-->
<div id="pollForm"></div>
+ <div id="pollList"></div>
<div id="pollSummary"></div>
<div id="vote"></div>
<div id="userForm"></div>
@@ -29,13 +30,22 @@
<script src="pollen-ui-js.js"></script>
<script src="js/libs/jquery.scrollto.js"></script>
+ <script type="text/javascript">
+ var backendUrl = 'http://localhost:8080/pollen-rest-api/v1';
+ </script>
+
<script src="js/models/polls.js"></script>
<script src="js/models/comments.js"></script>
<script src="js/models/votes.js"></script>
<script src="js/models/users.js"></script>
+ <script type="text/javascript">
+ var currentUser = new User(JSON.parse(window.localStorage.getItem('currentUser')));
+ </script>
+
<script src="js/controls/menu.js"></script>
<script src="js/controls/poll_form.js"></script>
+ <script src="js/controls/poll_list.js"></script>
<script src="js/controls/poll_summary.js"></script>
<script src="js/controls/vote.js"></script>
<script src="js/controls/user_form.js"></script>
@@ -52,7 +62,8 @@
var menu = new Menu('#menu');
- var pf = new PollForm('#pollForm');
+ var pollForm = new PollForm('#pollForm');
+ var pollList = new PollList('#pollList');
var summary = new PollSummary('#pollSummary');
var vote = new PollVote('#vote');
var userForm = new UserForm('#userForm');
Modified: trunk/pollen-ui-js/src/main/webapp/js/controls/menu.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/controls/menu.js 2013-06-18 16:48:04 UTC (rev 3836)
+++ trunk/pollen-ui-js/src/main/webapp/js/controls/menu.js 2013-06-19 17:50:01 UTC (rev 3837)
@@ -1,5 +1,28 @@
var Menu = can.Control({
init: function() {
- this.element.html(can.view('views/menu.ejs'));
+ this.element.html(can.view('views/menu.ejs', {currentUser: currentUser}));
},
+
+ '#loginForm submit': function(form) {
+ can.ajax({
+ url: backendUrl + '/login',
+ data: {
+ login: form.find('[name="login"]').val(),
+ password: form.find('[name="password"]').val()
+ },
+ type: "PUT",
+ success: function(user) {
+ form[0].reset();
+ form.parents(".dropdown.open").removeClass("open");
+ currentUser.attr(user, true);
+ window.localStorage.setItem('currentUser', JSON.stringify(currentUser._data));
+ }
+ });
+ return false;
+ },
+
+ '#menuItemLogout click': function() {
+ currentUser.attr(new User(), true);
+ window.localStorage.set('currentUser', currentUser._data);
+ }
});
\ No newline at end of file
Modified: trunk/pollen-ui-js/src/main/webapp/js/controls/poll_form.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/controls/poll_form.js 2013-06-18 16:48:04 UTC (rev 3836)
+++ trunk/pollen-ui-js/src/main/webapp/js/controls/poll_form.js 2013-06-19 17:50:01 UTC (rev 3837)
@@ -14,7 +14,7 @@
},
':type/:action route': function(data) {
- if (data.type === "poll" && data.action === "edit") {
+ if (data.type === "poll" && data.action === "create") {
this.editPoll(new Poll());
}
},
@@ -29,14 +29,6 @@
}
},
- '.create click': function() {
- can.route.attr({ type: "poll", action: "edit" }, true);
- },
-
- '[data-id] click': function(el, ev) {
- can.route.attr({ type: "poll", action: "edit", id: el.data('id') });
- },
-
'#pollCreationForm submit': function(form) {
var values = can.deparam(form.serialize()),
self = this;
@@ -52,19 +44,9 @@
},
editPoll: function(poll) {
- this.options.poll = poll;
- this.on();
- this.refreshForm();
+ this.options.poll.attr(poll._data, true);
this.element.siblings().hide();
this.element.show();
- },
-
- refreshForm: function() {
- var form = this.element.find('form');
- form[0].reset();
- for (var k in this.options.poll._data) {
- form.find("[name=" + k + "]").val(this.options.poll[k]);
- }
}
});
\ No newline at end of file
Added: trunk/pollen-ui-js/src/main/webapp/js/controls/poll_list.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/controls/poll_list.js (rev 0)
+++ trunk/pollen-ui-js/src/main/webapp/js/controls/poll_list.js 2013-06-19 17:50:01 UTC (rev 3837)
@@ -0,0 +1,31 @@
+var PollList = can.Control({
+
+ defaults: {
+ polls: new Poll.List()
+ }
+
+}, {
+
+ init: function() {
+ this.element.html(can.view('views/poll_list.ejs', {
+ polls: this.options.polls
+ }));
+ },
+
+ ':type/:action route': function(data) {
+ if (data.type === "polls") {
+ var self = this;
+ $.when(Poll.findAll()).then(
+ function(polls) {
+ self.updatePolls(polls);
+ });
+ }
+ },
+
+ updatePolls: function(polls) {
+ this.options.polls.replace(polls);
+ this.element.siblings().hide();
+ this.element.show();
+ }
+
+});
\ No newline at end of file
Modified: trunk/pollen-ui-js/src/main/webapp/js/controls/poll_summary.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/controls/poll_summary.js 2013-06-18 16:48:04 UTC (rev 3836)
+++ trunk/pollen-ui-js/src/main/webapp/js/controls/poll_summary.js 2013-06-19 17:50:01 UTC (rev 3837)
@@ -1,20 +1,31 @@
var PollSummary = can.Control({
+ defaults: {
+ poll: new Poll()
+ }
+
+}, {
+
+ init: function() {
+
+ this.element.html(can.view('views/summary.ejs', {
+ poll: this.options.poll
+ }));
+
+ },
+
':type/:id/:action route': function(data) {
if (data.type === "poll" && data.action === "summary") {
var self = this;
$.when(Poll.findOne({id: data.id})).then(
function(poll) {
- self.showSummary(poll);
+ self.updateSummary(poll);
});
}
},
- showSummary: function(poll) {
- this.options.poll = poll;
- this.element.html(can.view('views/summary.ejs', {
- poll: poll
- }));
+ updateSummary: function(poll) {
+ this.options.poll.attr(poll._data, true);
this.element.siblings().hide();
this.element.show();
}
Modified: trunk/pollen-ui-js/src/main/webapp/js/controls/vote.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/controls/vote.js 2013-06-18 16:48:04 UTC (rev 3836)
+++ trunk/pollen-ui-js/src/main/webapp/js/controls/vote.js 2013-06-19 17:50:01 UTC (rev 3837)
@@ -33,28 +33,37 @@
voteToChoices[choice.id] = { voteValue: voteValue, choice: choice.id };
}
+ var nameInput = form.find("[name='userName']");
var voteAttributes = {
voterListMember: {
- name: form.find("[name='userName']").val()
+ name: nameInput.val()
},
voteToChoices: voteToChoices
};
var vote = new Vote(voteAttributes);
- var self = this;
- var poll = this.options.poll;
- vote.save({ pollId: poll.id }, function(saved) {
- self.options.votes.push(vote);
- for (var choiceId in vote.voteToChoices) {
- if (vote.voteToChoices[choiceId].voteValue) {
- var result = poll.results[choiceId];
- poll.results.attr(choiceId, result + 1);
- }
+ var errors = vote.errors();
+ if (errors != null) {
+ if (errors.voterListMember != null) {
+ nameInput.parents('.control-group').addClass('error');
}
- });
- form[0].reset();
+ } else {
+ var self = this;
+ var poll = this.options.poll;
+ vote.save({ pollId: poll.id }, function(saved) {
+ self.options.votes.push(vote);
+ for (var choiceId in vote.voteToChoices) {
+ if (vote.voteToChoices[choiceId].voteValue) {
+ var result = poll.results[choiceId];
+ poll.results.attr(choiceId, result + 1);
+ }
+ }
+ });
+ form[0].reset();
+ }
+
return false;
},
@@ -135,7 +144,8 @@
this.element.html(can.view('views/vote.ejs', {
poll: poll,
comments: comments,
- votes: votes
+ votes: votes,
+ currentUser: currentUser
}));
this.element.siblings().hide();
this.element.show();
Modified: trunk/pollen-ui-js/src/main/webapp/js/models/comments.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/models/comments.js 2013-06-18 16:48:04 UTC (rev 3836)
+++ trunk/pollen-ui-js/src/main/webapp/js/models/comments.js 2013-06-19 17:50:01 UTC (rev 3837)
@@ -1,48 +1,48 @@
var Comment = can.Model({
- findAll: 'GET /poll/{pollId}/comments',
-// findOne: 'GET /comments/{commentId}',
- create : "POST /polls/{pollId}/comments",
- update : "PUT /comments",
- destroy : "DELETE /comments/{commentId}"
+ findAll : "GET " + backendUrl + "/polls/{pollId}/comments",
+ findOne : "GET " + backendUrl + "/polls/{pollId}/comments/{id}",
+ create : "POST " + backendUrl + "/polls/{pollId}/comments",
+ update : "PUT " + backendUrl + "/polls/{pollId}/comments/{id}",
+ destroy : "DELETE " + backendUrl + "/polls/{pollId}/comments/{id}"
},{});
var COMMENTS = [
[{
text: "This is the end of the world",
author: "Mayan guy",
- postDate: 123456789123456789
+ postDate: moment().subtract('d', 5).valueOf()
},{
text: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.",
author: "Sacha",
- postDate: 999999999999999
+ postDate: moment().subtract('d', 7).valueOf()
}],
[{
text: "azztyuiopfghj",
author: "yyy",
- postDate: 6666666666666
+ postDate: moment().subtract('d', 2).valueOf()
},{
text: "aqwxszedv",
author: "sdsqdqsdqsdqdqsd",
- postDate: 66666666666666
+ postDate: moment().subtract('d', 6).valueOf()
}]
];
-can.fixture('GET /poll/{pollId}/comments', function(orig) {
+can.fixture("GET " + backendUrl + "/polls/{pollId}/comments", function(orig) {
return COMMENTS[orig.data.pollId - 1];
});
var idToInc= 3;
-can.fixture("POST /polls/{pollId}/comments", function() {
+can.fixture("POST " + backendUrl + "/polls/{pollId}/comments", function() {
console.log("create comment " + idToInc);
return {id: (idToInc++)}
});
-can.fixture("PUT /comments", function(orig) {
+can.fixture("PUT " + backendUrl + "/polls/{pollId}/comments/{id}", function(orig) {
console.log("update comment " + orig.data.id);
return {};
});
-can.fixture("DELETE /comments/{commentId}", function(orig){
+can.fixture("DELETE " + backendUrl + "/polls/{pollId}/comments/{id}", function(orig){
console.log("delete comment " + orig.data.commentId);
return {};
});
\ No newline at end of file
Modified: trunk/pollen-ui-js/src/main/webapp/js/models/polls.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/models/polls.js 2013-06-18 16:48:04 UTC (rev 3836)
+++ trunk/pollen-ui-js/src/main/webapp/js/models/polls.js 2013-06-19 17:50:01 UTC (rev 3837)
@@ -1,9 +1,9 @@
var Poll = can.Model({
- findAll: 'GET /polls',
- findOne: "GET /polls/{id}",
- create : "POST /polls",
- update : "PUT /polls/{id}",
- destroy : "DELETE /polls/{id}"
+ findAll : "GET " + backendUrl + "/polls",
+ findOne : "GET " + backendUrl + "/polls/{id}",
+ create : "POST " + backendUrl + "/polls",
+ update : "PUT " + backendUrl + "/polls/{id}",
+ destroy : "DELETE " + backendUrl + "/polls/{id}"
},{});
console.log("load polls")
@@ -52,26 +52,26 @@
},
];
-can.fixture('GET /polls', function(){
+can.fixture("GET " + backendUrl + "/polls", function(){
return POLLS;
});
-can.fixture('GET /polls/{id}', function(orig) {
+can.fixture("GET " + backendUrl + "/polls/{id}", function(orig) {
return POLLS[orig.data.id - 1];
});
var idToInc= 3;
-can.fixture("POST /polls", function() {
+can.fixture("POST " + backendUrl + "/polls", function() {
console.log("create poll " + idToInc);
return {id: (idToInc++)}
});
-can.fixture("PUT /polls/{id}", function(orig) {
+can.fixture("PUT " + backendUrl + "/polls/{id}", function(orig) {
console.log("update poll " + orig.data.id);
return {};
});
-can.fixture("DELETE /polls/{id}", function(orig){
+can.fixture("DELETE " + backendUrl + "/polls/{id}", function(orig){
console.log("delete poll " + orig.data.id);
return {};
});
Modified: trunk/pollen-ui-js/src/main/webapp/js/models/users.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/models/users.js 2013-06-18 16:48:04 UTC (rev 3836)
+++ trunk/pollen-ui-js/src/main/webapp/js/models/users.js 2013-06-19 17:50:01 UTC (rev 3837)
@@ -1,9 +1,8 @@
var User = can.Model({
- findAll: 'GET /users',
- findOne: "GET /users/{id}",
- create : "POST /users",
- update : "PUT /users/{id}",
- destroy : "DELETE /users/{id}",
+ findAll : "GET " + backendUrl + "/users",
+ findOne : "GET " + backendUrl + "/users/{id}",
+ create : "POST " + backendUrl + "/users",
+ update : "PUT " + backendUrl + "/users/{id}",
init: function() {
this.validatePresenceOf(["login", "name", "email", "password", "repeatPassword"],
@@ -46,26 +45,31 @@
},
];
-can.fixture('GET /users', function(){
+can.fixture("GET " + backendUrl + "/users", function(){
return USERS;
});
-can.fixture('GET /users/{id}', function(orig) {
+can.fixture("GET " + backendUrl + "/users/{id}", function(orig) {
return USERS[orig.data.id - 1];
});
var idToInc= 3;
-can.fixture("POST /users", function() {
+can.fixture("POST " + backendUrl + "/users", function() {
console.log("create user " + idToInc);
return {id: (idToInc++)}
});
-can.fixture("PUT /users/{id}", function(orig) {
+can.fixture("PUT " + backendUrl + "/users/{id}", function(orig) {
console.log("update user " + orig.data.id);
return {};
});
-can.fixture("DELETE /users/{id}", function(orig){
- console.log("delete user " + orig.data.id);
+can.fixture("PUT " + backendUrl + "/login", function(orig) {
+ console.log("login user " + orig.data.login);
+ for (var i = 0 ; i < USERS.length ; i++) {
+ if (USERS[i].login == orig.data.login) {
+ return USERS[i];
+ }
+ }
return {};
-});
+});
\ No newline at end of file
Modified: trunk/pollen-ui-js/src/main/webapp/js/models/votes.js
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/js/models/votes.js 2013-06-18 16:48:04 UTC (rev 3836)
+++ trunk/pollen-ui-js/src/main/webapp/js/models/votes.js 2013-06-19 17:50:01 UTC (rev 3837)
@@ -1,9 +1,17 @@
var Vote = can.Model({
- findAll: 'GET /poll/{pollId}/votes',
-// findOne: 'GET /comments/{commentId}',
- create : "POST /poll/{pollId}/votes",
- update : "PUT /votes",
- destroy : "DELETE /votes/{voteId}"
+ findAll : "GET " + backendUrl + "/polls/{pollId}/votes",
+ findOne : "GET " + backendUrl + "/polls/{pollId}/votes/{id}",
+ create : "POST " + backendUrl + "/polls/{pollId}/votes",
+ update : "PUT " + backendUrl + "/polls/{pollId}/votes/{id}",
+ destroy : "DELETE " + backendUrl + "/polls/{pollId}/votes/{id}",
+
+ init: function() {
+ this.validate(["voterListMember"], function(val) {
+ if (!val || !val.name) {
+ return "pollen.validation.required";
+ }
+ });
+ }
},{});
var VOTES = [
@@ -117,22 +125,22 @@
}]
];
-can.fixture('GET /poll/{pollId}/votes', function(orig) {
+can.fixture("GET " + backendUrl + "/polls/{pollId}/votes", function(orig) {
return VOTES[orig.data.pollId - 1];
});
var idToInc= 3;
-can.fixture("POST /polls/{pollId}/votes", function() {
+can.fixture("POST " + backendUrl + "/polls/{pollId}/votes", function() {
console.log("create vote " + idToInc);
return {id: (idToInc++)}
});
-can.fixture("PUT /votes", function(orig) {
+can.fixture("PUT " + backendUrl + "/polls/{pollId}/votes/{id}", function(orig) {
console.log("update vote " + orig.data.id);
return {};
});
-can.fixture("DELETE /votes/{voteId}", function(orig){
+can.fixture("DELETE " + backendUrl + "/polls/{pollId}/votes/{id}", function(orig){
console.log("delete vote " + orig.data.vote);
return {};
});
\ No newline at end of file
Modified: trunk/pollen-ui-js/src/main/webapp/views/menu.ejs
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/views/menu.ejs 2013-06-18 16:48:04 UTC (rev 3836)
+++ trunk/pollen-ui-js/src/main/webapp/views/menu.ejs 2013-06-19 17:50:01 UTC (rev 3837)
@@ -2,12 +2,68 @@
<ul class="nav">
<li><%== can.route.link(pollen.menu.home, {}) %></li>
<li class="dropdown">
- <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown"><%= pollen.menu.polls %> <b class="caret"></b></a>
+ <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
+ <%= pollen.menu.polls.label %> <strong class="caret"></strong>
+ </a>
<ul class="dropdown-menu" role="menu">
- <li role="presentation"><%== can.route.link(pollen.menu.polls, { type: 'poll', action: 'edit' }, { role: 'menuitem', tabIndex: "-1" }, false) %></li>
+ <li role="presentation">
+ <%== can.route.link(pollen.menu.polls.create, { type: 'poll', action: 'create' }, { role: 'menuitem', tabIndex: "-1" }, false) %>
+ </li>
+ <% if (currentUser.attr('login')) { %>
+ <li class="divider" role="presentation"></li>
+ <li role="presentation">
+ <%== can.route.link(pollen.menu.polls.list, { type: 'polls', action: 'created' }, { role: 'menuitem', tabIndex: "-1" }, false) %>
+ </li>
+ <% } %>
</ul>
</li>
</ul>
+
<ul class="nav pull-right">
-<li><%== can.route.link(pollen.menu.register, { type: 'user', action: 'registration' }) %></li>
+ <% if (!currentUser.attr('login')) { %>
+ <li><%== can.route.link(pollen.menu.register, { type: 'user', action: 'registration' }) %></li>
+ <li class="divider-vertical"></li>
+ <li class="dropdown">
+ <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
+ <%= pollen.menu.login.label %> <strong class="caret"></strong>
+ </a>
+ <div class="dropdown-menu form" role="menu">
+ <form id='loginForm'>
+ <div class="control-group">
+ <label class="control-label"><%= pollen.menu.login.form.login.label %></label>
+ <input type="text" name='login' placeholder="<%= pollen.menu.login.form.login.placeholder %>"/>
+ <span class="help-block hide"></span>
+ </div>
+ <div class="control-group">
+ <label class="control-label" ><%= pollen.menu.login.form.password.label %></label>
+ <input type="password" name='password' placeholder="<%= pollen.menu.login.form.password.placeholder %>"/>
+ <span class="help-block hide"></span>
+ </div>
+ <div class="control-group">
+ <label class="control-label checkbox" >
+ <input type="checkbox" name='rememberMe'> <%= pollen.menu.login.form.rememberMe.label %>
+ </label>
+ </div>
+ <div class="form-actions">
+ <button type="submit" class="btn btn-primary"><%= pollen.menu.login.form.button %></button>
+ </div>
+ </form>
+ </div>
+ </li>
+ <% } else { %>
+ <li class="dropdown">
+ <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
+ <%= currentUser.attr('name') %> <strong class="caret"></strong>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li role="presentation">
+ <%== can.route.link(pollen.menu.user.profile, { type: 'user', action: 'edit', id: currentUser.attr('id') }) %>
+ </li>
+ <li class="divider" role="presentation"></li>
+ <li role="presentation">
+ <a id='menuItemLogout'><%= pollen.menu.logout %></a>
+ </li>
+ </ul>
+ </li>
+ <% } %>
</ul>
\ No newline at end of file
Modified: trunk/pollen-ui-js/src/main/webapp/views/poll_form.ejs
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/views/poll_form.ejs 2013-06-18 16:48:04 UTC (rev 3836)
+++ trunk/pollen-ui-js/src/main/webapp/views/poll_form.ejs 2013-06-19 17:50:01 UTC (rev 3837)
@@ -5,26 +5,23 @@
<div class="control-group">
<label class="control-label" for="pollCreationFormTitle"><%= pollen.poll.title.label %></label>
<div class="controls">
- <input type='text' name='title' id='pollCreationFormTitle' placeholder='<%= pollen.poll.title.placeholder %>'
- <%= poll.attr("title") ? "value='" + poll.attr("title") + "'" : "class='empty'" %>/>
+ <input type='text' name='title' id='pollCreationFormTitle'
+ placeholder='<%= pollen.poll.title.placeholder %>'
+ value='<%= poll.attr("title")%>'/>
</div>
</div>
<div class="control-group">
<label class="control-label" for='pollCreationFormDescription'><%= pollen.poll.description.label %></label>
<div class="controls">
- <textarea id='pollCreationFormDescription' name='description' placeholder="<%= pollen.poll.description.placeholder %>"
- <% if (!poll.attr("description")) {%>
- class='empty'
- <% } %>><%= poll.attr('description') %></textarea>
+ <textarea id='pollCreationFormDescription'
+ name='description'
+ placeholder="<%= pollen.poll.description.placeholder %>"><%= poll.attr('description') %></textarea>
</div>
</div>
<div class="form-actions">
<button type='submit' class="btn btn-primary"><%= pollen.poll.form.create.button.save %></button>
- <a href="javascript://" class="btn btn-primary create">New poll</a>
- <a href="javascript://" data-id="1" class="btn btn">Edit poll 1</a>
- <a href="javascript://" data-id="2" class="btn btn">Edit poll 2</a>
</div>
</form>
\ No newline at end of file
Added: trunk/pollen-ui-js/src/main/webapp/views/poll_list.ejs
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/views/poll_list.ejs (rev 0)
+++ trunk/pollen-ui-js/src/main/webapp/views/poll_list.ejs 2013-06-19 17:50:01 UTC (rev 3837)
@@ -0,0 +1,7 @@
+<h1><%= $.i18n.prop("pollen.polls." + can.route.attr('action') + ".title") %></h1>
+
+<% polls.each(function(poll) { %>
+<div>
+ <%== can.route.link(poll.attr('title'), {type: 'poll', action: 'summary', id: poll.attr('id')}) %>
+</div>
+<% }); %>
\ No newline at end of file
Modified: trunk/pollen-ui-js/src/main/webapp/views/summary.ejs
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/views/summary.ejs 2013-06-18 16:48:04 UTC (rev 3836)
+++ trunk/pollen-ui-js/src/main/webapp/views/summary.ejs 2013-06-19 17:50:01 UTC (rev 3837)
@@ -1,9 +1,9 @@
-<h1><%= pollen.poll.summary.title(poll.title) %></h1>
+<h1><%= pollen.poll.summary.title(poll.attr('title')) %></h1>
<div class="control-group">
<label class="control-label" for='pollSummaryLink'><%= pollen.poll.summary.linkToVote %></label>
- <input type='url' id='pollSummaryLink' value="<%== window.location.href.split('#')[0] + can.route.url({ type: 'poll', action: 'vote', id: poll.id }) %>"/>
- <%== can.route.link('<i class="icon-link bigger link"></i>', {type: 'poll', action: 'vote', id: poll.id}) %>
+ <input type='url' id='pollSummaryLink' value="<%== window.location.href.split('#')[0] + can.route.url({ type: 'poll', action: 'vote', id: poll.attr('id') }) %>"/>
+ <%== can.route.link('<i class="icon-link bigger link"></i>', {type: 'poll', action: 'vote', id: poll.attr('id')}) %>
</div>
<div class='row-fluid'>
Modified: trunk/pollen-ui-js/src/main/webapp/views/vote.ejs
===================================================================
--- trunk/pollen-ui-js/src/main/webapp/views/vote.ejs 2013-06-18 16:48:04 UTC (rev 3836)
+++ trunk/pollen-ui-js/src/main/webapp/views/vote.ejs 2013-06-19 17:50:01 UTC (rev 3837)
@@ -10,7 +10,7 @@
| <a id="commentSummary" class='link'><i class='icon-comment'></i> <%= comments.attr('length') %></a>
<!-- poll dates -->
<% if (poll.attr('beginDate') && poll.attr('endDate')) { %>
- | <i class='icon-time'></i> <%= pollen.common.date.fromTo(moment(poll.attr('beginDate')).format(pollen.common.format.date), moment(poll.attr('endDate')).toString(pollen.common.format.date)) %>
+ | <i class='icon-time'></i> <%= pollen.common.date.fromTo(moment(poll.attr('beginDate')).format(pollen.common.format.date), moment(poll.attr('endDate')).format(pollen.common.format.date)) %>
<% } else if (poll.attr('beginDate')) { %>
| <i class='icon-time'></i> <%= pollen.common.date.from(moment(poll.attr('beginDate')).format(pollen.common.format.date)) %>
<% } else if (poll.attr('endDate')) { %>
@@ -119,7 +119,17 @@
<% if (!poll.attr('closed')) { %>
<tr>
- <td><input name="userName" type='text' placeholder='<%= pollen.vote.form.add.field.userName.placeholder %>'/></td>
+ <td>
+ <div class="control-group">
+ <div class="controls">
+ <input name="userName"
+ type='text'
+ value='<%= currentUser.attr("name") %>'
+ placeholder='<%= pollen.vote.form.add.field.userName.placeholder %>'
+ required/>
+ </div>
+ </div>
+ </td>
<%poll.choices.each(function(choice, i) { %>
<td><input name="<%= i %>" type='checkbox'/></td>
<% }); %>
@@ -172,7 +182,7 @@
<%= comment.attr('text') %>
</p>
<div class='footer'>
- <small><%= comment.attr('author') %> | <%= new Date(comment.attr('postDate')).toString(pollen.common.format.dateTime) %></small>
+ <small><%= comment.attr('author') %> | <%= moment(comment.attr('postDate')).format(pollen.common.format.dateTime) %></small>
</div>
</div>
1
0