[pollen] branch develop updated (edc785d -> 6d1af24)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository pollen. See http://git.chorem.org/pollen.git from edc785d fix conflit of error new 6d1af24 view voterName when scroll left in inline-poll The 1 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 6d1af24919704986c1d095637f9e8dfb0037799d Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Fri Aug 22 15:07:15 2014 +0200 view voterName when scroll left in inline-poll Summary of changes: .../mainCtrl.js => scripts/sticky-inline-poll.js} | 23 +++++++++------------ pollen-ui-angular/src/main/webapp/less/style.less | 24 +++++++++++++++++++--- .../src/main/webapp/less/variables.less | 4 ++++ .../src/main/webapp/partials/inline-poll.html | 4 +++- .../src/main/webapp/partials/poll-poll.html | 2 +- 5 files changed, 39 insertions(+), 18 deletions(-) copy pollen-ui-angular/src/main/webapp/js/{controllers/mainCtrl.js => scripts/sticky-inline-poll.js} (61%) -- 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 develop in repository pollen. See http://git.chorem.org/pollen.git commit 6d1af24919704986c1d095637f9e8dfb0037799d Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Fri Aug 22 15:07:15 2014 +0200 view voterName when scroll left in inline-poll --- .../main/webapp/js/scripts/sticky-inline-poll.js | 32 ++++++++++++++++++++++ pollen-ui-angular/src/main/webapp/less/style.less | 24 ++++++++++++++-- .../src/main/webapp/less/variables.less | 4 +++ .../src/main/webapp/partials/inline-poll.html | 4 ++- .../src/main/webapp/partials/poll-poll.html | 2 +- 5 files changed, 61 insertions(+), 5 deletions(-) diff --git a/pollen-ui-angular/src/main/webapp/js/scripts/sticky-inline-poll.js b/pollen-ui-angular/src/main/webapp/js/scripts/sticky-inline-poll.js new file mode 100644 index 0000000..a38d128 --- /dev/null +++ b/pollen-ui-angular/src/main/webapp/js/scripts/sticky-inline-poll.js @@ -0,0 +1,32 @@ +/* + * #%L + * Pollen :: UI (Angular) + * %% + * Copyright (C) 2009 - 2014 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ + +$(window).scroll(function() { + var pollInline = $('#poll-inline'); + var elementPosition = pollInline.offset(); + elementPosition.left -= parseInt($('#poll-content').css('marginLeft'), 10); + + if($(window).scrollLeft() > elementPosition.left){ + pollInline.find('tr td:first-child').not('.static').addClass("sticky").css('left', $(window).scrollLeft() - elementPosition.left); + } else { + pollInline.find('tr td:first-child').not('.static').removeClass("sticky"); + } +}); diff --git a/pollen-ui-angular/src/main/webapp/less/style.less b/pollen-ui-angular/src/main/webapp/less/style.less index 754196b..b236ab5 100644 --- a/pollen-ui-angular/src/main/webapp/less/style.less +++ b/pollen-ui-angular/src/main/webapp/less/style.less @@ -18,7 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * #L% */ - + @import "variables.less"; html { @@ -30,6 +30,7 @@ body { margin:0; min-height:100%; padding-bottom: 4rem; + background-color: @background-color; } #pollenMenu { @@ -303,6 +304,24 @@ body { } #poll-inline { + + border-collapse: separate; + border-spacing: 0px; + + tr td { + height: 60px; + + &:first-child { + background-color: @background-color; + + + &.sticky { + position: relative; + display: block; + } + } + } + .btn-large { height:60px; width:80px; @@ -362,13 +381,12 @@ body { .pollChoice { - min-width:150px; padding: 10px 5px 5px; text-align:center; border:1px solid @border-color; input[type=text]{ - width:140px; + width:@width-input-vote; } input[type=checkbox]{ width:25px; diff --git a/pollen-ui-angular/src/main/webapp/less/variables.less b/pollen-ui-angular/src/main/webapp/less/variables.less index 0b94e75..fd5b19b 100644 --- a/pollen-ui-angular/src/main/webapp/less/variables.less +++ b/pollen-ui-angular/src/main/webapp/less/variables.less @@ -27,6 +27,8 @@ @short-time-transition : 0.2s; @long-time-transition : 1.6s; +@background-color: #fff; + @border-color : #dddddd; @danger-color : @brand-danger; @@ -43,6 +45,8 @@ @preview-size:200px; +@width-input-vote: 160px; + .fade(@time) { &.ng-enter { .transition(all @time ease @time); 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 9c1af2c..9b886c6 100644 --- a/pollen-ui-angular/src/main/webapp/partials/inline-poll.html +++ b/pollen-ui-angular/src/main/webapp/partials/inline-poll.html @@ -22,7 +22,7 @@ <table id="poll-inline"> <!-- begin print choices --> <tr> - <td> + <td class="static"> <!--<button ng-click="bigVersion()" class="btn btn-default" >Big version</button>--> </td> <td ng-repeat="choice in data.choices" class="pollChoice pollAnim" ng-mouseenter="showEditHover = true" ng-mouseleave="showEditHover = false"> @@ -146,3 +146,5 @@ </tr> <!-- end print vote --> </table> + +<script language="javascript" type="text/javascript" src="../js/scripts/sticky-inline-poll.js"></script> 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 1d00e5c..b897e46 100644 --- a/pollen-ui-angular/src/main/webapp/partials/poll-poll.html +++ b/pollen-ui-angular/src/main/webapp/partials/poll-poll.html @@ -20,7 +20,7 @@ --> <div class="pollTitle" edit-me="showEditTitle" novalidate> <h1 ng-hide="showEditTitle"> - <span tooltip="{{ 'poll.edit' | translate }}">{{data.poll.title || 'poll.edit' | translate }}</span> <span class="fa fa-pencil" showonhoverparent></span> + <span tooltip="{{ 'poll.edit' | translate }}">{{data.poll.title || 'poll.edit' | translate }}</span> <span ng-if="true" class="fa fa-pencil" showonhoverparent></span> <info-error error="restError.title[0]" data="data.poll.title" append-class="fa-lg"></info-error> </h1> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm