[pollen] branch feature/permissionPollRestricted updated (260c459 -> aa9fcff)
This is an automated email from the git hooks/post-receive script. New change to branch feature/permissionPollRestricted in repository pollen. See http://git.chorem.org/pollen.git from 260c459 create link with VoterListMember and PollenUser, create permission for VoterListMember new 9f045ec no bouble vote in poll restricted new 3838769 add security for vote visibility, review comment visibility new aa9fcff add button save in all create poll page, fix label-block, improve UI The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit aa9fcffeafb46adede8348d04df289d1fe905b38 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Tue Aug 5 15:53:54 2014 +0200 add button save in all create poll page, fix label-block, improve UI commit 3838769200c66c5f4aac0384ae4cf8ed6c47874c Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Tue Aug 5 15:52:17 2014 +0200 add security for vote visibility, review comment visibility commit 9f045ec0ec348c190f0b3e18fefab20aef202f21 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Tue Aug 5 11:58:25 2014 +0200 no bouble vote in poll restricted Summary of changes: .../org/chorem/pollen/services/bean/PollBean.java | 9 ++ .../pollen/services/service/PollService.java | 2 + .../pollen/services/service/VoteService.java | 9 +- .../services/service/security/SecurityService.java | 98 ++++++++---- .../src/main/webapp/js/controllers/pollCtrl.js | 29 ++-- pollen-ui-angular/src/main/webapp/less/style.less | 168 +++++++++++---------- .../src/main/webapp/less/variables.less | 2 +- .../src/main/webapp/partials/inline-poll.html | 28 ++-- .../src/main/webapp/partials/poll-poll.html | 5 - .../src/main/webapp/partials/poll.html | 6 +- 10 files changed, 214 insertions(+), 142 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/permissionPollRestricted in repository pollen. See http://git.chorem.org/pollen.git commit 9f045ec0ec348c190f0b3e18fefab20aef202f21 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Tue Aug 5 11:58:25 2014 +0200 no bouble vote in poll restricted --- .../org/chorem/pollen/services/bean/PollBean.java | 9 ++++++ .../pollen/services/service/PollService.java | 2 ++ .../services/service/security/SecurityService.java | 34 +++++++++++++++------- .../src/main/webapp/js/controllers/pollCtrl.js | 5 ++++ .../src/main/webapp/partials/inline-poll.html | 28 +++++++++--------- 5 files changed, 54 insertions(+), 24 deletions(-) diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/bean/PollBean.java b/pollen-services/src/main/java/org/chorem/pollen/services/bean/PollBean.java index 66d0115..f0375eb 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/bean/PollBean.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/bean/PollBean.java @@ -101,6 +101,8 @@ public class PollBean extends PollenBean<Poll> { protected boolean voteIsVisible; + protected boolean canVote; + @Override public void fromEntity(Poll entity) { @@ -351,4 +353,11 @@ public class PollBean extends PollenBean<Poll> { this.voteIsVisible = voteIsVisible; } + public boolean isCanVote() { + return canVote; + } + + public void setCanVote(boolean canVote) { + this.canVote = canVote; + } } diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java index 409a4f2..f8bc99e 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java @@ -62,6 +62,8 @@ public class PollService extends PollenServiceSupport { input.setResultIsVisible(isPermitted(PermissionVerb.readPollResult, input.getEntityId())); + input.setCanVote(isPermitted(PermissionVerb.addVote, input.getEntityId())); + return input; } }; diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/security/SecurityService.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/security/SecurityService.java index 0a1d197..9266e17 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/service/security/SecurityService.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/security/SecurityService.java @@ -38,7 +38,6 @@ import org.chorem.pollen.services.bean.PaginationParameterBean; import org.chorem.pollen.services.bean.PollenEntityRef; import org.chorem.pollen.services.service.PollenServiceSupport; import org.nuiton.topia.persistence.TopiaEntity; -import org.nuiton.util.pagination.PaginationParameter; import java.util.*; @@ -362,7 +361,7 @@ public class SecurityService extends PollenServiceSupport { Set<Poll> polls = getPollDao().findAllFreePolls(); for (Poll poll : polls) { - generatePollAccessPermission(permissions, poll); + generatePollPublicPermission(permissions, poll); } if (user == null && pollenPrincipal == null) { @@ -377,15 +376,13 @@ public class SecurityService extends PollenServiceSupport { // Collect all principals Set<PollenPrincipal> principals = Sets.newHashSet(); + Set<Poll> invitedPoll = Sets.newHashSet(); if (pollenPrincipal != null) { principals.add(pollenPrincipal); - Set<Poll> invitedPoll = getPollDao().findByVoterListMemberPermission(pollenPrincipal.getPermission()); + invitedPoll.addAll(getPollDao().findByVoterListMemberPermission(pollenPrincipal.getPermission())); - for (Poll poll : invitedPoll) { - generatePollAccessPermission(permissions, poll); - } } if (user != null) { @@ -398,12 +395,24 @@ public class SecurityService extends PollenServiceSupport { PaginationParameterBean paginationParameter = new PaginationParameterBean(); paginationParameter.setPageNumber(0); paginationParameter.setPageSize(-1); - List<Poll> invitedPoll = getPollDao().findAllInvited(user, paginationParameter.toPaginationParameter()).getElements(); + invitedPoll.addAll(getPollDao().findAllInvited(user, paginationParameter.toPaginationParameter()).getElements()); + + } + + for (Poll poll : invitedPoll) { + generatePollPublicPermission(permissions, poll); - for (Poll poll : invitedPoll) { - generatePollAccessPermission(permissions, poll); + if (poll.getCommentVisibility() == CommentVisibility.VOTER) { + permissions.add(createSubjectPermission(PermissionVerb.readComment, poll)); } + if (poll.getVoteVisibility() == VoteVisibility.VOTER) { + permissions.add(createSubjectPermission(PermissionVerb.readVote, poll)); + } + + if (poll.getResultVisibility() == ResultVisibility.VOTER && (poll.isClosed() || poll.isContinuousResults())) { + permissions.add(createSubjectPermission(PermissionVerb.readPollResult, poll)); + } } PrincipalByType principalByType = resolvePrincipals(principals); @@ -426,6 +435,9 @@ public class SecurityService extends PollenServiceSupport { for(Vote vote: principalByType.votes) { permissions.add(createWildcardSubjectPermission(vote)); + if (vote.getPoll().getPollType() != PollType.FREE) { + permissions.remove(createSubjectPermission(PermissionVerb.addVote, vote.getPoll())); + } } for (Poll poll : principalByType.polls) { @@ -473,7 +485,7 @@ public class SecurityService extends PollenServiceSupport { } - protected void generatePollAccessPermission(Set<String> permissions, Poll poll) { + protected void generatePollPublicPermission(Set<String> permissions, Poll poll) { permissions.add(createSubjectPermission(PermissionVerb.readPoll, poll)); permissions.add(createSubjectPermission(PermissionVerb.addVote, poll)); permissions.add(createSubjectPermission(PermissionVerb.addComment, poll)); @@ -490,7 +502,7 @@ public class SecurityService extends PollenServiceSupport { permissions.add(createSubjectPermission(PermissionVerb.readPollResult, poll)); } - if (poll.isChoiceAddAllowed()) { + if (poll.isChoiceAddAllowed() && !poll.isClosed()) { permissions.add(createSubjectPermission(PermissionVerb.addChoice, poll)); } diff --git a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js index b9ebaab..093bc6e 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js @@ -1158,6 +1158,11 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr } PollVote.add({pollId:$routeParams.pollId, permission:$scope.globalVariables.pollToken}, sendVote, function (returnRequest) { + + if ($scope.data.poll.pollType != 'FREE') { + $scope.data.poll.canVote = false; + } + $scope.data.vote.id = returnRequest.id; $scope.data.vote.permission = returnRequest.permission; diff --git a/pollen-ui-angular/src/main/webapp/partials/inline-poll.html b/pollen-ui-angular/src/main/webapp/partials/inline-poll.html index b330c1b..4ecd5fa 100644 --- a/pollen-ui-angular/src/main/webapp/partials/inline-poll.html +++ b/pollen-ui-angular/src/main/webapp/partials/inline-poll.html @@ -65,7 +65,7 @@ <!-- end print choice --> <!-- begin input vote --> - <tr ng-show="!globalVariables.editMode" ng-if="! data.poll.isClosed"> + <tr ng-show="!globalVariables.editMode" ng-if="data.poll.canVote"> <td class="pollChoice"> <input-error error="data.vote.restError.voterName[0]" data="data.vote.voterName"> <input type="text" class="form-control" placeholder="{{ 'user.name' | translate }}" ng-model="data.vote.voterName" input-error="data.vote.restError.voterName[0]" focus-me="true" /> @@ -128,18 +128,20 @@ </div> </td> <td> - <button class="btn btn-primary" ng-if="vote.permission && !globalVariables.editMode && vote.onEdit" ng-click="saveVote(vote)"> - <span class="glyphicon glyphicon-ok"></span> - </button> - <button class="btn btn-default" ng-if="vote.permission && !globalVariables.editMode && vote.onEdit" ng-click="cancelVote(vote)"> - <span class="glyphicon glyphicon-remove"></span> - </button> - <button class="btn btn-info" ng-if="vote.permission && !globalVariables.editMode && !vote.onEdit" ng-click="editVote(vote)"> - <span class="glyphicon glyphicon-pencil"></span> - </button> - <button class="btn btn-danger" ng-if="vote.permission && !globalVariables.editMode && !vote.onEdit" ng-click="deleteVote(vote)"> - <span class="glyphicon glyphicon-trash"></span> - </button> + <div ng-if="!data.poll.isClosed"> + <button class="btn btn-primary" ng-if="vote.permission && !globalVariables.editMode && vote.onEdit" ng-click="saveVote(vote)"> + <span class="glyphicon glyphicon-ok"></span> + </button> + <button class="btn btn-default" ng-if="vote.permission && !globalVariables.editMode && vote.onEdit" ng-click="cancelVote(vote)"> + <span class="glyphicon glyphicon-remove"></span> + </button> + <button class="btn btn-info" ng-if="vote.permission && !globalVariables.editMode && !vote.onEdit" ng-click="editVote(vote)"> + <span class="glyphicon glyphicon-pencil"></span> + </button> + <button class="btn btn-danger" ng-if="vote.permission && !globalVariables.editMode && !vote.onEdit" ng-click="deleteVote(vote)"> + <span class="glyphicon glyphicon-trash"></span> + </button> + </div> </td> </tr> <!-- end print vote --> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/permissionPollRestricted in repository pollen. See http://git.chorem.org/pollen.git commit 3838769200c66c5f4aac0384ae4cf8ed6c47874c Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Tue Aug 5 15:52:17 2014 +0200 add security for vote visibility, review comment visibility --- .../pollen/services/service/VoteService.java | 9 ++- .../services/service/security/SecurityService.java | 88 +++++++++++++++------- .../src/main/webapp/js/controllers/pollCtrl.js | 24 +++--- 3 files changed, 78 insertions(+), 43 deletions(-) diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/VoteService.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/VoteService.java index b1bf6ad..4096c22 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/service/VoteService.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/VoteService.java @@ -81,7 +81,14 @@ public class VoteService extends PollenServiceSupport { checkNotNull(pollId); Poll poll = getPollService().getPoll0(pollId); - List<Vote> votes = getVotes0(poll); + List<Vote> allVotes = getVotes0(poll); + List<Vote> votes = new ArrayList<>(); + + for (Vote vote : allVotes) { + if (isPermitted(PermissionVerb.readVote, vote.getTopiaId())) { + votes.add(vote); + } + } List<VoteBean> voteBeans = toBeanList(VoteBean.class, votes, voteBeanFunction); return voteBeans; diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/security/SecurityService.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/security/SecurityService.java index 9266e17..09c9d23 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/service/security/SecurityService.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/security/SecurityService.java @@ -400,19 +400,7 @@ public class SecurityService extends PollenServiceSupport { } for (Poll poll : invitedPoll) { - generatePollPublicPermission(permissions, poll); - - if (poll.getCommentVisibility() == CommentVisibility.VOTER) { - permissions.add(createSubjectPermission(PermissionVerb.readComment, poll)); - } - - if (poll.getVoteVisibility() == VoteVisibility.VOTER) { - permissions.add(createSubjectPermission(PermissionVerb.readVote, poll)); - } - - if (poll.getResultVisibility() == ResultVisibility.VOTER && (poll.isClosed() || poll.isContinuousResults())) { - permissions.add(createSubjectPermission(PermissionVerb.readPollResult, poll)); - } + generatePollVoterPermission(permissions, poll); } PrincipalByType principalByType = resolvePrincipals(principals); @@ -438,6 +426,10 @@ public class SecurityService extends PollenServiceSupport { if (vote.getPoll().getPollType() != PollType.FREE) { permissions.remove(createSubjectPermission(PermissionVerb.addVote, vote.getPoll())); } + + if (vote.getPoll().getVoteVisibility() == VoteVisibility.VOTER) { + generatePollVoterPermission(permissions, vote.getPoll()); + } } for (Poll poll : principalByType.polls) { @@ -456,11 +448,13 @@ public class SecurityService extends PollenServiceSupport { } // add vote permissions - List<Vote> votes = getVoteDao().forPollEquals(poll).findAll(); - if (CollectionUtils.isNotEmpty(votes)) { - for (Vote vote : votes) { - permissions.add(createSubjectPermission(PermissionVerb.readVote, vote)); + + if (poll.getVoteVisibility() != VoteVisibility.ANONYMOUS) { + if ( CollectionUtils.isNotEmpty(votes) ) { + for ( Vote vote : votes ) { + permissions.add(createSubjectPermission(PermissionVerb.readVote, vote)); + } } } @@ -487,15 +481,36 @@ public class SecurityService extends PollenServiceSupport { protected void generatePollPublicPermission(Set<String> permissions, Poll poll) { permissions.add(createSubjectPermission(PermissionVerb.readPoll, poll)); - permissions.add(createSubjectPermission(PermissionVerb.addVote, poll)); permissions.add(createSubjectPermission(PermissionVerb.addComment, poll)); + if (!poll.isClosed()) { + permissions.add(createSubjectPermission(PermissionVerb.addVote, poll)); + } + if (poll.getCommentVisibility() == CommentVisibility.EVERYBODY) { permissions.add(createSubjectPermission(PermissionVerb.readComment, poll)); + + // add comment permissions + + List<Comment> comments = getCommentDao().forPollEquals(poll).findAll(); + if (CollectionUtils.isNotEmpty(comments)) { + for (Comment comment : comments) { + permissions.add(createSubjectPermission(PermissionVerb.readComment, comment)); + } + } } if (poll.getVoteVisibility() == VoteVisibility.EVERYBODY) { permissions.add(createSubjectPermission(PermissionVerb.readVote, poll)); + + // add vote permissions + + List<Vote> votes = getVoteDao().forPollEquals(poll).findAll(); + if (CollectionUtils.isNotEmpty(votes)) { + for (Vote vote : votes) { + permissions.add(createSubjectPermission(PermissionVerb.readVote, vote)); + } + } } if (poll.getResultVisibility() == ResultVisibility.EVERYBODY && (poll.isClosed() || poll.isContinuousResults())) { @@ -515,23 +530,40 @@ public class SecurityService extends PollenServiceSupport { } } - // add comment permissions + } + + protected void generatePollVoterPermission(Set<String> permissions, Poll poll) { + generatePollPublicPermission(permissions, poll); + + if (poll.getCommentVisibility() == CommentVisibility.VOTER) { + permissions.add(createSubjectPermission(PermissionVerb.readComment, poll)); - List<Comment> comments = getCommentDao().forPollEquals(poll).findAll(); - if (CollectionUtils.isNotEmpty(comments)) { - for (Comment comment : comments) { - permissions.add(createSubjectPermission(PermissionVerb.readComment, comment)); + // add comment permissions + + List<Comment> comments = getCommentDao().forPollEquals(poll).findAll(); + if (CollectionUtils.isNotEmpty(comments)) { + for (Comment comment : comments) { + permissions.add(createSubjectPermission(PermissionVerb.readComment, comment)); + } } } - // add vote permissions + if (poll.getVoteVisibility() == VoteVisibility.VOTER) { + permissions.add(createSubjectPermission(PermissionVerb.readVote, poll)); - List<Vote> votes = getVoteDao().forPollEquals(poll).findAll(); - if (CollectionUtils.isNotEmpty(votes)) { - for (Vote vote : votes) { - permissions.add(createSubjectPermission(PermissionVerb.readVote, vote)); + // add vote permissions + + List<Vote> votes = getVoteDao().forPollEquals(poll).findAll(); + if (CollectionUtils.isNotEmpty(votes)) { + for (Vote vote : votes) { + permissions.add(createSubjectPermission(PermissionVerb.readVote, vote)); + } } } + + if (poll.getResultVisibility() == ResultVisibility.VOTER && (poll.isClosed() || poll.isContinuousResults())) { + permissions.add(createSubjectPermission(PermissionVerb.readPollResult, poll)); + } } protected PrincipalByType resolvePrincipals(Set<PollenPrincipal> principals) { diff --git a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js index 093bc6e..1405d47 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js @@ -1089,23 +1089,19 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr $scope.data.choices = choices; }).$promise; - if ($scope.data.poll.voteIsVisible) { - pollChoicePromise.then(function () { - PollVote.query({pollId:$routeParams.pollId, permission:$routeParams.voteToken}, function (votes) { - $scope.data.votants = votes; - angular.forEach($scope.data.votants, function (voter) { - angular.forEach(voter.choice, function (choice) { - choice.voteValue = $scope.getVoteValue(choice.voteValue); - }); - for (var i = voter.choice.length; i < $scope.data.choices.length; ++i) { - voter.choice.push({choiceId: $scope.data.choices[i].id, voteValue : $scope.getVoteValue(null)}); - } + pollChoicePromise.then(function () { + PollVote.query({pollId:$routeParams.pollId, permission:$routeParams.voteToken}, function (votes) { + $scope.data.votants = votes; + angular.forEach($scope.data.votants, function (voter) { + angular.forEach(voter.choice, function (choice) { + choice.voteValue = $scope.getVoteValue(choice.voteValue); }); + for (var i = voter.choice.length; i < $scope.data.choices.length; ++i) { + voter.choice.push({choiceId: $scope.data.choices[i].id, voteValue : $scope.getVoteValue(null)}); + } }); }); - } else { - $scope.data.votants = []; - } + }); $q.all([$scope.pollDeferred.promise, pollChoicePromise]).then(function() { initVote(); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/permissionPollRestricted in repository pollen. See http://git.chorem.org/pollen.git commit aa9fcffeafb46adede8348d04df289d1fe905b38 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Tue Aug 5 15:53:54 2014 +0200 add button save in all create poll page, fix label-block, improve UI --- pollen-ui-angular/src/main/webapp/less/style.less | 168 +++++++++++---------- .../src/main/webapp/less/variables.less | 2 +- .../src/main/webapp/partials/poll-poll.html | 5 - .../src/main/webapp/partials/poll.html | 6 +- 4 files changed, 94 insertions(+), 87 deletions(-) diff --git a/pollen-ui-angular/src/main/webapp/less/style.less b/pollen-ui-angular/src/main/webapp/less/style.less index c1c3ae3..d87a1b9 100644 --- a/pollen-ui-angular/src/main/webapp/less/style.less +++ b/pollen-ui-angular/src/main/webapp/less/style.less @@ -49,8 +49,8 @@ body { /* global min width */ @media screen and (max-width: @responsive-min-width) { - #content, #pollenMenu, #pollenMenu .container-fluid, #poll-link, footer { - width:@responsive-min-width !important; + body, footer, #pollenMenu { + width:@responsive-min-width; } } @@ -157,10 +157,6 @@ body { .transition(margin linear @short-time-transition); } - label.label-block { - display:block !important; - } - } @@ -217,68 +213,109 @@ body { } } - -.pollTitle, .pollDesc { - margin-top:15px; - min-height:60px; - border-radius:5px; - padding-left:5px; - margin-bottom:30px; -} - -.pollAnim { - background-color:inherit; - .transition(background @time-transition ease); - - .fade(); - - .voteTrue { - .fade(0); +#poll-content { + h4 { + font-weight: bold; + border-left: 8px solid; + padding-left: 4px; + color: #555; } - .voteFalse { - .fade(0); + .pollTitle, .pollDesc { + margin-top:15px; + min-height:60px; + border-radius:5px; + padding-left:5px; + margin-bottom:30px; } - &:hover { - background:@borderColor; + .pollAnim { + background-color:inherit; .transition(background @time-transition ease); + .fade(); + .voteTrue { - background-color: lighten(@brand-success, 15%); - .transition(background @time-transition ease); + .fade(0); } .voteFalse { - background-color: lighten(@brand-danger, 15%); + .fade(0); + } + + &:hover { + background:@borderColor; .transition(background @time-transition ease); + + .voteTrue { + background-color: lighten(@brand-success, 15%); + .transition(background @time-transition ease); + } + + .voteFalse { + background-color: lighten(@brand-danger, 15%); + .transition(background @time-transition ease); + } } } -} -#poll { - text-align:center; + #poll { + text-align:center; + + table { + margin:auto; + margin-bottom:8px; + } + + #poll-inline { + .btn-large { + height:60px; + width:80px; + } - table { - margin:auto; - margin-bottom:8px; + img { + max-width: @preview-size; + max-height: @preview-size; + } + + .spinner { + height:64px; + width:150x !important; + z-index:1000 !important; + } + } } - #poll-inline { - .btn-large { - height:60px; - width:80px; + .pollBigChoice { + border-bottom:1px solid @borderColor; + text-align:right; + + h3 { + background-color:rgba(0,0,0,0.1); + padding:5px; + height:40px; + + input[type=text] { + width:99%; + text-align:right; + } } - img { - max-width: @preview-size; - max-height: @preview-size; + button { + height:30px; } - .spinner { - height:64px; - width:150x !important; - z-index:1000 !important; + p { + text-align:justify; + white-space:pre-line; + } + textarea { + width:99%; + } + + .pollChoiceInput { + margin-top:20px; + text-align:center; } } } @@ -326,39 +363,6 @@ body { visibility:hidden; } -.pollBigChoice { - border-bottom:1px solid @borderColor; - text-align:right; - - h3 { - background-color:rgba(0,0,0,0.1); - padding:5px; - height:40px; - - input[type=text] { - width:99%; - text-align:right; - } - } - - button { - height:30px; - } - - p { - text-align:justify; - white-space:pre-line; - } - textarea { - width:99%; - } - - .pollChoiceInput { - margin-top:20px; - text-align:center; - } -} - .pool-alert { position: fixed; top:@height-pollen-menu + 10px; @@ -463,6 +467,10 @@ hr { border-top:1px solid #CCCCCC; } +label.label-block { + display:block !important; +} + .table-result { margin-left: auto; margin-right: auto; diff --git a/pollen-ui-angular/src/main/webapp/less/variables.less b/pollen-ui-angular/src/main/webapp/less/variables.less index 911be87..9189273 100644 --- a/pollen-ui-angular/src/main/webapp/less/variables.less +++ b/pollen-ui-angular/src/main/webapp/less/variables.less @@ -34,7 +34,7 @@ @height-footer: 20px; @responsive-large-width : 1024px; -@responsive-min-width : 770px; +@responsive-min-width : 800px; @responsive-height: 600px; @preview-size:200px; diff --git a/pollen-ui-angular/src/main/webapp/partials/poll-poll.html b/pollen-ui-angular/src/main/webapp/partials/poll-poll.html index cca1a46..bb0dff9 100644 --- a/pollen-ui-angular/src/main/webapp/partials/poll-poll.html +++ b/pollen-ui-angular/src/main/webapp/partials/poll-poll.html @@ -44,8 +44,3 @@ <div ng-include="templateURL"></div> </div> - -<div ng-if="globalVariables.create"> - <hr/> - <button class="btn btn-primary" ng-click="savePoll()"><span class="glyphicon glyphicon-save"></span> {{ 'action.save' | translate }}</button> -</div> diff --git a/pollen-ui-angular/src/main/webapp/partials/poll.html b/pollen-ui-angular/src/main/webapp/partials/poll.html index d29a04c..ea5863a 100644 --- a/pollen-ui-angular/src/main/webapp/partials/poll.html +++ b/pollen-ui-angular/src/main/webapp/partials/poll.html @@ -50,6 +50,11 @@ <div ng-include="'./partials/poll-settings.html'" ng-if="tab == 'conf'" class="anim-fade"></div> <div ng-include="'./partials/poll-listParticipant.html'" ng-if="tab == 'participant'" class="anim-fade"></div> + + <div> + <hr/> + <button class="btn btn-primary" ng-click="savePoll()"><span class="glyphicon glyphicon-save"></span> {{ 'action.save' | translate }}</button> + </div> </div> @@ -57,7 +62,6 @@ <div ng-include="'./partials/poll-result.html'" ng-if="tab == 'result'" ng-controller="PollResultCtrl" class="anim-fade"></div> - </div> <div ng-include="'./partials/poll-link.html'" id="poll-link" ng-class="{'mini-link': globalVariables.minify}" ng-show="data.poll.id"></div> \ No newline at end of file -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm