r3519 - in trunk/pollen-ui-struts2/src/main: java/org/chorem/pollen/ui/actions/json java/org/chorem/pollen/ui/actions/poll resources resources/config resources/i18n webapp/WEB-INF/decorators webapp/WEB-INF/jsp webapp/WEB-INF/jsp/admin webapp/WEB-INF/jsp/poll webapp/WEB-INF/jsp/security webapp/WEB-INF/jsp/user webapp/css webapp/js
Author: tchemit Date: 2012-06-19 10:18:29 +0200 (Tue, 19 Jun 2012) New Revision: 3519 Url: http://chorem.org/repositories/revision/pollen/3519 Log: - refs #562: improve choice layout - reformat jsp - do not use jstl anyway in jsp (prefer use struts) Added: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollForm.jsp Removed: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/adminRequired.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/create.jsp Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractPollForm.java trunk/pollen-ui-struts2/src/main/resources/config/struts-poll.xml trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties trunk/pollen-ui-struts2/src/main/resources/struts.xml trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/admin/pollsList.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/admin/usersList.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/home.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/createPoll_choices.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayDateChoice.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayImageChoice.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayPersonToList.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayPollComment.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayPollComments.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayTextChoice.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayVotingList.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayVotingListPersons.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/summary.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/pollListHelper.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/security/connected_required.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/createdList.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/dialogLostPassword.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/edit.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/favoriteList.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/favoriteLists.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/invitedList.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/login.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/participatedList.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/register.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/show.jsp trunk/pollen-ui-struts2/src/main/webapp/css/pollCreation.css trunk/pollen-ui-struts2/src/main/webapp/css/summary.css trunk/pollen-ui-struts2/src/main/webapp/js/createPoll.js trunk/pollen-ui-struts2/src/main/webapp/js/favoriteList.js Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java =================================================================== --- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java 2012-06-19 08:18:29 UTC (rev 3519) @@ -30,7 +30,6 @@ import java.util.List; import java.util.Map; -import java.util.Set; /** * Obtain paginated users. @@ -84,28 +83,11 @@ Map<String, Object> map = pollService.pollToMap(poll, binder); map.put("adminId", poll.getAdminId()); - - Set<String> functions = getPollFunctions(poll); - map.put("functions", functions); + map.put("functions", Sets.newHashSet("summary")); polls[index++] = map; } return SUCCESS; } - protected Set<String> getPollFunctions(Poll poll) { - Set<String> result = Sets.newHashSet(); - result.add("summary"); -// result.add("result"); -// if (!poll.isClosed()) { -// -// // poll is not closed -// result.add("edit"); -// result.add("close"); -// } -// result.add("export"); -// result.add("clone"); - result.add("delete"); - return result; - } } Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractPollForm.java =================================================================== --- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractPollForm.java 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractPollForm.java 2012-06-19 08:18:29 UTC (rev 3519) @@ -181,6 +181,13 @@ private Map<Integer, Choice> choices; /** + * Contains the order of choices (given by the xxx.order field. + * + * @since 1.4 + */ + private Map<Integer, Integer> choicesOrder; + + /** * Indexed voting lists retreive from parameters for the pollType selected * in form. (Other voting lists are lost). * @@ -250,6 +257,8 @@ ChoiceType pollChoiceType = ChoiceType.valueOf(choiceTypeParam); poll.setChoiceType(pollChoiceType); + choicesOrder = Maps.newTreeMap(); + // build poll choices switch (pollChoiceType) { @@ -1356,20 +1365,26 @@ // can keep this none empty text choice name Integer choiceNumber = Integer.valueOf(matcher.group(1)); + if (choiceNumber > maxNumber) { maxNumber = choiceNumber; } + String choicePrefix = fieldPrefix + choiceNumber; Choice choice = createChoice(new ChoiceImpl(), - fieldPrefix + choiceNumber, + choicePrefix, paramValue); if (!isTextChoiceEmpty(choice)) { // This is not an empty choice keep it result.put(choiceNumber, choice); + + // keep order + int order = getIntegerValue(choicePrefix + ".order"); + choicesOrder.put(order, choiceNumber); } } } - result = reindexMap(result, maxNumber); + result = reindexChoiceMap(result, maxNumber); int size = result.size(); if (log.isInfoEnabled()) { @@ -1400,10 +1415,10 @@ if (choiceNumber > maxNumber) { maxNumber = choiceNumber; } - String choiceFieldPrefix = fieldPrefix + choiceNumber; + String choicePrefix = fieldPrefix + choiceNumber; PollDateChoice choice = createChoice(new PollDateChoice(), - choiceFieldPrefix, + choicePrefix, paramValue); if (StringUtils.isNotBlank(paramValue)) { Date date = DateConverter.convertFromString(paramValue); @@ -1414,10 +1429,14 @@ // This is not an empty choice keep it result.put(choiceNumber, choice); + + // keep order + int order = getIntegerValue(choicePrefix + ".order"); + choicesOrder.put(order, choiceNumber); } } } - result = reindexMap(result, maxNumber); + result = reindexChoiceMap(result, maxNumber); int size = result.size(); if (log.isInfoEnabled()) { @@ -1451,13 +1470,13 @@ maxNumber = choiceNumber; } - String choiceFieldPrefix = fieldPrefix + choiceNumber; + String choicePrefix = fieldPrefix + choiceNumber; PollImageChoice choice = createChoice(new PollImageChoice(), - choiceFieldPrefix, + choicePrefix, null); String location = getNonEmptyParameterValue( - choiceFieldPrefix + ".newLocation"); + choicePrefix + ".newLocation"); if (StringUtils.isNotBlank(location)) { // found a real upload file (not jus the location of an @@ -1466,24 +1485,24 @@ // ok so now use also newName String paramValue = getNonEmptyParameterValue( - choiceFieldPrefix + ".newName"); + choicePrefix + ".newName"); choice.setName(paramValue); - parametersToSwitch.put(choiceFieldPrefix + ".newLocation", - choiceFieldPrefix + ".location"); + parametersToSwitch.put(choicePrefix + ".newLocation", + choicePrefix + ".location"); - parametersToSwitch.put(choiceFieldPrefix + ".newName", - choiceFieldPrefix + ".name"); + parametersToSwitch.put(choicePrefix + ".newName", + choicePrefix + ".name"); } else { // try with old location location = getNonEmptyParameterValue( - choiceFieldPrefix + ".location"); + choicePrefix + ".location"); choice.setLocation(location); String paramValue = getNonEmptyParameterValue( - choiceFieldPrefix + ".name"); + choicePrefix + ".name"); choice.setName(paramValue); } @@ -1491,6 +1510,10 @@ // This is not an empty choice keep it result.put(choiceNumber, choice); + + // keep order + int order = getIntegerValue(choicePrefix + ".order"); + choicesOrder.put(order, choiceNumber); } } } @@ -1502,7 +1525,7 @@ String[] valueToSwitch = parameters.remove(paramNameSource); parameters.put(paramNameTarget, valueToSwitch); } - result = reindexMap(result, maxNumber); + result = reindexChoiceMap(result, maxNumber); int size = result.size(); if (log.isInfoEnabled()) { log.info("nbImageChoices (from request) = " + size); @@ -1590,6 +1613,24 @@ return result; } + private int getIntegerValue(String parameterName) { + String parameterValue = getNonEmptyParameterValue(parameterName); + int result = 0; + if (StringUtils.isNotEmpty(parameterValue)) { + + try { + result = Integer.valueOf(parameterValue); + } catch (NumberFormatException e) { + //bad conversion, will be treated later + if (log.isDebugEnabled()) { + log.debug("Bad double conversion from param [" + + parameterName + "] : " + parameterValue); + } + } + } + return result; + } + private int buildVotingList(String votingListParameterName, String votingListPrefix, int votingListNumber, @@ -1737,6 +1778,40 @@ return result2; } + protected <T> Map<Integer, T> reindexChoiceMap(Map<Integer, T> result, int maxNumber) { + Map<Integer, T> result2 = Maps.newTreeMap(); + + for (Integer choiceOrder : choicesOrder.keySet()) { + Integer choiceNumber = choicesOrder.get(choiceOrder); + T choice = result.get(choiceNumber ); + if (choice != null) { + result2.put(choiceOrder, choice); + } + } + +// if (maxNumber != result.size() - 1) { +// +// // means there is a hole inside the result (a empty choice was +// // submitted) +// +// // le'ts remove this +// List<Integer> numbers = Lists.newArrayList(result.keySet()); +// +// Collections.sort(numbers); +// +// result2 = Maps.newTreeMap(); +// int i = 0; +// for (Integer number : numbers) { +// T choice = result.get(number); +// result2.put(i++, choice); +// } +// } else { +// result2 = result; +// } + return result2; + } + + protected String getNonEmptyParameterValue(String paramName) { String[] paramValues = parameters.get(paramName); String result = null; Modified: trunk/pollen-ui-struts2/src/main/resources/config/struts-poll.xml =================================================================== --- trunk/pollen-ui-struts2/src/main/resources/config/struts-poll.xml 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/resources/config/struts-poll.xml 2012-06-19 08:18:29 UTC (rev 3519) @@ -37,46 +37,37 @@ <param name="actionName">votefor/${uriId}</param> </result-type> + <result-type name="redirectToSummary" + class="org.chorem.pollen.ui.results.PollenServletActionRedirectResult"> + <param name="namespace">/poll</param> + <param name="actionName">summary/${uriId}</param> + </result-type> + </result-types> <!-- create poll --> <action name="create" class="org.chorem.pollen.ui.actions.poll.CreatePoll" method="execute"> - <result name="input">/WEB-INF/jsp/poll/create.jsp</result> - <result type="pollenRedirectAction"> - <param name="namespace">/poll</param> - <param name="actionName">summary/${uriId}</param> - </result> + <result name="input">/WEB-INF/jsp/poll/pollForm.jsp</result> + <result type="redirectToSummary"/> </action> <!-- edit poll --> <action name="edit/*" class="org.chorem.pollen.ui.actions.poll.EditPoll" method="execute"> <param name="uriId">{1}</param> - <result name="input">/WEB-INF/jsp/poll/create.jsp</result> - <result type="pollenRedirectAction"> - <param name="namespace">/poll</param> - <param name="actionName">summary/${uriId}</param> - </result> + <result name="input">/WEB-INF/jsp/poll/pollForm.jsp</result> + <result type="redirectToSummary"/> </action> <!-- clone poll --> <action name="clone/*" class="org.chorem.pollen.ui.actions.poll.ClonePoll" method="execute"> <param name="uriId">{1}</param> - <result name="input">/WEB-INF/jsp/poll/create.jsp</result> - <result type="pollenRedirectAction"> - <param name="namespace">/poll</param> - <param name="actionName">summary/${uriId}</param> - </result> + <result name="input">/WEB-INF/jsp/poll/pollForm.jsp</result> + <result type="redirectToSummary"/> </action> - <!-- display * --> - <action name="display*" - class="org.chorem.pollen.ui.actions.poll.Display{1}"> - <result>/WEB-INF/jsp/poll/display{1}.jsp</result> - </action> - <!-- resume poll --> <action name="summary/*" method="execute" class="org.chorem.pollen.ui.actions.poll.SummaryPoll"> @@ -126,19 +117,6 @@ <result type="redirect2"/> </action> - <!-- display poll result --> - <action name="results/*" method="execute" - class="org.chorem.pollen.ui.actions.poll.ResultForPoll"> - <param name="uriId">{1}</param> - <result>/WEB-INF/jsp/poll/result.jsp</result> - </action> - - <!-- confirm delete comment --> - <action name="confirmDeleteComment" - class="org.chorem.pollen.ui.actions.poll.ConfirmDeleteComment"> - <result>/WEB-INF/jsp/poll/confirmDeletePollComment.jsp</result> - </action> - <!-- vote poll --> <action name="vote/*" method="execute" class="org.chorem.pollen.ui.actions.poll.VoteForPoll"> @@ -184,14 +162,24 @@ <result name="input">/WEB-INF/jsp/poll/vote.jsp</result> </action> - <!-- add a choice --> - <action name="addChoice/*" - class="org.chorem.pollen.ui.actions.poll.AddChoice"> - <param name="uriId">{1}</param> - <result name="input">/WEB-INF/jsp/poll/vote.jsp</result> + <!-- edit poll vote --> + <action name="editVote" + class="org.chorem.pollen.ui.actions.poll.EditVote"> <result type="redirectToVote"/> </action> + <!-- confirm delete poll vote --> + <action name="confirmDeleteVote" + class="org.chorem.pollen.ui.actions.poll.ConfirmDeleteVote"> + <result>/WEB-INF/jsp/poll/confirmDeletePollVote.jsp</result> + </action> + + <!-- delete poll vote --> + <action name="deleteVote" + class="org.chorem.pollen.ui.actions.poll.DeleteVote"> + <result type="redirectToVote"/> + </action> + <!-- add a poll comment --> <action name="addComment/*" class="org.chorem.pollen.ui.actions.poll.AddComment"> @@ -200,41 +188,26 @@ <result type="redirectToVote"/> </action> + <!-- confirm delete comment --> + <action name="confirmDeleteComment" + class="org.chorem.pollen.ui.actions.poll.ConfirmDeleteComment"> + <result>/WEB-INF/jsp/poll/confirmDeletePollComment.jsp</result> + </action> + <!-- delete a poll comment --> <action name="deleteComment" class="org.chorem.pollen.ui.actions.poll.DeleteComment"> <result type="redirectToVote"/> </action> - <!-- get the feed of a given poll --> - <action name="getFeed" - class="org.chorem.pollen.ui.actions.poll.GetPollFeed"> - <result type="stream"> - <param name="contentCharSet">UTF-8</param> - <param name="contentType">application/atom+xml</param> - <param name="encode">true</param> - <param name="bufferSize">4096</param> - </result> - </action> - - <!-- confirm delete poll vote --> - <action name="confirmDeleteVote" - class="org.chorem.pollen.ui.actions.poll.ConfirmDeleteVote"> - <result>/WEB-INF/jsp/poll/confirmDeletePollVote.jsp</result> - </action> - - <!-- delete poll vote --> - <action name="deleteVote" - class="org.chorem.pollen.ui.actions.poll.DeleteVote"> + <!-- add a choice --> + <action name="addChoice/*" + class="org.chorem.pollen.ui.actions.poll.AddChoice"> + <param name="uriId">{1}</param> + <result name="input">/WEB-INF/jsp/poll/vote.jsp</result> <result type="redirectToVote"/> </action> - <!-- edit poll vote --> - <action name="editVote" - class="org.chorem.pollen.ui.actions.poll.EditVote"> - <result type="redirectToVote"/> - </action> - <!-- confirm delete poll choice --> <action name="confirmDeleteChoice" class="org.chorem.pollen.ui.actions.poll.ConfirmDeleteChoice"> @@ -247,6 +220,30 @@ <result type="redirectToVote"/> </action> + <!-- display * --> + <action name="display*" + class="org.chorem.pollen.ui.actions.poll.Display{1}"> + <result>/WEB-INF/jsp/poll/display{1}.jsp</result> + </action> + + <!-- display poll result --> + <action name="results/*" method="execute" + class="org.chorem.pollen.ui.actions.poll.ResultForPoll"> + <param name="uriId">{1}</param> + <result>/WEB-INF/jsp/poll/result.jsp</result> + </action> + + <!-- get the feed of a given poll --> + <action name="getFeed" + class="org.chorem.pollen.ui.actions.poll.GetPollFeed"> + <result type="stream"> + <param name="contentCharSet">UTF-8</param> + <param name="contentType">application/atom+xml</param> + <param name="encode">true</param> + <param name="bufferSize">4096</param> + </result> + </action> + <!-- Select a favorite list to add to a voting list --> <action name="selectPersonListToAddToVotingList" class="org.chorem.pollen.ui.actions.poll.SelectPersonListToVotingList"> Modified: trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties =================================================================== --- trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties 2012-06-19 08:18:29 UTC (rev 3519) @@ -11,7 +11,9 @@ pollen.action.backToFavoriteLists=Back to favorite lists pollen.action.cancel=Cancel pollen.action.clone=Clone poll +pollen.action.clonePoll.help=Cloner this poll pollen.action.close=Close the poll +pollen.action.closePoll.help=Close this poll pollen.action.create=Create pollen.action.createFavoriteList=Create a new list pollen.action.createPoll=Create the poll @@ -21,14 +23,17 @@ pollen.action.deleteChoice=Delete the choice pollen.action.deleteFavoriteList=Delete a list pollen.action.deletePoll=Delete the poll +pollen.action.deletePoll.help=Delete this poll pollen.action.deletePollAccount=Delete selected member pollen.action.deleteUser=Delete selected user pollen.action.deleteVote=Delete this vote pollen.action.editFavoriteList=Edit a list pollen.action.editPoll=Edit the poll +pollen.action.editPoll.help=Edit this poll pollen.action.editPollAccount=Edit selected member pollen.action.editUser=Edit selected user pollen.action.editVote=Modifier le vote +pollen.action.exportPoll.help=Export this poll (xml format) pollen.action.importPersonListToExistingVotingList=Add selected voting list pollen.action.importPersonListToNewVotingList=Create a new group from the selected voting list pollen.action.login=Log me In @@ -44,8 +49,10 @@ pollen.action.pollEdit=Edit poll pollen.action.pollExport=Export poll pollen.action.pollModerateVote=Administrate votes +pollen.action.pollModerateVote.help=Moderate votes and comments for this poll pollen.action.pollPersonToListDelete=Delete this voter pollen.action.pollResult=Display poll results +pollen.action.pollResult.help=vote count and display results for this poll pollen.action.pollSummary=Poll summary pollen.action.pollVote=Vote pollen.action.pollVotingListDelete=Delete the voting list @@ -54,6 +61,7 @@ pollen.action.send=Send pollen.action.summaryPoll=Goto administration page of the poll pollen.action.validate=Submit +pollen.action.voteAction.help=Share this link with people to vote pollen.banner.newVersion=New version\! pollen.common.aboutPoll=About the poll pollen.common.addingChoices=Adding choices @@ -287,15 +295,15 @@ pollen.information.vote.deleted=Vote deleted. pollen.information.your.are.loggued=You are logged. pollen.label.contact.administrator=Send an email to an administrator -pollen.label.pollClonePage=<strong>Clone your poll</strong> -pollen.label.pollClosePage=<strong>Close your poll</strong> -pollen.label.pollDeletePage=<strong>Delete your poll</strong> -pollen.label.pollEditPage=<strong>To modify your poll</strong>. Save it to be able to modify your poll later if you need it or to close it\: -pollen.label.pollExportPage=<strong>Export your poll</strong> -pollen.label.pollModerateVotePage=<strong>To moderate your poll (you can't vote from this url)</strong>. Save it to be able to delete votes and comments\: +pollen.label.pollClonePage=Clone your poll +pollen.label.pollClosePage=Close your poll +pollen.label.pollDeletePage=Delete your poll +pollen.label.pollEditPage=Edit your poll +pollen.label.pollExportPage=Export your poll +pollen.label.pollModerateVotePage=Moderate your poll pollen.label.pollRegisterPage=If you are a logged user, you can find these links on the page -pollen.label.pollResultPage=<strong>To count the vote</strong>.Save it to be able to count the vote later\: -pollen.label.pollVotePage=<strong>To vote on your poll</strong>. Save it and send it to the people that you want to vote\: +pollen.label.pollResultPage=Count votes +pollen.label.pollVotePage=Vote on your poll pollen.legend.attachPoll=Attach an anonymous poll to your user account pollen.legend.login=Login pollen.legend.select.favoriteList.to.add=Sélectionner la liste de favoris à ajouter Modified: trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties =================================================================== --- trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties 2012-06-19 08:18:29 UTC (rev 3519) @@ -11,7 +11,9 @@ pollen.action.backToFavoriteLists=Retour à la liste des favoris pollen.action.cancel=Annuler pollen.action.clone=Cloner le sondage +pollen.action.clonePoll.help=Cloner ce sondage pollen.action.close=Fermer le sondage +pollen.action.closePoll.help=Fermer ce sondage pollen.action.create=Créer pollen.action.createFavoriteList=Créer une ouvelle liste pollen.action.createPoll=Créer le sondage @@ -21,14 +23,17 @@ pollen.action.deleteChoice=Supprimer le choix pollen.action.deleteFavoriteList=Supprimer une liste sélectionnée pollen.action.deletePoll=Supprimer le sondage +pollen.action.deletePoll.help=Supprimer ce sondage pollen.action.deletePollAccount=Supprimer une membre de la liste pollen.action.deleteUser=Supprimer un utilisateur sélectionné pollen.action.deleteVote=Supprimer ce vote pollen.action.editFavoriteList=Editer une liste sélectionnée pollen.action.editPoll=Modifier le sondage +pollen.action.editPoll.help=Éditer ce sondage pollen.action.editPollAccount=Editer le membre sélectionné pollen.action.editUser=Editer un utilisateur sélectionné pollen.action.editVote=Modifier le vote +pollen.action.exportPoll.help=Exporter ce sondage au format xml pollen.action.importPersonListToExistingVotingList=Ajouter la liste sélectionnée de votants pollen.action.importPersonListToNewVotingList=Créer un groupe à partir de la liste sélectionnée pollen.action.login=M'identifier @@ -44,8 +49,10 @@ pollen.action.pollEdit=Editer le sondage pollen.action.pollExport=Exporter le sondage pollen.action.pollModerateVote=Administrer les votes +pollen.action.pollModerateVote.help=Modérer les votes et commentaires du sondage pollen.action.pollPersonToListDelete=Supprimer ce votant pollen.action.pollResult=Afficher les résultats du sondage +pollen.action.pollResult.help=Dépouiller et afficher les résultats du sondage pollen.action.pollSummary=Résumé du sondage pollen.action.pollVote=Voter pollen.action.pollVotingListDelete=Supprimer le groupe de votants @@ -54,6 +61,7 @@ pollen.action.send=Envoyer pollen.action.summaryPoll=Aller sur la page d'administration du sondage pollen.action.validate=Valider +pollen.action.voteAction.help=Partager ce lien avec ceux que vous voulez voir voter pollen.banner.newVersion=Nouvelle version \! pollen.common.aboutPoll=A propos du sondage pollen.common.addingChoices=Ajout des choix @@ -287,15 +295,15 @@ pollen.information.vote.deleted=Vote supprimé. pollen.information.your.are.loggued=Vous êtes connecté. pollen.label.contact.administrator=Contacter un administrateur -pollen.label.pollClonePage=<strong>Cloner le sondage</strong> -pollen.label.pollClosePage=<strong>Fermer le sondage</strong> -pollen.label.pollDeletePage=<strong>Supprimer le sondage</strong> -pollen.label.pollEditPage=<strong>Lien pour configurer le sondage</strong>. Enregistrez-le pour pouvoir modifier votre sondage au besoin ou le clore \: -pollen.label.pollExportPage=<strong>Exporter le sondage</strong> -pollen.label.pollModerateVotePage=<strong>Lien pour modérer le sondage (ce lien ne permet pas de voter)</strong>. Enregistrez-le pour pouvoir supprimer des votes et commentaires \: +pollen.label.pollClonePage=Cloner le sondage +pollen.label.pollClosePage=Fermer le sondage +pollen.label.pollDeletePage=Supprimer le sondage +pollen.label.pollEditPage=Configurer le sondage +pollen.label.pollExportPage=Exporter le sondage +pollen.label.pollModerateVotePage=Modérer le sondage pollen.label.pollRegisterPage=Si vous êtes un utilisateur identifié, vous pouvez retrouver ces liens dans la page -pollen.label.pollResultPage=<strong>Lien pour dépouiller le sondage</strong>. Enregistrez-le pour pouvoir accéder au dépouillement plus tard \: -pollen.label.pollVotePage=<strong>Lien pour voter</strong>. Enregistrez-le et envoyez-le à ceux que vous voulez voir voter \: +pollen.label.pollResultPage=Dépouiller le sondage +pollen.label.pollVotePage=Voter pollen.legend.attachPoll=Attacher un sondage anonyme à votre compte pollen.legend.login=Login pollen.legend.select.favoriteList.to.add=Sélectionner la liste de favoris à ajouter Modified: trunk/pollen-ui-struts2/src/main/resources/struts.xml =================================================================== --- trunk/pollen-ui-struts2/src/main/resources/struts.xml 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/resources/struts.xml 2012-06-19 08:18:29 UTC (rev 3519) @@ -121,14 +121,6 @@ <default-class-ref class="org.chorem.pollen.ui.actions.PollenActionSupport"/> - <action name="notLoggued"> - <result>/WEB-INF/jsp/user/login.jsp</result> - </action> - - <action name="notAdmin"> - <result>/WEB-INF/jsp/adminRequired.jsp</result> - </action> - <!-- go to home --> <action name="home" class="org.chorem.pollen.ui.actions.PollenActionSupport"> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -44,7 +44,9 @@ <%-- TODO AThimel 24/01/2012 Remove this when refactoring is over --%> <div id="in-progress"> - <a href="http://chorem.org/projects/pollen"><s:text name="pollen.banner.newVersion"/></a> + <a href="http://chorem.org/projects/pollen"> + <s:text name="pollen.banner.newVersion"/> + </a> </div> @@ -72,10 +74,10 @@ <s:set var="userExists" value="%{#user != null}"/> <s:set var="userIsAdmin" value="%{#userExists && #user.administrator}"/> -<body id="${pageLogo}Body"> +<body id="<s:property value="%{pageLogo}"/>Body"> <!-- Langue --> -<div id="po-header-localization" class="${pageLogo}Localization"> +<div id="po-header-localization" class="<s:property value='%{pageLogo}'/>Localization"> <s:a title="Contacter un administrateur" href="mailto:%{configuration.adminEmail}"> <img src="<s:url value='/img/contact.png' />" alt="Contact"/> @@ -100,18 +102,18 @@ </s:a> </p> -<div id="top" class="${pageLogo}"> +<div id="top" class="<s:property value="%{pageLogo}"/>"> <!-- Login --> - <div id="po-header-connection" class="${pageLogo}"> + <div id="po-header-connection" class="<s:property value='%{pageLogo}'/>"> <s:if test="userExists"> <span class="menu_elt" onmouseover="$('#compte_menu').show()" onmouseout="$('#compte_menu').hide()"> - ${user.displayName} + <s:property value='%{user.displayName}'/> <div class="dropdown_menu" id="compte_menu" style="display: none;"> - <div class="top_right${pageLogo}"></div> - <div class="top_left${pageLogo}"></div> - <ul class="top_middle${pageLogo}"> + <div class="top_right<s:property value='%{pageLogo}'/>"></div> + <div class="top_left<s:property value='%{pageLogo}'/>"></div> + <ul class="top_middle<s:property value='%{pageLogo}'/>"> <li> <s:a action="show" namespace="/user"> <s:text name="pollen.menu.preferences"/> @@ -132,26 +134,27 @@ </span> <div class="dropdown_menu" id="login_menu" style="display: none;"> - <div class="top_right${pageLogo}"></div> - <div class="top_left${pageLogo}"></div> + <div class="top_right<s:property value='%{pageLogo}'/>"></div> + <div class="top_left<s:property value='%{pageLogo}'/>"></div> <sj:dialog id="lostPasswordDialog" autoOpen="false" modal="true" width="500"/> <s:form id="connection" method="POST" namespace="/user" action="login"> <s:hidden name="redirectUrl" value="%{currentUrl}"/> - <ul class="top_middle${pageLogo}"> + <ul class="top_middle<s:property value='%{pageLogo}'/>"> <li> <label for="connection_login"> <s:text name="pollen.common.login"/> : </label> <s:textfield key="login" size="10" required="true" theme="simple" - label=''/> + label='' id='connection_login'/> </li> <li> <label for="connection_password"> <s:text name="pollen.common.password"/> : </label> <s:password key="password" size="10" required="true" + id='connection_password' label="" theme="simple"/> </li> <li> @@ -186,9 +189,9 @@ <a><s:text name="pollen.menu.polls"/></a> <div class="dropdown_menu" id="menu1" style="display:none"> - <div class="top_right${pageLogo}"></div> - <div class="top_left${pageLogo}"></div> - <ul class="top_middle${pageLogo}"> + <div class="top_right<s:property value='%{pageLogo}'/>"></div> + <div class="top_left<s:property value='%{pageLogo}'/>"></div> + <ul class="top_middle<s:property value='%{pageLogo}'/>"> <li> <s:a action="create" namespace="/poll"> <s:text name="pollen.menu.createPoll"/> @@ -226,9 +229,9 @@ <a><s:text name="pollen.menu.admin"/></a> <div class="dropdown_menu" id="menu2" style="display:none"> - <div class="top_right${pageLogo}"></div> - <div class="top_left${pageLogo}"></div> - <ul class="top_middle${pageLogo}"> + <div class="top_right<s:property value='%{pageLogo}'/>"></div> + <div class="top_left<s:property value='%{pageLogo}'/>"></div> + <ul class="top_middle<s:property value='%{pageLogo}'/>"> <li> <s:a action="pollsList" namespace="/admin"> <s:text name="pollen.menu.managePolls"/> @@ -252,7 +255,7 @@ <div id="corps"> <!-- Barre d'adresse --> - <div id="po-header-addressBar" class="${pageLogo}Address"> + <div id="po-header-addressBar" class="<s:property value='%{pageLogo}'/>Address"> <%--<t:loop t:source="addressBar.items" t:value="item">--%> <%-->--%> <%--<strong>--%> @@ -267,7 +270,7 @@ </div> <!-- Contenu --> - <div id="${pageBodyId}" class="content"> + <div id="<s:property value='%{pageBobyId}'/>" class="content"> <noscript> <%--<div t:type="nuiton/feedback" t:id="errorJs" />--%> </noscript> @@ -306,7 +309,7 @@ </div> <!-- Pied de page --> -<div id="po-footer" class="${pageLogo}" xml:space="preserve"> +<div id="po-footer" class="<s:property value='%{pageLogo}'/>" xml:space="preserve"> <a href="http://maven-site.chorem.org/pollen">Pollen</a> <a href="http://www.chorem.org/projects/pollen/files"> <%=PollenActionSupport.getApplicationVersion()%> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/admin/pollsList.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/admin/pollsList.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/admin/pollsList.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -26,11 +26,13 @@ <script type="text/javascript"> var redirectUrl = '<s:url namespace="/admin" action="pollsList"/>'; </script> -<%@include file="/WEB-INF/jsp/pollListHelper.jsp"%> +<%@include file="/WEB-INF/jsp/pollListHelper.jsp" %> <title><s:text name="pollen.title.pollsList"/></title> -<h1 class="title${pageLogo}"><s:text name="pollen.title.pollsList"/></h1> +<h1 class="title<s:property value='%{pageLogo}'/>"> + <s:text name="pollen.title.pollsList"/> +</h1> <s:url id="loadUrl" action="getPolls" namespace="/json" escapeAmp="false"/> @@ -45,10 +47,13 @@ rowList="10,15,20,50,100" rowNum="10"> <sjg:gridColumn name="id" title="id" hidden="true"/> - <sjg:gridColumn name="title" title='%{getText("pollen.common.title")}' /> - <sjg:gridColumn name="description" title='%{getText("pollen.common.description")}'/> - <sjg:gridColumn name="addingChoices" title='%{getText("pollen.common.addingChoices")}'/> - <sjg:gridColumn name="beginDate" title='%{getText("pollen.common.beginDate")}'/> + <sjg:gridColumn name="title" title='%{getText("pollen.common.title")}'/> + <sjg:gridColumn name="description" + title='%{getText("pollen.common.description")}'/> + <sjg:gridColumn name="addingChoices" + title='%{getText("pollen.common.addingChoices")}'/> + <sjg:gridColumn name="beginDate" + title='%{getText("pollen.common.beginDate")}'/> <sjg:gridColumn name="endDate" title='%{getText("pollen.common.endDate")}'/> <sjg:gridColumn name="functions" title='%{getText("pollen.common.functions")}' formatter="pollFunctions" width="55" sortable="false"/> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/admin/usersList.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/admin/usersList.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/admin/usersList.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -32,7 +32,9 @@ <title><s:text name="pollen.title.usersList"/></title> -<h1 class="title${pageLogo}"><s:text name="pollen.title.usersList"/></h1> +<h1 class="title<s:property value='%{pageLogo}'/>"> + <s:text name="pollen.title.usersList"/> +</h1> <s:url id="loadUsers" action="getUsers" namespace="/json" escapeAmp="false"/> @@ -49,7 +51,8 @@ var deleteImg = '<s:url value='/img/delete.png'/>'; jQuery(document).ready(function () { - initUsersPage('${action}', '${user.topiaId}'); + initUsersPage("<s:property value='%{action}'/>", + "<s:property value='%{user.topiaId}'/>"); }); </script> Deleted: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/adminRequired.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/adminRequired.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/adminRequired.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -1,31 +0,0 @@ -<%-- - #%L - Pollen :: UI (struts2) - $Id$ - $HeadURL$ - %% - Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit - %% - 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% - --%> - -<%@ page language="java" contentType="text/html" pageEncoding="utf-8" %> -<%@ taglib prefix="s" uri="/struts-tags" %> - -<br/> - -<div> - La page demandé n'est accessible que par un administrateur. -</div> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/home.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/home.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/home.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -27,13 +27,16 @@ <br/> <div class="center" style="margin-bottom:20px;"> - <img src="<s:url value='/img/pollen_%{safeLanguage}.png' />" alt="Pollen logo"/> + <img src="<s:url value='/img/pollen_%{safeLanguage}.png' />" + alt="Pollen logo"/> </div> <div class="center"> <s:a action="create" namespace="/poll"> - <img src="<s:url value='/img/smallCreation_%{safeLanguage}.png' />" alt="poll creation"/> + <img src="<s:url value='/img/smallCreation_%{safeLanguage}.png' />" + alt="poll creation"/> </s:a> <img src="<s:url value='/img/smallVote_%{safeLanguage}.png' />" alt="vote"/> - <img src="<s:url value='/img/smallVoteCounting_%{safeLanguage}.png' />" alt="voteCounting"/> + <img src="<s:url value='/img/smallVoteCounting_%{safeLanguage}.png' />" + alt="voteCounting"/> </div> Deleted: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/create.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/create.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/create.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -1,353 +0,0 @@ -<%-- - #%L - Pollen :: UI (struts2) - $Id$ - $HeadURL$ - %% - Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit - %% - 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% - --%> -<%@ page language="java" contentType="text/html" pageEncoding="utf-8" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> - -<link rel="stylesheet" type="text/css" - href="<s:url value='/css/pollCreation.css'/>"/> -<link rel="stylesheet" type="text/css" href="<s:url value='/css/tipTip.css'/>"/> - -<script type="text/javascript"> - - $(document).data( - { - selectPersonListToAddToVotingListTitle:'<s:text name="pollen.title.selectPersonListToAddVotingList"/>', - selectPersonListToCreateNewVotingListTitle:'<s:text name="pollen.title.selectPersonListToCreateVotingList"/>', - - votingListText:'<s:text name="pollen.common.votingList"/>', - personToListText:'<s:text name="pollen.common.personToList"/>', - choiceText:'<s:text name="pollen.common.choice"/>', - - displayVotingListUrl:'<s:url namespace="/poll" action="displayVotingList"/>', - displayPersonToListUrl:'<s:url namespace="/poll" action="displayPersonToList"/>', - importPersonListToVotingListUrl:'<s:url namespace="/poll" action="importPersonListToVotingList"/>', - importPersonListToNewVotingListUrl:'<s:url namespace="/poll" action="importPersonListToNewVotingList"/>', - displayImageChoiceUrl:'<s:url namespace="/poll" action="displayImageChoice"/>', - displayDateChoiceUrl:'<s:url namespace="/poll" action="displayDateChoice"/>', - displayTextChoiceUrl:'<s:url namespace="/poll" action="displayTextChoice"/>', - selectPersonListToAddToVotingListUrl:'<s:url action="selectPersonListToAddToVotingList" namespace="/poll"/>', - selectPersonListToCreateNewVotingListUrl:'<s:url action="selectPersonListToCreateNewVotingList" namespace="/poll"/>', - - choiceAddAllowed:'<s:property value="%{poll.choiceAddAllowed}"/>', - limitChoice:'<s:property value="%{limitChoice}"/>', - reminder:'<s:property value="%{reminder}"/>', - publicOption:'<s:property value="%{poll.publicResults}"/>', - anonymousOption:'<s:property value="%{poll.anonymous}"/>', - voteCountingType:'<s:property value="%{poll.voteCountingType.name()}"/>', - choiceType:'<s:property value="%{poll.choiceType.name()}"/>', - pollType:'<s:property value="%{poll.pollType.name()}"/>', - confirmCloseTitle:"<s:text name='pollen.title.close.poll'/>", - confirmCloseUrl:'<s:url action="confirmClosePoll/%{poll.adminId}" namespace="/poll"/>', - confirmCloseRedirectUrl:'<s:url action="summary/%{poll.adminId}" namespace="/poll"/>' - } - ); -</script> - -<script type="text/javascript" - src='<s:url value="/js/createPoll.js"/>'></script> -<script type="text/javascript" - src='<s:url value="/js/jquery.tipTip.minified.js"/>'></script> - -<s:url id='errorImg' value='/img/exclamation.png'/> - -<title> - <s:if test="edit"> - <s:text name="pollen.title.editPoll"/> - </s:if> - <s:else> - <s:text name="pollen.title.createPoll"/> - </s:else> -</title> - -<h1 class="title${pageLogo}"><s:property value="%{pageTitle}"/></h1> - -<s:form method="POST" id="registerForm" namespace="/poll" - enctype="multipart/form-data"> - - <s:hidden key="poll.topiaId" label=""/> - - <sj:tabbedpanel id="formTabs" selectedTab="%{selectedTab}"> - - <sj:tab id="tabGeneral" target="tgeneral" key="pollen.tab.poll.general"/> - <sj:tab id="tabOptions" target="toptions" key="pollen.tab.poll.options"/> - - <div id="tgeneral"> - - <fieldset> - - <s:textfield key="poll.title" label="%{getText('pollen.common.title')}" - required="true" size="80"/> - <s:textarea key="poll.description" rows="3" cols="54" - label="%{getText('pollen.common.description')}"/> - <s:hidden key="poll.pollId" label=""/> - </fieldset> - - <br/> - - <fieldset class="disableForVoteStarted"> - <legend> - <s:text name="pollen.common.voteCountingType"/> - <img src="<s:url value='/img/tooltip.png'/>" class="tooltip" - alt="<s:text name='pollen.common.voteCountingType.help'/>" - title="<s:text name='pollen.common.voteCountingType.help'/>"/> - </legend> - <s:radio key='poll.voteCountingType' list="voteCountingTypes" - label='' theme="simple"/> - </fieldset> - <br/> - - <%@include file="createPoll_choices.jsp" %> - - </div> - - <div id="toptions"> - - <fieldset> - <legend> - <s:text name="pollen.fieldset.creator.options"/> - <img src="<s:url value='/img/tooltip.png'/>" class="tooltip" - title="<s:text name='pollen.fieldset.creator.options.help'/>" - alt="<s:text name='pollen.fieldset.creator.options.help'/>"/> - </legend> - <s:textfield key="poll.creator.votingId" size="80" - label="%{getText('pollen.common.login')}"/> - <s:textfield key="poll.creator.email" size="80" - label="%{getText('pollen.common.email')}"/> - <s:hidden key="poll.creator.accountId" label=""/> - <s:hidden key="poll.creator.topiaId" label=""/> - <s:if test="creatorUserAccountDefined"> - <s:hidden name="userId" value="%{poll.creator.userAccount.topiaId}"/> - </s:if> - </fieldset> - <br/> - - <fieldset> - <legend> - <s:text name="pollen.fieldset.pollDate.options"/> - <img src="<s:url value='/img/tooltip.png'/>" class="tooltip" - title="<s:text name='pollen.fieldset.pollDate.options.help'/>" - alt="<s:text name='pollen.fieldset.pollDate.options.help'/>"/> - </legend> - - <sj:datepicker key="poll.beginDate" cssClass="disableForVoteStarted" - displayFormat="%{getText('pollen.common.datePickerPattern')}" - label="%{getText('pollen.common.beginDate')}" - timepicker="true"/> - <sj:datepicker key="poll.endDate" - displayFormat="%{getText('pollen.common.datePickerPattern')}" - timepicker="true" - label="%{getText('pollen.common.endDate')}"/> - </fieldset> - <br/> - - <fieldset class="disableForVoteStarted"> - <legend> - <s:text name="pollen.fieldset.choice.options"/> - <img src="<s:url value='/img/tooltip.png'/>" class="tooltip" - title="<s:text name='pollen.fieldset.choice.options.help'/>" - alt="<s:text name='pollen.fieldset.choice.options.help'/>"/> - </legend> - <s:checkbox key="poll.choiceAddAllowed" - label="%{getText('pollen.common.pollOption.choiceAddAllowed')}" - disabled="%{voteStarted}" - tooltip="%{getText('pollen.common.pollOption.choiceAddAllowed.help')}" - tooltipIconPath="/img/tooltip.png"/> - <sj:datepicker key="poll.beginChoiceDate" - label="%{getText('pollen.common.beginChoiceDate')}" - displayFormat="%{getText('pollen.common.datePickerPattern')}" - timepicker="true" - disabled="%{voteStarted}"/> - <sj:datepicker key="poll.endChoiceDate" - label="%{getText('pollen.common.endChoiceDate')}" - displayFormat="%{getText('pollen.common.datePickerPattern')}" - timepicker="true" - disabled="%{voteStarted}"/> - <s:checkbox key="limitChoice" - label="%{getText('pollen.common.pollOption.limitChoice')}" - disabled="%{voteStarted}" - tooltip="%{getText('pollen.common.pollOption.limitChoice.help')}" - tooltipIconPath="/img/tooltip.png"/> - <s:textfield key="maxChoices" - label="%{getText('pollen.common.pollOption.maxChoiceNb')}" - disabled="%{voteStarted}"/> - </fieldset> - <br/> - - <fieldset class="disableForVoteStarted"> - <legend> - <s:text name="pollen.fieldset.vote.options"/> - <img src="<s:url value='/img/tooltip.png'/>" class="tooltip" - title="<s:text name='pollen.fieldset.vote.options.help'/>" - alt="<s:text name='pollen.fieldset.vote.options.help'/>"/> - </legend> - - <s:checkbox key="poll.anonymous" - label="%{getText('pollen.common.pollOption.anonymous')}" - disabled="%{voteStarted}" - tooltip="%{getText('pollen.common.pollOption.anonymous.help')}" - tooltipIconPath="/img/tooltip.png"/> - <s:checkbox key="poll.anonymousVoteAllowed" - label="%{getText('pollen.common.pollOption.anonymousVoteAllowed')}" - disabled="%{voteStarted}" - tooltip="%{getText('pollen.common.pollOption.anonymousVoteAllowed.help')}" - tooltipIconPath="/img/tooltip.png"/> - </fieldset> - <br/> - <fieldset> - <legend> - <s:text name="pollen.fieldset.result.options"/> - <img src="<s:url value='/img/tooltip.png'/>" class="tooltip" - title="<s:text name='pollen.fieldset.result.options.help'/>" - alt="<s:text name='pollen.fieldset.result.options.help'/>"/> - </legend> - - <s:checkbox key="poll.publicResults" - label="%{getText('pollen.common.pollOption.publicResults')}" - tooltip="%{getText('pollen.common.pollOption.publicResults.help')}" - tooltipIconPath="/img/tooltip.png"/> - <s:checkbox key="poll.continuousResults" - label="%{getText('pollen.common.pollOption.continuousResults')}" - tooltip="%{getText('pollen.common.pollOption.continuousResults.help')}" - tooltipIconPath="/img/tooltip.png"/> - </fieldset> - <br/> - - <fieldset> - <legend> - <s:text name="pollen.fieldset.notification.options"/> - <img src="<s:url value='/img/tooltip.png'/>" class="tooltip" - title="<s:text name='pollen.fieldset.notification.options.help'/>" - alt="<s:text name='pollen.fieldset.notification.options.help'/>"/> - </legend> - <s:checkbox key="notification" - label="%{getText('pollen.common.pollOption.notification')}" - tooltip="%{getText('pollen.common.pollOption.notification.help')}" - tooltipIconPath="/img/tooltip.png"/> - <s:checkbox key="reminder" - label="%{getText('pollen.common.pollOption.reminder')}" - tooltip="%{getText('pollen.common.pollOption.reminder.help')}" - tooltipIconPath="/img/tooltip.png"/> - <s:textfield key="reminderHourCountdown" - label="%{getText('pollen.common.pollOption.reminderHourCountdown')}"/> - </fieldset> - <br/> - - <fieldset class="disableForVoteStarted"> - <legend> - <s:text name="pollen.common.pollType"/> - <img src="<s:url value='/img/tooltip.png'/>" class="tooltip" - title="<s:text name='pollen.common.pollType.help'/>" - alt="<s:text name='pollen.common.pollType.help'/>"/> - </legend> - <s:radio key='poll.pollType' list="pollTypes" - label='%{getText("pollen.common.pollType")}'/> - <hr/> - - <div id="pollTypeFREE" class="pollType"> - <%--Nothing to show for a free poll--%> - </div> - - <div id="pollTypeRESTRICTED" class="pollType"> - <s:iterator value="restrictedVotingList" status="status" - var="votingList"> - <s:set name="votingListNumber"><s:property - value="%{#status.index}"/></s:set> - <s:set name="votingListType">RESTRICTED</s:set> - <%@include file="displayVotingList.jsp" %> - </s:iterator> - </div> - - <div id="pollTypeGROUP" class="pollType"> - <div id="votingListGROUP"> - <s:iterator value="groupVotingList" status="status" - var="votingList"> - <s:set name="votingListNumber"><s:property - value="%{#status.index}"/></s:set> - <s:set name="votingListType">GROUP</s:set> - <%@include file="displayVotingList.jsp" %> - </s:iterator> - </div> - <div align="center"> - <s:submit key="pollen.action.addVotingList" theme="simple" - onclick="return addNewVotingList();"/> - <s:if test="userLoggued"> - <s:submit key="pollen.action.addVotingListFromPersonList" - onclick='return selectPersonListToCreateNewVotingList();' - theme="simple"/> - </s:if> - </div> - </div> - </fieldset> - </div> - - </sj:tabbedpanel> - - <br/> - <s:if test="edit"> - <s:submit action="edit/%{uriId}" value="%{actionLabel}" align="center"/> - <div align="center" style="margin-top: 10px"> - <button onclick="return confirmClose();"> - <s:text name="pollen.action.close"/> - </button> - </div> - </s:if> - <s:elseif test="clone"> - <s:submit action="clone/%{uriId}" value="%{actionLabel}" align="center"/> - </s:elseif> - <s:else> - <s:submit action="create" value="%{actionLabel}" align="center"/> - </s:else> -</s:form> - -<script type="text/javascript"> - - jQuery(document).ready(function () { - - function addErrorImage(element) { - element.append( - '<image src="${errorImg}">' - ); - element.attr('title', '<s:text name="pollen.error.pollTabErrorFound"/>'); - } - - if (<s:property value="%{informationsError}"/>) { - addErrorImage($('#tabGeneral a')); - } - if (<s:property value="%{optionsError}"/>) { - addErrorImage($('#tabOptions a')); - } - - if (<s:property value="%{poll.closed}"/>) { - disablePoll(); - } - if (<s:property value="%{voteStarted}"/>) { - disableWhenVoteStarted(); - } - }); -</script> - -<sj:dialog id="selectPersonListDialog" resizable="true" autoOpen="false" - modal="true" width="500"/> - -<sj:dialog id="confirmDialog" autoOpen="false" modal="true" width="500"/> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/createPoll_choices.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/createPoll_choices.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/createPoll_choices.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -25,211 +25,216 @@ <%@ taglib prefix="sp" uri="/nuiton-tags" %> <%@ taglib prefix="sj" uri="/struts-jquery-tags" %> <fieldset class="disableForVoteStarted"> - <legend><s:text name="pollen.fieldset.poll.choices"/></legend> - <s:radio key='poll.choiceType' list="choiceTypes" label='' theme="simple"/> - <hr/> - <s:fielderror fieldName="poll.choices" id="poll_choices_error"/> +<legend><s:text name="pollen.fieldset.poll.choices"/></legend> +<s:radio key='poll.choiceType' list="choiceTypes" label='' theme="simple"/> +<hr/> +<s:fielderror fieldName="poll.choices" id="poll_choices_error"/> - <s:set id='deleteTitle'><s:text - name="pollen.action.pollChoiceDelete"/></s:set> - <s:set id='upTitle'><s:text name="pollen.action.pollChoiceUp"/></s:set> - <s:set id='downTitle'><s:text name="pollen.action.pollChoiceDown"/></s:set> +<s:set id='deleteTitle'><s:text + name="pollen.action.pollChoiceDelete"/></s:set> +<s:set id='upTitle'><s:text name="pollen.action.pollChoiceUp"/></s:set> +<s:set id='downTitle'><s:text name="pollen.action.pollChoiceDown"/></s:set> - <div id="choicesTEXT" class="choices"> - <s:iterator value="textChoices" status="status" var="choice"> - <s:set name="choiceNumber"><s:property value="%{#status.index}"/></s:set> - <s:set name="prefix">textChoice_<s:property - value="%{#choiceNumber}"/></s:set> - <div id='choicesTEXT_<s:property value="choiceNumber"/>'> - <s:hidden key='%{#prefix}.topiaId' value='%{#choice.topiaId}' label=''/> - <sp:fielderror fieldName="%{#prefix}" id="%{#prefix}_error"/> - <div class="fleft choiceName"> - <sp:fielderror fieldName="%{#prefix}.name" - id="%{#prefix}.name_error"/> - <s:label for="%{#prefix}.name" id="choicesTEXT_label_%{#choiceNumber}" - theme="simple" value=''/> - <s:textfield cssClass="nameField" id='%{#prefix}.name' theme="simple" - key="%{#prefix}.name" label='' value="%{#choice.name}"/> - - - <s:label for="%{#prefix}.description" key="pollen.common.description" - theme="simple"/> - <%--/div> - <div class="fleft"--%> - <s:textarea cols="30" id="%{#prefix}.description" label='' - theme="simple" key="%{#prefix}.description" - value="%{#choice.description}"/> +<div id="choicesTEXT" class="choices"> + <s:iterator value="textChoices" status="status" var="choice"> + <s:set name="choiceNumber"><s:property value="%{#status.index}"/></s:set> + <s:set name="prefix">textChoice_<s:property + value="%{#choiceNumber}"/></s:set> + <div id='choicesTEXT_<s:property value="choiceNumber"/>' class="ui-state-default"> + <%--<div id='choicesTEXT_<s:property value="choiceNumber"/>'>--%> + <s:hidden key='%{#prefix}.topiaId' value='%{#choice.topiaId}' label=''/> + <s:hidden key='%{#prefix}.order' value='%{#choiceNumber}' label=''/> + <sp:fielderror fieldName="%{#prefix}" id="%{#prefix}_error"/> + <div class="fleft choiceName"> + <sp:fielderror fieldName="%{#prefix}.name" id="%{#prefix}.name_error"/> + <span class="choicesImage ui-icon ui-icon-arrowthick-2-n-s"></span> + <s:label for="%{#prefix}.name" id="choicesTEXT_label_%{#choiceNumber}" + theme="simple" value=''/> + <s:textfield cssClass="nameField" id='%{#prefix}.name' theme="simple" + key="%{#prefix}.name" label='' value="%{#choice.name}"/> + - + <s:label for="%{#prefix}.description" key="pollen.common.description" + theme="simple"/> + <%--/div> + <div class="fleft"--%> + <s:textarea cols="30" id="%{#prefix}.description" label='' + theme="simple" key="%{#prefix}.description" + value="%{#choice.description}"/> + </div> + <s:if test="!voteStarted"> + <div class="fright"> + <%--s:a id='choicesTEXT_down_%{choiceNumber}' + cssClass="hidden" href='#' + onclick="return downChoice('choicesTEXT_%{choiceNumber}')"> + <image alt='<s:property value="downTitle"/>' + title='<s:property value="downTitle"/>' + src="<s:url value='/img/1downarrow.png'/>"></image> + </s:a> + <s:a id='choicesTEXT_up_%{choiceNumber}' href='#' cssClass="hidden" + onclick="return upChoice('choicesTEXT_%{choiceNumber}')"> + <image alt='<s:property value="upTitle"/>' + title='<s:property value="upTitle"/>' + src="<s:url value='/img/1uparrow.png'/>"></image> + </s:a--%> + <s:a href='#' + onclick="return deleteChoice('choicesTEXT_%{choiceNumber}')"> + <image alt='<s:property value="deleteTitle"/>' + title='<s:property value="deleteTitle"/>' + src="<s:url value='/img/delete.png'/>"></image> + </s:a> </div> - <s:if test="!voteStarted"> - <div class="fright"> - <s:a id='choicesTEXT_down_%{choiceNumber}' - cssClass="hidden" href='#' - onclick="return downChoice('choicesTEXT_%{choiceNumber}')"> - <image alt='<s:property value="downTitle"/>' - title='<s:property value="downTitle"/>' - src="<s:url value='/img/1downarrow.png'/>"></image> - </s:a> - <s:a id='choicesTEXT_up_%{choiceNumber}' href='#' cssClass="hidden" - onclick="return upChoice('choicesTEXT_%{choiceNumber}')"> - <image alt='<s:property value="upTitle"/>' - title='<s:property value="upTitle"/>' - src="<s:url value='/img/1uparrow.png'/>"></image> - </s:a> - <s:a href='#' - onclick="return deleteChoice('choicesTEXT_%{choiceNumber}')"> - <image alt='<s:property value="deleteTitle"/>' - title='<s:property value="deleteTitle"/>' - src="<s:url value='/img/delete.png'/>"></image> - </s:a> - </div> - </s:if> - <div class="cleanBoth"></div> + </s:if> + <div class="cleanBoth"></div> + </div> + </s:iterator> +</div> +<div id="choicesDATE" class="choices"> + <s:iterator value="dateChoices" status="status" var="choice"> + <s:set name="choiceNumber"><s:property value="%{#status.index}"/></s:set> + <s:set name="prefix">dateChoice_<s:property + value="%{#choiceNumber}"/></s:set> + <div id='choicesDATE_<s:property value="choiceNumber"/>' + class="ui-state-default"> + <s:hidden key='%{#prefix}.topiaId' id='%{#prefix}.topiaId' + theme="simple" value='%{#choice.topiaId}' label=''/> + <s:hidden key='%{#prefix}.order' value='%{#choiceNumber}' label=''/> + <sp:fielderror fieldName="%{#prefix}" id="%{#prefix}_error"/> + <div class="fleft choiceName"> + <sp:fielderror fieldName="%{#prefix}.name" id="%{#prefix}.name_error"/> + <span class="choicesImage ui-icon ui-icon-arrowthick-2-n-s"> </span> + <s:label for="%{#prefix}.name" id="choicesDATE_label_%{choiceNumber}" + theme="simple" value=''/> + <sj:datepicker id='%{#prefix}.name' key="%{#prefix}.name" label="" + changeMonth="true" changeYear="true" labelSeparator="" + theme="simple" timepicker="true" + value="%{#choice.name}" + displayFormat="%{getText('pollen.common.datePickerPattern')}"/> + - + <s:label for="%{#prefix}.description" key="pollen.common.description" + theme="simple"/> </div> - </s:iterator> - </div> - <div id="choicesDATE" class="choices"> - <s:iterator value="dateChoices" status="status" var="choice"> - <s:set name="choiceNumber"><s:property value="%{#status.index}"/></s:set> - <s:set name="prefix">dateChoice_<s:property - value="%{#choiceNumber}"/></s:set> - <div id='choicesDATE_<s:property value="choiceNumber"/>'> - <s:hidden key='%{#prefix}.topiaId' id='%{#prefix}.topiaId' - theme="simple" - value='%{#choice.topiaId}' label=''/> - <sp:fielderror fieldName="%{#prefix}" id="%{#prefix}_error"/> - <div class="fleft choiceName"> - <sp:fielderror fieldName="%{#prefix}.name" - id="%{#prefix}.name_error"/> - <s:label for="%{#prefix}.name" id="choicesDATE_label_%{choiceNumber}" - theme="simple" value=''/> - <sj:datepicker id='%{#prefix}.name' key="%{#prefix}.name" label="" - changeMonth="true" changeYear="true" labelSeparator="" - theme="simple" timepicker="true" - value="%{#choice.name}" - displayFormat="%{getText('pollen.common.datePickerPattern')}"/> - - - <s:label for="%{#prefix}.description" key="pollen.common.description" - theme="simple"/> + <div class="fleft"> + <s:textarea cols="30" id="%{#prefix}.description" theme="simple" + key="%{#prefix}.description" label='' + value="%{#choice.description}"/> + </div> + <s:if test="!voteStarted"> + <div class="fright"> + <%--s:a id='choicesDATE_down_%{choiceNumber}' cssClass="hidden" + href='#' + onclick="return downChoice('choicesDATE_%{choiceNumber}')"> + <image alt='<s:property value="downTitle"/>' + title='<s:property value="downTitle"/>' + src="<s:url value='/img/1downarrow.png'/>"></image> + </s:a> + <s:a id='choicesDATE_up_%{choiceNumber}' href='#' cssClass="hidden" + onclick="return upChoice('choicesDATE_%{choiceNumber}')"> + <image alt='<s:property value="upTitle"/>' + title='<s:property value="upTitle"/>' + src="<s:url value='/img/1uparrow.png'/>"></image> + </s:a--%> + <s:a href='#' + onclick="return deleteChoice('choicesDATE_%{choiceNumber}')"> + <image alt='<s:property value="deleteTitle"/>' + title='<s:property value="deleteTitle"/>' + src="<s:url value='/img/delete.png'/>"></image> + </s:a> </div> - <div class="fleft"> - <s:textarea cols="30" id="%{#prefix}.description" theme="simple" - key="%{#prefix}.description" label='' - value="%{#choice.description}"/> - </div> - <s:if test="!voteStarted"> - <div class="fright"> - <s:a id='choicesDATE_down_%{choiceNumber}' cssClass="hidden" - href='#' - onclick="return downChoice('choicesDATE_%{choiceNumber}')"> - <image alt='<s:property value="downTitle"/>' - title='<s:property value="downTitle"/>' - src="<s:url value='/img/1downarrow.png'/>"></image> - </s:a> - <s:a id='choicesDATE_up_%{choiceNumber}' href='#' cssClass="hidden" - onclick="return upChoice('choicesDATE_%{choiceNumber}')"> - <image alt='<s:property value="upTitle"/>' - title='<s:property value="upTitle"/>' - src="<s:url value='/img/1uparrow.png'/>"></image> - </s:a> - <s:a href='#' - onclick="return deleteChoice('choicesDATE_%{choiceNumber}')"> - <image alt='<s:property value="deleteTitle"/>' - title='<s:property value="deleteTitle"/>' - src="<s:url value='/img/delete.png'/>"></image> - </s:a> - </div> - </s:if> - <div class="cleanBoth"></div> - </div> - </s:iterator> - </div> - <div id="choicesIMAGE" class="choices"> - <s:iterator value="imageChoices" status="status" var="choice"> - <s:set name="choiceNumber"><s:property value="%{#status.index}"/></s:set> - <s:set name="prefix">imageChoice_<s:property - value="%{#choiceNumber}"/></s:set> - <div id='choicesIMAGE_<s:property value="choiceNumber"/>'> - <s:hidden key='%{#prefix}.topiaId' value='%{#choice.topiaId}' label=''/> - <sp:fielderror fieldName="%{#prefix}" id="%{#prefix}_error"/> - <div class="fleft choiceName"> - <sp:fielderror fieldName="%{#prefix}.name" - id="%{#prefix}.name_error"/> - <s:label for="%{#prefix}.name" id="choicesIMAGE_label_%{choiceNumber}" - theme="simple" value=''/> - <s:if test="#choice.name != null"> + </s:if> + <div class="cleanBoth"></div> + </div> + </s:iterator> +</div> +<div id="choicesIMAGE" class="choices"> + <s:iterator value="imageChoices" status="status" var="choice"> + <s:set name="choiceNumber"><s:property value="%{#status.index}"/></s:set> + <s:set name="prefix">imageChoice_<s:property + value="%{#choiceNumber}"/></s:set> + <div id='choicesIMAGE_<s:property value="choiceNumber"/>' + class="ui-state-default"> + <s:hidden key='%{#prefix}.order' value='%{#choiceNumber}' label=''/> + <s:hidden key='%{#prefix}.topiaId' value='%{#choice.topiaId}' label=''/> + <sp:fielderror fieldName="%{#prefix}" id="%{#prefix}_error"/> + <div class="fleft choiceName"> + <sp:fielderror fieldName="%{#prefix}.name" id="%{#prefix}.name_error"/> + <span class="choicesImage ui-icon ui-icon-arrowthick-2-n-s"></span> + <s:label for="%{#prefix}.name" id="choicesIMAGE_label_%{choiceNumber}" + theme="simple" value=''/> + <s:if test="#choice.name != null"> - <%--Uploaded image--%> - <s:hidden id="%{#prefix}.name" name="%{#prefix}.name" - value="%{#choice.name}" label='' theme="simple"/> + <%--Uploaded image--%> + <s:hidden id="%{#prefix}.name" name="%{#prefix}.name" + value="%{#choice.name}" label='' theme="simple"/> - <s:hidden id="%{#prefix}.location" name="%{#prefix}.location" - value="%{#choice.location}" label='' theme="simple"/> - <s:url id="imageUrl" namespace="/io" action="getPollChoiceImage" - escapeAmp="true"> - <s:param name="choiceTokenId"> - imagechoicesThumb_<s:property value='name'/> - </s:param> - </s:url> - <img name="<s:property value="#prefix"/>.thumb" - alt="<s:property value='name'/>" - title="<s:property value='name'/>" - src="<s:property value='imageUrl'/>"> + <s:hidden id="%{#prefix}.location" name="%{#prefix}.location" + value="%{#choice.location}" label='' theme="simple"/> + <s:url id="imageUrl" namespace="/io" action="getPollChoiceImage" + escapeAmp="true"> + <s:param name="choiceTokenId"> + imagechoicesThumb_<s:property value='name'/> + </s:param> + </s:url> + <img name="<s:property value="#prefix"/>.thumb" + alt="<s:property value='name'/>" + title="<s:property value='name'/>" + src="<s:property value='imageUrl'/>"> - <s:file key='imageChoice[%{#choiceNumber}]' label='' theme="simple" - cssClass="nameField fleft" cssStyle="margin-left:50px;"/> - </s:if> - <s:else> - <%--New image--%> - <s:url id="imageUrl" namespace="/io" action="getPollChoiceImage" - escapeAmp="false" value="/img/7ter.jpg"/> - <img name="<s:property value="#prefix"/>.thumb" - alt="<s:text name='pollen.image.not.loaded'/>" - title="<s:text name='pollen.image.not.loaded'/>" - src="<s:property value='imageUrl'/>" width="100px" - height="75px"> - <s:file key='imageChoice[%{#choiceNumber}]' label='' theme="simple" - cssClass="nameField fleft" - cssStyle="margin-left:50px;"/> + <s:file key='imageChoice[%{#choiceNumber}]' label='' theme="simple" + cssClass="nameField fleft" cssStyle="margin-left:50px;"/> + </s:if> + <s:else> + <%--New image--%> + <s:url id="imageUrl" namespace="/io" action="getPollChoiceImage" + escapeAmp="false" value="/img/7ter.jpg"/> + <img name="<s:property value="#prefix"/>.thumb" + alt="<s:text name='pollen.image.not.loaded'/>" + title="<s:text name='pollen.image.not.loaded'/>" + src="<s:property value='imageUrl'/>" width="100px" + height="75px"> + <s:file key='imageChoice[%{#choiceNumber}]' label='' theme="simple" + cssClass="nameField fleft" + cssStyle="margin-left:50px;"/> - </s:else> + </s:else> + </div> + <div class="fleft"> + - + <s:label for="%{#prefix}.description" key="pollen.common.description" + theme="simple"/> + <s:textarea cols="30" id="%{#prefix}.description" label='' + theme="simple" key="%{#prefix}.description" + value="%{#choice.description}"/> + </div> + <s:if test="!voteStarted"> + <div class="fright"> + <%--s:a id='choicesIMAGE_down_%{choiceNumber}' cssClass="hidden" + href='#' + onclick="return downChoice('choicesIMAGE_%{choiceNumber}')"> + <image alt='<s:property value="downTitle"/>' + title='<s:property value="downTitle"/>' + src="<s:url value='/img/1downarrow.png'/>"></image> + </s:a> + <s:a id='choicesIMAGE_up_%{choiceNumber}' href='#' cssClass="hidden" + onclick="return upChoice('choicesIMAGE_%{choiceNumber}')"> + <image alt='<s:property value="upTitle"/>' + title='<s:property value="upTitle"/>' + src="<s:url value='/img/1uparrow.png'/>"></image> + </s:a--%> + <s:a href='#' + onclick="return deleteChoice('choicesIMAGE_%{choiceNumber}')"> + <image alt='<s:property value="deleteTitle"/>' + title='<s:property value="deleteTitle"/>' + src="<s:url value='/img/delete.png'/>"></image> + </s:a> </div> - <div class="fleft"> - - - <s:label for="%{#prefix}.description" key="pollen.common.description" - theme="simple"/> - <s:textarea cols="30" id="%{#prefix}.description" label='' - theme="simple" key="%{#prefix}.description" - value="%{#choice.description}"/> - </div> - <s:if test="!voteStarted"> - <div class="fright"> - <s:a id='choicesIMAGE_down_%{choiceNumber}' cssClass="hidden" - href='#' - onclick="return downChoice('choicesIMAGE_%{choiceNumber}')"> - <image alt='<s:property value="downTitle"/>' - title='<s:property value="downTitle"/>' - src="<s:url value='/img/1downarrow.png'/>"></image> - </s:a> - <s:a id='choicesIMAGE_up_%{choiceNumber}' href='#' cssClass="hidden" - onclick="return upChoice('choicesIMAGE_%{choiceNumber}')"> - <image alt='<s:property value="upTitle"/>' - title='<s:property value="upTitle"/>' - src="<s:url value='/img/1uparrow.png'/>"></image> - </s:a> - <s:a href='#' - onclick="return deleteChoice('choicesIMAGE_%{choiceNumber}')"> - <image alt='<s:property value="deleteTitle"/>' - title='<s:property value="deleteTitle"/>' - src="<s:url value='/img/delete.png'/>"></image> - </s:a> - </div> - </s:if> + </s:if> - <div class="cleanBoth"></div> - </div> - </s:iterator> - </div> - <hr/> - <s:submit key="pollen.action.addChoice" align="center" - onclick="return addNewChoice();"/> + <div class="cleanBoth"></div> + </div> + </s:iterator> +</div> +<hr/> +<s:submit key="pollen.action.addChoice" align="center" + onclick="return addNewChoice();"/> </fieldset> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayDateChoice.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayDateChoice.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayDateChoice.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -28,9 +28,12 @@ <s:set id='deleteTitle'><s:text name="pollen.action.pollChoiceDelete"/></s:set> <s:set id='upTitle'><s:text name="pollen.action.pollChoiceUp"/></s:set> <s:set id='downTitle'><s:text name="pollen.action.pollChoiceDown"/></s:set> -<div id='choicesDATE_<s:property value="choiceNumber"/>'> +<div id='choicesDATE_<s:property value="choiceNumber"/>' + class="ui-state-default"> <s:hidden key='%{#prefix}.topiaId' value='%{choice.topiaId}' label=''/> + <s:hidden key='%{#prefix}.order' value='%{#choiceNumber}' label=''/> <div class="fleft choiceName"> + <span class="choicesImage ui-icon ui-icon-arrowthick-2-n-s"></span> <s:label for="%{#prefix}.name" id="choicesDATE_label_%{choiceNumber}" theme="simple" value=''/> <sj:datepicker id='%{#prefix}.name' key="%{#prefix}.name" changeMonth="true" @@ -47,7 +50,7 @@ value="%{choice.description}"/> </div> <div class="fright"> - <s:a id='choicesDATE_down_%{choiceNumber}' + <%--s:a id='choicesDATE_down_%{choiceNumber}' cssClass="hidden" href='#' onclick="return downChoice('choicesDATE_%{choiceNumber}')"> <image alt='<s:property value="downTitle"/>' @@ -59,7 +62,7 @@ <image alt='<s:property value="upTitle"/>' title='<s:property value="upTitle"/>' src="<s:url value='/img/1uparrow.png'/>"></image> - </s:a> + </s:a--%> <s:a href='#' onclick="return deleteChoice('choicesDATE_%{choiceNumber}')"> <image alt='<s:property value="deleteTitle"/>' title='<s:property value="deleteTitle"/>' Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayImageChoice.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayImageChoice.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayImageChoice.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -28,40 +28,26 @@ <s:set id='deleteTitle'><s:text name="pollen.action.pollChoiceDelete"/></s:set> <s:set id='upTitle'><s:text name="pollen.action.pollChoiceUp"/></s:set> <s:set id='downTitle'><s:text name="pollen.action.pollChoiceDown"/></s:set> -<div id='choicesIMAGE_<s:property value="choiceNumber"/>'> +<div id='choicesIMAGE_<s:property value="choiceNumber"/>' + class="ui-state-default"> <s:hidden key='%{#prefix}.topiaId' value='%{choice.topiaId}' label=''/> + <s:hidden key='%{#prefix}.order' value='%{#choiceNumber}' label=''/> <div class="fleft choiceName"> + <span class="choicesImage ui-icon ui-icon-arrowthick-2-n-s"></span> <s:label for="%{#prefix}.name" id="choicesIMAGE_label_%{choiceNumber}" theme="simple" value=''/> - <%--<s:if test="choice.name != ''">--%> - - <%--<%–Uploaded image–%>--%> - <%--<s:hidden id="%{#prefix}.name" name="%{#prefix}.name"--%> - <%--value="%{choice.name}" label='' theme="simple"/>--%> - - <%--<s:hidden id="%{#prefix}.location" name="%{#prefix}.location"--%> - <%--value="%{choice.location}" label='' theme="simple"/>--%> - - <%--<s:label label='' theme="simple" cssClass="nameField"--%> - <%--value="%{choice.name}" readonly="true"/>--%> - <%--</s:if>--%> - <%--<s:else>--%> - <%--New image--%> - <s:url id="imageUrl" namespace="/io" action="getPollChoiceImage" - escapeAmp="false" value="/img/7ter.jpg"/> - <img name="<s:property value="#prefix"/>.thumb" - alt="<s:text name='pollen.image.not.loaded'/>" - title="<s:text name='pollen.image.not.loaded'/>" - src="<s:property value='imageUrl'/>" width="100px" height="75"> + <s:url id="imageUrl" namespace="/io" action="getPollChoiceImage" + escapeAmp="false" value="/img/7ter.jpg"/> + <img name="<s:property value="#prefix"/>.thumb" + alt="<s:text name='pollen.image.not.loaded'/>" + title="<s:text name='pollen.image.not.loaded'/>" + src="<s:property value='imageUrl'/>" width="100px" height="75"> <span style="float: left; margin-left:50px; "> <s:file key='%{#prefix2}' label='' theme="simple" cssClass="nameField" disabled="%{voteStarted}" cssStyle="clear: both;"/> </span> - - <%--<s:file key='%{#prefix2}' label='' theme="simple" cssClass="nameField"/>--%> - <%--</s:else>--%> </div> <div class="fleft"> - @@ -71,7 +57,7 @@ key="%{#prefix}.description" value="%{choice.description}"/> </div> <div class="fright"> - <s:a id='choicesIMAGE_down_%{choiceNumber}' + <%--s:a id='choicesIMAGE_down_%{choiceNumber}' cssClass="hidden" href='#' onclick="return downChoice('choicesIMAGE_%{choiceNumber}')"> <image alt='<s:property value="downTitle"/>' @@ -83,7 +69,7 @@ <image alt='<s:property value="upTitle"/>' title='<s:property value="upTitle"/>' src="<s:url value='/img/1uparrow.png'/>"></image> - </s:a> + </s:a--%> <s:a href='#' onclick="return deleteChoice('choicesIMAGE_%{choiceNumber}')"> <image alt='<s:property value="deleteTitle"/>' title='<s:property value="deleteTitle"/>' Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayPersonToList.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayPersonToList.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayPersonToList.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -24,7 +24,10 @@ <%@ taglib prefix="s" uri="/struts-tags" %> <%@ taglib prefix="sp" uri="/nuiton-tags" %> -<s:set name="personPrefix">votingList<s:property value="votingListType"/>_<s:property value="votingListNumber"/>PersonToList_<s:property value="personToListNumber"/> +<s:set name="personPrefix">votingList<s:property + value="votingListType"/>_<s:property + value="votingListNumber"/>PersonToList_<s:property + value="personToListNumber"/> </s:set> <s:set name="personToList" value="%{personToList}"/> @@ -32,25 +35,32 @@ <s:text name="pollen.action.pollPersonToListDelete"/> </s:set> <s:div id='%{#personPrefix}' cssClass="personToList"> - <s:hidden key='%{#personPrefix}.topiaId' value='%{#personToList.topiaId}' label=''/> - <s:hidden key='%{#personPrefix}.accountId' value='%{#personToList.pollAccount.accountId}' label=''/> + <s:hidden key='%{#personPrefix}.topiaId' value='%{#personToList.topiaId}' + label=''/> + <s:hidden key='%{#personPrefix}.accountId' + value='%{#personToList.pollAccount.accountId}' label=''/> <sp:fielderror fieldName="%{#personPrefix}"/> <div class="fleft choiceName"> - <s:label for="%{#personPrefix}.votingId" id="%{#personPrefix}_label" theme="simple" + <s:label for="%{#personPrefix}.votingId" id="%{#personPrefix}_label" + theme="simple" value=''/> <s:textfield cssClass="nameField" id='%{#personPrefix}.votingId' key="%{#personPrefix}.votingId" label='' theme="simple" value="%{#personToList.pollAccount.votingId}" disabled="%{voteStarted}"/> - - <s:label for="%{#personPrefix}.email" key="pollen.common.email" theme="simple"/> - <s:textfield cols="30" id="%{#personPrefix}.email" key="%{#personPrefix}.email" + <s:label for="%{#personPrefix}.email" key="pollen.common.email" + theme="simple"/> + <s:textfield cols="30" id="%{#personPrefix}.email" + key="%{#personPrefix}.email" label='' theme="simple" size="30" value="%{#personToList.pollAccount.email}" disabled="%{voteStarted}"/> - - <s:label for="%{#personPrefix}.weight" key="pollen.common.weight" theme="simple"/> - <s:textfield id="%{#personPrefix}.weight" key="%{#personPrefix}.weight" size="1" + <s:label for="%{#personPrefix}.weight" key="pollen.common.weight" + theme="simple"/> + <s:textfield id="%{#personPrefix}.weight" key="%{#personPrefix}.weight" + size="1" label='' theme="simple" value="%{#personToList.weight}" disabled="%{voteStarted}"/> </div> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayPollComment.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayPollComment.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayPollComment.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -37,7 +37,6 @@ <span class="name"><s:property value='%{#comment.author}'/></span> : <span class="date"> <s:property value='#comment.postDate'/> - <%--<s:property value='%{formatDateTime(#postDate)}'/>--%> </span> <p> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayPollComments.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayPollComments.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayPollComments.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -25,7 +25,7 @@ <%--<link rel="stylesheet" href="<s:url value='/css/pagination.css'/>"/>--%> <%--<script type="text/javascript"--%> - <%--src="<s:url value='/js/jquery.pagination.js' />"></script>--%> +<%--src="<s:url value='/js/jquery.pagination.js' />"></script>--%> <%-- <input type="text" value="5" name="items_per_page" id="items_per_page" class="numeric"/> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayTextChoice.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayTextChoice.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayTextChoice.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -27,9 +27,12 @@ <s:set id='deleteTitle'><s:text name="pollen.action.pollChoiceDelete"/></s:set> <s:set id='upTitle'><s:text name="pollen.action.pollChoiceUp"/></s:set> <s:set id='downTitle'><s:text name="pollen.action.pollChoiceDown"/></s:set> -<div id='choicesTEXT_<s:property value="choiceNumber"/>'> +<div id='choicesTEXT_<s:property value="choiceNumber"/>' + class="ui-state-default"> <s:hidden key='%{#prefix}.topiaId' value='%{choice.topiaId}' label=''/> + <s:hidden key='%{#prefix}.order' value='%{#choiceNumber}' label=''/> <div class="fleft choiceName"> + <span class="choicesImage ui-icon ui-icon-arrowthick-2-n-s"></span> <s:label for="%{#prefix}.name" id="choicesTEXT_label_%{choiceNumber}" theme="simple" value=''/> <s:textfield cssClass="nameField" id='%{#prefix}.name' key="%{#prefix}.name" @@ -43,7 +46,7 @@ key="%{#prefix}.description" value="%{choice.description}"/> </div> <div class="fright"> - <s:a id='choicesTEXT_down_%{choiceNumber}' + <%--s:a id='choicesTEXT_down_%{choiceNumber}' cssClass="hidden" href='#' onclick="return downChoice('choicesTEXT_%{choiceNumber}')"> <image alt='<s:property value="downTitle"/>' @@ -55,7 +58,7 @@ <image alt='<s:property value="upTitle"/>' title='<s:property value="upTitle"/>' src="<s:url value='/img/1uparrow.png'/>"></image> - </s:a> + </s:a--%> <s:a href='#' onclick="return deleteChoice('choicesTEXT_%{choiceNumber}')"> <image alt='<s:property value="deleteTitle"/>' title='<s:property value="deleteTitle"/>' Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayVotingList.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayVotingList.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayVotingList.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -39,25 +39,25 @@ <sp:fielderror fieldName="%{#prefix}"/> <s:if test='%{#votingListType == "GROUP"}'> <%--<div>--%> - <div class="fleft choiceName"> - <s:label for="%{#prefix}.name" theme="simple" id="%{#prefix}_label"/> - <s:textfield id='%{#prefix}.name' key="%{#prefix}.name" label='' - theme="simple" value="%{#votingList.name}"/> - - - <s:label for="%{#prefix}.weight" key="pollen.common.weight" - theme="simple"/> - <s:textfield id="%{#prefix}.weight" key="%{#prefix}.weight" - value="%{#votingList.weight}" - size="1" label='' theme="simple"/> - </div> - <div id='<s:property value="%{#prefix}"/>_actions' class="fright"> - <s:a href='#' onclick="return deleteVotingList('%{#prefix}')"> - <image alt='<s:property value="deleteVotingListTitle"/>' - title='<s:property value="deleteVotingListTitle"/>' - src="<s:url value='/img/delete.png'/>"></image> - </s:a> - </div> - <hr/> + <div class="fleft choiceName"> + <s:label for="%{#prefix}.name" theme="simple" id="%{#prefix}_label"/> + <s:textfield id='%{#prefix}.name' key="%{#prefix}.name" label='' + theme="simple" value="%{#votingList.name}"/> + - + <s:label for="%{#prefix}.weight" key="pollen.common.weight" + theme="simple"/> + <s:textfield id="%{#prefix}.weight" key="%{#prefix}.weight" + value="%{#votingList.weight}" + size="1" label='' theme="simple"/> + </div> + <div id='<s:property value="%{#prefix}"/>_actions' class="fright"> + <s:a href='#' onclick="return deleteVotingList('%{#prefix}')"> + <image alt='<s:property value="deleteVotingListTitle"/>' + title='<s:property value="deleteVotingListTitle"/>' + src="<s:url value='/img/delete.png'/>"></image> + </s:a> + </div> + <hr/> <%--</div>--%> </s:if> <s:else> @@ -74,7 +74,8 @@ status="pstatus" var="personToList"> <s:set name="personToListNumber"><s:property value="%{#pstatus.index}"/></s:set> - <s:set name="personPrefix"><s:property value="%{#prefix}"/>PersonToList_<s:property value="%{#personToListNumber}"/></s:set> + <s:set name="personPrefix"><s:property value="%{#prefix}"/>PersonToList_<s:property + value="%{#personToListNumber}"/></s:set> <%@include file="displayPersonToList.jsp" %> </s:iterator> </s:div> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayVotingListPersons.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayVotingListPersons.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/displayVotingListPersons.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -36,7 +36,8 @@ <s:property value="%{#pstatus.index + #startNumber}"/> </s:set> <s:set name="personPrefix"> - <s:property value="%{#prefix}"/>PersonToList_<s:property value="%{#personToListNumber}"/></s:set> + <s:property value="%{#prefix}"/>PersonToList_<s:property + value="%{#personToListNumber}"/></s:set> <%@include file="displayPersonToList.jsp" %> </s:iterator> Copied: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollForm.jsp (from rev 3518, trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/create.jsp) =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollForm.jsp (rev 0) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollForm.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -0,0 +1,355 @@ +<%-- + #%L + Pollen :: UI (struts2) + $Id$ + $HeadURL$ + %% + Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit + %% + 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% + --%> +<%@ page language="java" contentType="text/html" pageEncoding="utf-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + +<link rel="stylesheet" type="text/css" + href="<s:url value='/css/pollCreation.css'/>"/> +<link rel="stylesheet" type="text/css" href="<s:url value='/css/tipTip.css'/>"/> + +<script type="text/javascript"> + + $(document).data( + { + selectPersonListToAddToVotingListTitle:'<s:text name="pollen.title.selectPersonListToAddVotingList"/>', + selectPersonListToCreateNewVotingListTitle:'<s:text name="pollen.title.selectPersonListToCreateVotingList"/>', + + votingListText:'<s:text name="pollen.common.votingList"/>', + personToListText:'<s:text name="pollen.common.personToList"/>', + choiceText:'<s:text name="pollen.common.choice"/>', + + displayVotingListUrl:'<s:url namespace="/poll" action="displayVotingList"/>', + displayPersonToListUrl:'<s:url namespace="/poll" action="displayPersonToList"/>', + importPersonListToVotingListUrl:'<s:url namespace="/poll" action="importPersonListToVotingList"/>', + importPersonListToNewVotingListUrl:'<s:url namespace="/poll" action="importPersonListToNewVotingList"/>', + displayImageChoiceUrl:'<s:url namespace="/poll" action="displayImageChoice"/>', + displayDateChoiceUrl:'<s:url namespace="/poll" action="displayDateChoice"/>', + displayTextChoiceUrl:'<s:url namespace="/poll" action="displayTextChoice"/>', + selectPersonListToAddToVotingListUrl:'<s:url action="selectPersonListToAddToVotingList" namespace="/poll"/>', + selectPersonListToCreateNewVotingListUrl:'<s:url action="selectPersonListToCreateNewVotingList" namespace="/poll"/>', + + choiceAddAllowed:'<s:property value="%{poll.choiceAddAllowed}"/>', + limitChoice:'<s:property value="%{limitChoice}"/>', + reminder:'<s:property value="%{reminder}"/>', + publicOption:'<s:property value="%{poll.publicResults}"/>', + anonymousOption:'<s:property value="%{poll.anonymous}"/>', + voteCountingType:'<s:property value="%{poll.voteCountingType.name()}"/>', + choiceType:'<s:property value="%{poll.choiceType.name()}"/>', + pollType:'<s:property value="%{poll.pollType.name()}"/>', + confirmCloseTitle:"<s:text name='pollen.title.close.poll'/>", + confirmCloseUrl:'<s:url action="confirmClosePoll/%{poll.adminId}" namespace="/poll"/>', + confirmCloseRedirectUrl:'<s:url action="summary/%{poll.adminId}" namespace="/poll"/>' + } + ); +</script> + +<script type="text/javascript" + src='<s:url value="/js/createPoll.js"/>'></script> +<script type="text/javascript" + src='<s:url value="/js/jquery.tipTip.minified.js"/>'></script> + +<s:url id='errorImg' value='/img/exclamation.png'/> + +<title> + <s:if test="edit"> + <s:text name="pollen.title.editPoll"/> + </s:if> + <s:else> + <s:text name="pollen.title.createPoll"/> + </s:else> +</title> + +<h1 class="title<s:property value='%{pageLogo}'/>"> + <s:property value="%{pageTitle}"/> +</h1> + +<s:form method="POST" id="registerForm" namespace="/poll" + enctype="multipart/form-data"> + +<s:hidden key="poll.topiaId" label=""/> + +<sj:tabbedpanel id="formTabs" selectedTab="%{selectedTab}"> + +<sj:tab id="tabGeneral" target="tgeneral" key="pollen.tab.poll.general"/> +<sj:tab id="tabOptions" target="toptions" key="pollen.tab.poll.options"/> + +<div id="tgeneral"> + + <fieldset> + + <s:textfield key="poll.title" label="%{getText('pollen.common.title')}" + required="true" size="80"/> + <s:textarea key="poll.description" rows="3" cols="54" + label="%{getText('pollen.common.description')}"/> + <s:hidden key="poll.pollId" label=""/> + </fieldset> + + <br/> + + <fieldset class="disableForVoteStarted"> + <legend> + <s:text name="pollen.common.voteCountingType"/> + <img src="<s:url value='/img/tooltip.png'/>" class="tooltip" + alt="<s:text name='pollen.common.voteCountingType.help'/>" + title="<s:text name='pollen.common.voteCountingType.help'/>"/> + </legend> + <s:radio key='poll.voteCountingType' list="voteCountingTypes" + label='' theme="simple"/> + </fieldset> + <br/> + + <%@include file="createPoll_choices.jsp" %> + +</div> + +<div id="toptions"> + + <fieldset> + <legend> + <s:text name="pollen.fieldset.creator.options"/> + <img src="<s:url value='/img/tooltip.png'/>" class="tooltip" + title="<s:text name='pollen.fieldset.creator.options.help'/>" + alt="<s:text name='pollen.fieldset.creator.options.help'/>"/> + </legend> + <s:textfield key="poll.creator.votingId" size="80" + label="%{getText('pollen.common.login')}"/> + <s:textfield key="poll.creator.email" size="80" + label="%{getText('pollen.common.email')}"/> + <s:hidden key="poll.creator.accountId" label=""/> + <s:hidden key="poll.creator.topiaId" label=""/> + <s:if test="creatorUserAccountDefined"> + <s:hidden name="userId" value="%{poll.creator.userAccount.topiaId}"/> + </s:if> + </fieldset> + <br/> + + <fieldset> + <legend> + <s:text name="pollen.fieldset.pollDate.options"/> + <img src="<s:url value='/img/tooltip.png'/>" class="tooltip" + title="<s:text name='pollen.fieldset.pollDate.options.help'/>" + alt="<s:text name='pollen.fieldset.pollDate.options.help'/>"/> + </legend> + + <sj:datepicker key="poll.beginDate" cssClass="disableForVoteStarted" + displayFormat="%{getText('pollen.common.datePickerPattern')}" + label="%{getText('pollen.common.beginDate')}" + timepicker="true"/> + <sj:datepicker key="poll.endDate" + displayFormat="%{getText('pollen.common.datePickerPattern')}" + timepicker="true" + label="%{getText('pollen.common.endDate')}"/> + </fieldset> + <br/> + + <fieldset class="disableForVoteStarted"> + <legend> + <s:text name="pollen.fieldset.choice.options"/> + <img src="<s:url value='/img/tooltip.png'/>" class="tooltip" + title="<s:text name='pollen.fieldset.choice.options.help'/>" + alt="<s:text name='pollen.fieldset.choice.options.help'/>"/> + </legend> + <s:checkbox key="poll.choiceAddAllowed" + label="%{getText('pollen.common.pollOption.choiceAddAllowed')}" + disabled="%{voteStarted}" + tooltip="%{getText('pollen.common.pollOption.choiceAddAllowed.help')}" + tooltipIconPath="/img/tooltip.png"/> + <sj:datepicker key="poll.beginChoiceDate" + label="%{getText('pollen.common.beginChoiceDate')}" + displayFormat="%{getText('pollen.common.datePickerPattern')}" + timepicker="true" + disabled="%{voteStarted}"/> + <sj:datepicker key="poll.endChoiceDate" + label="%{getText('pollen.common.endChoiceDate')}" + displayFormat="%{getText('pollen.common.datePickerPattern')}" + timepicker="true" + disabled="%{voteStarted}"/> + <s:checkbox key="limitChoice" + label="%{getText('pollen.common.pollOption.limitChoice')}" + disabled="%{voteStarted}" + tooltip="%{getText('pollen.common.pollOption.limitChoice.help')}" + tooltipIconPath="/img/tooltip.png"/> + <s:textfield key="maxChoices" + label="%{getText('pollen.common.pollOption.maxChoiceNb')}" + disabled="%{voteStarted}"/> + </fieldset> + <br/> + + <fieldset class="disableForVoteStarted"> + <legend> + <s:text name="pollen.fieldset.vote.options"/> + <img src="<s:url value='/img/tooltip.png'/>" class="tooltip" + title="<s:text name='pollen.fieldset.vote.options.help'/>" + alt="<s:text name='pollen.fieldset.vote.options.help'/>"/> + </legend> + + <s:checkbox key="poll.anonymous" + label="%{getText('pollen.common.pollOption.anonymous')}" + disabled="%{voteStarted}" + tooltip="%{getText('pollen.common.pollOption.anonymous.help')}" + tooltipIconPath="/img/tooltip.png"/> + <s:checkbox key="poll.anonymousVoteAllowed" + label="%{getText('pollen.common.pollOption.anonymousVoteAllowed')}" + disabled="%{voteStarted}" + tooltip="%{getText('pollen.common.pollOption.anonymousVoteAllowed.help')}" + tooltipIconPath="/img/tooltip.png"/> + </fieldset> + <br/> + <fieldset> + <legend> + <s:text name="pollen.fieldset.result.options"/> + <img src="<s:url value='/img/tooltip.png'/>" class="tooltip" + title="<s:text name='pollen.fieldset.result.options.help'/>" + alt="<s:text name='pollen.fieldset.result.options.help'/>"/> + </legend> + + <s:checkbox key="poll.publicResults" + label="%{getText('pollen.common.pollOption.publicResults')}" + tooltip="%{getText('pollen.common.pollOption.publicResults.help')}" + tooltipIconPath="/img/tooltip.png"/> + <s:checkbox key="poll.continuousResults" + label="%{getText('pollen.common.pollOption.continuousResults')}" + tooltip="%{getText('pollen.common.pollOption.continuousResults.help')}" + tooltipIconPath="/img/tooltip.png"/> + </fieldset> + <br/> + + <fieldset> + <legend> + <s:text name="pollen.fieldset.notification.options"/> + <img src="<s:url value='/img/tooltip.png'/>" class="tooltip" + title="<s:text name='pollen.fieldset.notification.options.help'/>" + alt="<s:text name='pollen.fieldset.notification.options.help'/>"/> + </legend> + <s:checkbox key="notification" + label="%{getText('pollen.common.pollOption.notification')}" + tooltip="%{getText('pollen.common.pollOption.notification.help')}" + tooltipIconPath="/img/tooltip.png"/> + <s:checkbox key="reminder" + label="%{getText('pollen.common.pollOption.reminder')}" + tooltip="%{getText('pollen.common.pollOption.reminder.help')}" + tooltipIconPath="/img/tooltip.png"/> + <s:textfield key="reminderHourCountdown" + label="%{getText('pollen.common.pollOption.reminderHourCountdown')}"/> + </fieldset> + <br/> + + <fieldset class="disableForVoteStarted"> + <legend> + <s:text name="pollen.common.pollType"/> + <img src="<s:url value='/img/tooltip.png'/>" class="tooltip" + title="<s:text name='pollen.common.pollType.help'/>" + alt="<s:text name='pollen.common.pollType.help'/>"/> + </legend> + <s:radio key='poll.pollType' list="pollTypes" + label='%{getText("pollen.common.pollType")}'/> + <hr/> + + <div id="pollTypeFREE" class="pollType"> + <%--Nothing to show for a free poll--%> + </div> + + <div id="pollTypeRESTRICTED" class="pollType"> + <s:iterator value="restrictedVotingList" status="status" + var="votingList"> + <s:set name="votingListNumber"><s:property + value="%{#status.index}"/></s:set> + <s:set name="votingListType">RESTRICTED</s:set> + <%@include file="displayVotingList.jsp" %> + </s:iterator> + </div> + + <div id="pollTypeGROUP" class="pollType"> + <div id="votingListGROUP"> + <s:iterator value="groupVotingList" status="status" + var="votingList"> + <s:set name="votingListNumber"><s:property + value="%{#status.index}"/></s:set> + <s:set name="votingListType">GROUP</s:set> + <%@include file="displayVotingList.jsp" %> + </s:iterator> + </div> + <div align="center"> + <s:submit key="pollen.action.addVotingList" theme="simple" + onclick="return addNewVotingList();"/> + <s:if test="userLoggued"> + <s:submit key="pollen.action.addVotingListFromPersonList" + onclick='return selectPersonListToCreateNewVotingList();' + theme="simple"/> + </s:if> + </div> + </div> + </fieldset> +</div> + +</sj:tabbedpanel> + +<br/> +<s:if test="edit"> + <s:submit action="edit/%{uriId}" value="%{actionLabel}" align="center"/> + <div align="center" style="margin-top: 10px"> + <button onclick="return confirmClose();"> + <s:text name="pollen.action.close"/> + </button> + </div> +</s:if> +<s:elseif test="clone"> + <s:submit action="clone/%{uriId}" value="%{actionLabel}" align="center"/> +</s:elseif> +<s:else> + <s:submit action="create" value="%{actionLabel}" align="center"/> +</s:else> +</s:form> + +<script type="text/javascript"> + + jQuery(document).ready(function () { + + function addErrorImage(element) { + element.append( + '<image src="${errorImg}">' + ); + element.attr('title', '<s:text name="pollen.error.pollTabErrorFound"/>'); + } + + if (<s:property value="%{informationsError}"/>) { + addErrorImage($('#tabGeneral a')); + } + if (<s:property value="%{optionsError}"/>) { + addErrorImage($('#tabOptions a')); + } + + if (<s:property value="%{poll.closed}"/>) { + disablePoll(); + } + if (<s:property value="%{voteStarted}"/>) { + disableWhenVoteStarted(); + } + }); +</script> + +<sj:dialog id="selectPersonListDialog" resizable="true" autoOpen="false" + modal="true" width="500"/> + +<sj:dialog id="confirmDialog" autoOpen="false" modal="true" width="500"/> Property changes on: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollForm.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/summary.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/summary.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/summary.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -55,6 +55,32 @@ dialog.dialog('open'); return false; } + + var autoSelect = function () { + var el = $(this)[0]; + if (/textarea/i.test(el.tagName) || (/input/i.test(el.tagName) && /text/i.test(el.type))) { + el.select(); + } else if (!!window.getSelection) { // FF, Safari, Chrome, Opera + var sel = window.getSelection(); + var range = document.createRange(); + range.selectNodeContents(el); + sel.removeAllRanges(); + sel.addRange(range); + } else if (!!document.selection) { // IE + document.selection.empty(); + var range = document.body.createTextRange(); + range.moveToElementText(el); + range.select(); + } + }; + + $(document).load(function() { + + + $('.url').click(autoSelect); + + }) + </script> <h1 class="titleCreation"><s:property value="poll.title"/></h1> @@ -72,13 +98,14 @@ <s:if test="canVote"> <div class="ui-widget-content-green ui-corner-all"> <img src="<s:url value='/img/vote.png'/>" class="imgAction" - alt="<s:text name='pollen.common.voteAction'/>" - title="<s:text name='pollen.common.voteAction'/>"/> - <s:text name="pollen.label.pollVotePage"/> - <br/> + alt="<s:text name='pollen.action.voteAction.help'/>" + title="<s:text name='pollen.action.voteAction.help'/>"/> <s:a href="%{voteUrl}"> + <strong><s:text name="pollen.label.pollVotePage"/></strong> + </s:a> + <span class="fright url" id='voteUrl'> <s:property value="%{voteUrl}"/> - </s:a> + </span> </div> </s:if> @@ -86,57 +113,60 @@ <s:if test="canShowResult"> <div class="ui-widget-content-green ui-corner-all"> <img src="<s:url value='/img/count.png'/>" class="imgAction" - alt="<s:text name='pollen.action.pollResult'/>" - title="<s:text name='pollen.action.pollResult'/>"/> - <s:text name='pollen.label.pollResultPage'/> - <br/> + alt="<s:text name='pollen.action.pollResult.help'/>" + title="<s:text name='pollen.action.pollResult.help'/>"/> <s:a href="%{resultUrl}"> + <strong><s:text name='pollen.label.pollResultPage'/></strong> + </s:a> + <span class="fright url" id='voteUrl'> <s:property value="%{resultUrl}"/> - </s:a> + </span> </div> </s:if> <%--Moderate--%> <div class="ui-widget-content-yellow ui-corner-all"> <img src="<s:url value='/img/moderate.png'/>" class="imgAction" - alt="<s:text name='pollen.action.pollModerateVote'/>" - title="<s:text name='pollen.action.pollModerateVote'/>"/> - <s:text name='pollen.label.pollModerateVotePage'/> - <br/> + alt="<s:text name='pollen.action.pollModerateVote.help'/>" + title="<s:text name='pollen.action.pollModerateVote.help'/>"/> <s:a href="%{moderateUrl}"> - <s:property value="%{moderateUrl}"/> + <strong><s:text name='pollen.label.pollModerateVotePage'/></strong> </s:a> + <span class="fright url" id='voteUrl'> + <s:property value="%{moderateUrl}"/> + </span> </div> <%--Edit--%> <div class="ui-widget-content-yellow ui-corner-all"> <img src="<s:url value='/img/edit.png'/>" class="imgAction" - alt="<s:text name='pollen.action.editPoll'/>" - title="<s:text name='pollen.action.editPoll'/>"/> - <s:text name='pollen.label.pollEditPage'/> - <br/> + alt="<s:text name='pollen.action.editPoll.help'/>" + title="<s:text name='pollen.action.editPoll.help'/>"/> <s:a href="%{editUrl}"> - <s:property value="%{editUrl}"/> + <strong><s:text name='pollen.label.pollEditPage'/></strong> </s:a> + <span class="fright url" id='voteUrl'> + <s:property value="%{editUrl}"/> + </span> </div> <%--Export--%> <div class="ui-widget-content-blue ui-corner-all"> <img src="<s:url value='/img/export.png'/>" class="imgAction" - alt="<s:text name='pollen.action.pollExport'/>" - title="<s:text name='pollen.action.pollExport'/>"/> + alt="<s:text name='pollen.action.exportPoll.help'/>" + title="<s:text name='pollen.action.exportPoll.help'/>"/> <s:a href="%{exportUrl}"> - <s:text name='pollen.label.pollExportPage'/> + <strong><s:text name='pollen.label.pollExportPage'/></strong> </s:a> </div> <%--Clone--%> <div class="ui-widget-content-blue ui-corner-all"> <img src="<s:url value='/img/copy.png'/>" class="imgAction" - alt="<s:text name='pollen.action.clone'/>" - title="<s:text name='pollen.action.clone'/>"/> + alt="<s:text name='pollen.action.clonePoll.help'/>" + title="<s:text name='pollen.action.clonePoll.help'/>"/> <s:a href="%{cloneUrl}"> - <s:text name='pollen.label.pollClonePage'/> + <strong> <s:text name='pollen.label.pollClonePage'/></strong> </s:a> </div> @@ -144,10 +174,10 @@ <s:if test="canClose"> <div class="ui-widget-content-red ui-corner-all"> <img src="<s:url value='/img/close.png'/>" class="imgAction" - alt="<s:text name='pollen.action.close'/>" - title="<s:text name='pollen.action.close'/>"/> + alt="<s:text name='pollen.action.closePoll.help'/>" + title="<s:text name='pollen.action.closePoll.help'/>"/> <s:a href="#" onclick="return confirmClosePoll('%{uriId}')"> - <s:text name='pollen.label.pollClosePage'/> + <strong><s:text name='pollen.label.pollClosePage'/></strong> </s:a> </div> @@ -156,8 +186,8 @@ <%--Delete --%> <div class="ui-widget-content-red ui-corner-all"> <img src="<s:url value='/img/delete.png'/>" class="imgAction" - alt="<s:text name='pollen.action.deletePoll'/>" - title="<s:text name='pollen.action.deletePoll'/>"/> + alt="<s:text name='pollen.action.deletePoll.help'/>" + title="<s:text name='pollen.action.deletePoll.help'/>"/> <s:a href="#" onclick="return confirmDeletePoll('%{uriId}')"> <s:text name='pollen.label.pollDeletePage'/> </s:a> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/pollListHelper.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/pollListHelper.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/pollListHelper.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -27,7 +27,7 @@ <script type="text/javascript" src="<s:url value='/js/gridHelper.js' />"></script> -<s:url id="loadUrl" action="getPolls" namespace="/json" method="input"/> +<s:url id="loadUrl" action="getPolls" namespace="/json"/> <s:url id="voteUrl" action="votefor/" namespace="/poll"/> <s:url id='voteImg' value='/img/vote.png'/> @@ -83,7 +83,7 @@ result += formatLink("${voteUrl}" + voteId, "${voteImg}", "Vote", "${voteTitle}") } if (cellvalue.indexOf('novote') > -1) { - result +="<image src='${blankImg}'>"; + result += "<image src='${blankImg}'>"; } if (cellvalue.indexOf('summary') > -1) { result += formatLink("${summaryUrl}" + adminId, "${summaryImg}", "Moderate", "${summaryTitle}") Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/security/connected_required.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/security/connected_required.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/security/connected_required.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -28,6 +28,6 @@ <span> <s:text name="pollen.security.error.connected_required"/> </span> - </li> + </li> </ul> </div> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/createdList.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/createdList.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/createdList.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -37,7 +37,7 @@ <script type="text/javascript"> var redirectUrl = '<s:url namespace="/user" action="createdList"/>'; - $(function(){ + $(function () { $('img[src$="tooltip.png"]').addClass('tooltip'); $(".tooltip").tipTip(); }); @@ -46,7 +46,9 @@ <title><s:text name="pollen.title.pollsCreatedList"/></title> -<h1 class="title${pageLogo}"><s:text name="pollen.title.pollsCreatedList"/></h1> +<h1 class="title<s:property value='%{pageLogo}'/>"> + <s:text name="pollen.title.pollsCreatedList"/> +</h1> <h4><s:text name="pollen.title.pollsCreatedList.legend"/></h4> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/dialogLostPassword.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/dialogLostPassword.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/dialogLostPassword.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -38,7 +38,9 @@ <hr/> <div align="right"> - <button onclick="return cancel();"><s:text name="pollen.action.cancel"/></button> + <button onclick="return cancel();"> + <s:text name="pollen.action.cancel"/> + </button> <s:submit key="pollen.action.send" theme="simple" action="lostPassword"/> </div> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/edit.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/edit.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/edit.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -25,7 +25,9 @@ <title><s:text name="pollen.title.myAccount"/></title> -<h1 class="title${pageLogo}"><s:text name="pollen.title.myAccount"/></h1> +<h1 class="title<s:property value='%{pageLogo}'/>"> + <s:text name="pollen.title.myAccount"/> +</h1> <s:form method="POST" namespace="/user"> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/favoriteList.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/favoriteList.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/favoriteList.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -42,7 +42,7 @@ <script type="text/javascript"> var favoriteListId = '<s:property value="favoriteList.topiaId"/>'; - var redirectUrl = '${editPollAccounts}'; + var redirectUrl = "<s:property value='%{editPollAccounts}'/>"; var deleteTitle = '<s:text name="pollen.action.deletePollAccount"/>'; var deleteUrl = '<s:url action="confirmDeletePollAccount" namespace="/user" />'; var loadPollActionUrl = '<s:url action="getFavoriteListPollAccount" namespace="/json"/>'; @@ -52,7 +52,7 @@ jQuery(document).ready(function () { - initFavoritePage('${action}'); + initFavoritePage("<s:property value='%{action}'/>"); }); </script> @@ -61,7 +61,7 @@ value="favoriteList.name"/> </title> -<h1 class="title${pageLogo}"> +<h1 class="title<s:property value='%{pageLogo}'/>"> <s:text name="pollen.title.editFavoriteList"/> <s:property value="favoriteList.name"/> </h1> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/favoriteLists.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/favoriteLists.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/favoriteLists.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -37,7 +37,9 @@ <title><s:text name="pollen.title.favoriteLists"/></title> -<h1 class="title${pageLogo}"><s:text name="pollen.title.favoriteLists"/></h1> +<h1 class="title<s:property value='%{pageLogo}'/>"> + <s:text name="pollen.title.favoriteLists"/> +</h1> <s:url id="loadFavoriteLists" action="getFavoriteLists" namespace="/json"/> @@ -51,11 +53,11 @@ var editTitle = '<s:text name="pollen.action.editFavoriteList"/>'; var deleteImg = '<s:url value='/img/delete.png'/>'; var csvHelp = "<div><s:text name='pollen.common.favoriteList.csvImport.help'/>" + - "<br/><img src=\"<s:url value="/img/import_csv_help.png"/>\"/></div>"; + "<br/><img src=\"<s:url value="/img/import_csv_help.png"/>\"/></div>"; jQuery(document).ready(function () { - initFavoritesPage('${action}'); + initFavoritesPage("<s:property value='%{action}'/>"); }); </script> @@ -82,8 +84,7 @@ <br/> <s:form id='createForm' method="POST" namespace="/user" - cssClass="hidden favoriteForm" - enctype="multipart/form-data"> + cssClass="hidden favoriteForm" enctype="multipart/form-data"> <s:hidden name="action" value="create"/> <fieldset> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/invitedList.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/invitedList.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/invitedList.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -26,11 +26,13 @@ <script type="text/javascript"> var redirectUrl = '<s:url namespace="/user" action="invitedList"/>'; </script> -<%@include file="/WEB-INF/jsp/pollListHelper.jsp"%> +<%@include file="/WEB-INF/jsp/pollListHelper.jsp" %> <title><s:text name="pollen.title.pollsInvitedList"/></title> -<h1 class="title${pageLogo}"><s:text name="pollen.title.pollsInvitedList"/></h1> +<h1 class="title<s:property value='%{pageLogo}'/>"> + <s:text name="pollen.title.pollsInvitedList"/> +</h1> <h4><s:text name="pollen.title.pollsInvitedList.legend"/></h4> @@ -48,10 +50,13 @@ rowList="10,15,20,50,100" rowNum="10"> <sjg:gridColumn name="id" title="id" hidden="true"/> - <sjg:gridColumn name="title" title='%{getText("pollen.common.title")}' /> - <sjg:gridColumn name="description" title='%{getText("pollen.common.description")}'/> - <sjg:gridColumn name="addingChoices" title='%{getText("pollen.common.addingChoices")}'/> - <sjg:gridColumn name="beginDate" title='%{getText("pollen.common.beginDate")}'/> + <sjg:gridColumn name="title" title='%{getText("pollen.common.title")}'/> + <sjg:gridColumn name="description" + title='%{getText("pollen.common.description")}'/> + <sjg:gridColumn name="addingChoices" + title='%{getText("pollen.common.addingChoices")}'/> + <sjg:gridColumn name="beginDate" + title='%{getText("pollen.common.beginDate")}'/> <sjg:gridColumn name="endDate" title='%{getText("pollen.common.endDate")}'/> <sjg:gridColumn name="functions" title='%{getText("pollen.common.functions")}' formatter="pollFunctions" width="55" sortable="false"/> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/login.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/login.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/login.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -34,8 +34,8 @@ <s:form id="connection" action="login" method="POST" namespace="/user"> -<fieldset> - <legend><s:text name="pollen.fieldset.login"/></legend> + <fieldset> + <legend><s:text name="pollen.fieldset.login"/></legend> <s:textfield key="login" size="10" label="%{getText('pollen.common.login')}" required="true"/> @@ -44,11 +44,11 @@ required="true"/> -</fieldset> + </fieldset> <br/> <s:submit id="submitform" action="login" key="pollen.action.login" align="center"/> - </s:form> +</s:form> <div class="center" style="margin-bottom:20px;"> <img src="<s:url value='/img/pollen_%{safeLanguage}.png' />" alt="Pollen logo"/> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/participatedList.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/participatedList.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/participatedList.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -26,11 +26,13 @@ <script type="text/javascript"> var redirectUrl = '<s:url namespace="/user" action="participatedList"/>'; </script> -<%@include file="/WEB-INF/jsp/pollListHelper.jsp"%> +<%@include file="/WEB-INF/jsp/pollListHelper.jsp" %> <title><s:text name="pollen.title.pollsParticipatedList"/></title> -<h1 class="title${pageLogo}"><s:text name="pollen.title.pollsParticipatedList"/></h1> +<h1 class="title<s:property value='%{pageLogo}'/>"> + <s:text name="pollen.title.pollsParticipatedList"/> +</h1> <h4><s:text name="pollen.title.pollsParticipatedList.legend"/></h4> @@ -48,10 +50,13 @@ rowList="10,15,20,50,100" rowNum="10"> <sjg:gridColumn name="id" title="id" hidden="true"/> - <sjg:gridColumn name="title" title='%{getText("pollen.common.title")}' /> - <sjg:gridColumn name="description" title='%{getText("pollen.common.description")}'/> - <sjg:gridColumn name="addingChoices" title='%{getText("pollen.common.addingChoices")}'/> - <sjg:gridColumn name="beginDate" title='%{getText("pollen.common.beginDate")}'/> + <sjg:gridColumn name="title" title='%{getText("pollen.common.title")}'/> + <sjg:gridColumn name="description" + title='%{getText("pollen.common.description")}'/> + <sjg:gridColumn name="addingChoices" + title='%{getText("pollen.common.addingChoices")}'/> + <sjg:gridColumn name="beginDate" + title='%{getText("pollen.common.beginDate")}'/> <sjg:gridColumn name="endDate" title='%{getText("pollen.common.endDate")}'/> <sjg:gridColumn name="functions" title='%{getText("pollen.common.functions")}' formatter="pollFunctions" width="55" sortable="false"/> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/register.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/register.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/register.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -25,7 +25,9 @@ <title><s:text name="pollen.title.register"/></title> -<h1 class="title${pageLogo}"><s:text name="pollen.title.register"/></h1> +<h1 class="title<s:property value='%{pageLogo}'/>"> + <s:text name="pollen.title.register"/> +</h1> <s:form method="POST" key="registerForm"> @@ -33,7 +35,8 @@ <legend><s:text name="pollen.fieldset.connexionInformation"/></legend> <s:textfield name="user.login" key="pollen.common.login" required="true"/> - <s:password name="user.password" key="pollen.common.password" required="true"/> + <s:password name="user.password" key="pollen.common.password" + required="true"/> <s:password name="password2" key="pollen.common.password2" required="true"/> </fieldset> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/show.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/show.jsp 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/show.jsp 2012-06-19 08:18:29 UTC (rev 3519) @@ -25,23 +25,27 @@ <title><s:text name="pollen.title.myAccount"/></title> -<h1 class="title${pageLogo}"><s:text name="pollen.title.myAccount"/></h1> +<h1 class="title<s:property value='%{pageLogo}'/>"> + <s:text name="pollen.title.myAccount"/> +</h1> <s:form method="POST" namespace="/user"> <fieldset> <legend><s:text name="pollen.fieldset.connexionInformation"/></legend> - <s:hidden key="user.topiaId" label="" /> + <s:hidden key="user.topiaId" label=""/> <s:label name="user.login" key="pollen.common.login"/> </fieldset> <fieldset> <legend><s:text name="pollen.fieldset.userInformation"/></legend> - <s:label name="user.email" key="pollen.common.email" /> - <s:label name="user.firstName" value="%{user.firstName}" key="pollen.common.firstName" /> - <s:label name="user.lastName" value="%{user.lastName}" key="pollen.common.lastName" /> + <s:label name="user.email" key="pollen.common.email"/> + <s:label name="user.firstName" value="%{user.firstName}" + key="pollen.common.firstName"/> + <s:label name="user.lastName" value="%{user.lastName}" + key="pollen.common.lastName"/> </fieldset> <br/> <s:submit action="edit" method="input" Modified: trunk/pollen-ui-struts2/src/main/webapp/css/pollCreation.css =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/css/pollCreation.css 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/css/pollCreation.css 2012-06-19 08:18:29 UTC (rev 3519) @@ -20,6 +20,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * #L% */ +.choicesImage { position: absolute; margin-left: 1.3em; } +.choices div { height: 4em; line-height: 1.2em; } +.ui-state-highlight { height: 4em; line-height: 1.2em; } + #pollCreationZone { width: 550px; margin: auto; Modified: trunk/pollen-ui-struts2/src/main/webapp/css/summary.css =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/css/summary.css 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/css/summary.css 2012-06-19 08:18:29 UTC (rev 3519) @@ -20,27 +20,61 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * #L% */ -.ui-widget-content-green { border: 1px solid #aaaaaa; background: #b0f580 url(images/ui-bg_flat_75_b0f580_40x100.png) 50% 50% repeat-x; color: #222222; } -.ui-widget-content-green a { color: #222222; } +.ui-widget-content-green { + border: 1px solid #aaaaaa; + background: #b0f580 url(images/ui-bg_flat_75_b0f580_40x100.png) 50% 50% repeat-x; + color: #222222; +} -.ui-widget-content-yellow { border: 1px solid #aaaaaa; background: #ffffaa url(images/ui-bg_flat_75_ffffaa_40x100.png) 50% 50% repeat-x; color: #222222; } -.ui-widget-content-yellow a { color: #222222; } +.ui-widget-content-green a { + color: #222222; +} -.ui-widget-content-red { border: 1px solid #aaaaaa; background: #FFAAAA url(images/ui-bg_flat_75_ffffaa_40x100.png) 50% 50% repeat-x; color: #222222; } -.ui-widget-content-red a { color: #222222; } +.ui-widget-content-yellow { + border: 1px solid #aaaaaa; + background: #ffffaa url(images/ui-bg_flat_75_ffffaa_40x100.png) 50% 50% repeat-x; + color: #222222; +} -.ui-widget-content-blue { border: 1px solid #dddddd; background: #A9D4E3 url(images/ui-bg_highlight-hard_100_f2f5f7_1x100.png) 50% top repeat-x; color: #362b36; } -.ui-widget-content-blue a { color: #362b36; } +.ui-widget-content-yellow a { + color: #222222; +} +.ui-widget-content-red { + border: 1px solid #aaaaaa; + background: #FFAAAA url(images/ui-bg_flat_75_ffffaa_40x100.png) 50% 50% repeat-x; + color: #222222; +} + +.ui-widget-content-red a { + color: #222222; +} + +.ui-widget-content-blue { + border: 1px solid #dddddd; + background: #A9D4E3 url(images/ui-bg_highlight-hard_100_f2f5f7_1x100.png) 50% top repeat-x; + color: #362b36; +} + +.ui-widget-content-blue a { + color: #362b36; +} + .ui-corner-all { margin-top: 10px; padding: 10px; } .showResultIcon { - background: #FFE3E3 url(../img/count.png) 80% 80% repeat-x; + background: #FFE3E3 url(../img/count.png) 80% 80% repeat-x; } + .imgAction { margin-right: 20px; } +.url { + margin-left: 2em; + background-color: #ffffff; +} + Modified: trunk/pollen-ui-struts2/src/main/webapp/js/createPoll.js =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/js/createPoll.js 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/js/createPoll.js 2012-06-19 08:18:29 UTC (rev 3519) @@ -354,7 +354,8 @@ function updateUpdownActions(containerId) { - var firstChoice = getFirstChoice(containerId); + reorder(containerId); + /*var firstChoice = getFirstChoice(containerId); var lastChoice = getLastChoice(containerId); getAllChoices(containerId).each(function (index) { @@ -381,7 +382,7 @@ //show down downWidget.removeClass('hidden'); } - }); + });*/ } @@ -467,7 +468,7 @@ return false; } -function upChoice(choiceId) { +/*function upChoice(choiceId) { var choice = $('#' + choiceId); var choicePrefix = choice.data('choicePrefix'); var choiceNumber = choice.data('choiceNumber'); @@ -483,9 +484,9 @@ var newChoiceNumber = (choiceNumber + 1); return switchChoices(choicePrefix, choiceNumber, newChoiceNumber); -} +}*/ -function switchChoices( choicePrefix, choiceNumber, newChoiceNumber) { +/*function switchChoices(choicePrefix, choiceNumber, newChoiceNumber) { // change topiaId switchValue(choicePrefix, choiceNumber, newChoiceNumber, '.topiaId'); @@ -537,7 +538,7 @@ //console.info("switch " + choiceTIVal + " to " + newChoiceTIVal); choiceTI.attr("src", newChoiceTIVal); newChoiceTI.attr("src", choiceTIVal); -} +}*/ function confirmClose() { $('.ui-dialog-title').html(datas['confirmCloseTitle']); @@ -566,6 +567,25 @@ $('#registerForm .disableForVoteStarted input[type="file"]').hide(); } +function reorder(containerId) { + + var choices = getAllChoices(containerId); + + choices.each(function (index) { + + var currentChoiceNumber = $(this).data('choiceNumber'); + + var choicePrefix = $(this).data('choicePrefix'); + + $('#' + containerId + "_label_" + currentChoiceNumber).html( + datas['choiceText'] + ' ' + (index + 1)); + + var orderWidget = $('[name="' + choicePrefix + currentChoiceNumber +".order" + '"]'); + + orderWidget.val(index); + }); + +} jQuery(document).ready(function () { function changeChoiceAddAllowed(val) { @@ -668,4 +688,19 @@ $('img[src$="tooltip.png"]').addClass("tooltip"); $('.tooltip').tipTip({ defaultPosition:'top' }); + + $.struts2_jquery.require('js/base/jquery.ui.sortable.js', function () { + + $(".choices").sortable({placeholder:"ui-state-highlight", + update:function (event, ui) { + var item = $(ui.item); + var container = item.data('choiceType'); + var choiceNumber = item.data('choiceNumber'); + console.info('Moved ' + container + ' -- ' + choiceNumber); + reorder(container); + } + }).disableSelection(); + }); + + }); Modified: trunk/pollen-ui-struts2/src/main/webapp/js/favoriteList.js =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/js/favoriteList.js 2012-06-18 17:25:39 UTC (rev 3518) +++ trunk/pollen-ui-struts2/src/main/webapp/js/favoriteList.js 2012-06-19 08:18:29 UTC (rev 3519) @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * #L% */ -function initFavoritePage(action, loadPollActionUrl) { +function initFavoritePage(action) { if (action == 'create') { $('#createForm').show(); } else if (action == 'edit') { @@ -47,7 +47,7 @@ }); // to create a new row - $.listenRowTopic('pollAccounts-addRow', function (event) { + $.listenRowTopic('pollAccounts-addRow', function () { $('#createForm [name="createPollAccount.votingId"]').val(""); $('#createForm [name="createPollAccount.email"]').val(""); $('#deleteForm').hide(); @@ -92,7 +92,7 @@ } function confirmDelete(id) { - $('.ui-dialog-title').html(deleteTitle) + $('.ui-dialog-title').html(deleteTitle); var dialog = $("#confirmDialog"); var url = deleteUrl + '?' + $.param({favoriteListId:favoriteListId, pollAccountId:id,
participants (1)
-
tchemit@users.chorem.org