Loading Changelog.md +1 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ * Merge migrations from before 0.6.0.0 to CreateSchema [#7580](https://github.com/diaspora/diaspora/pull/7580) * Remove auto detection of languages with highlightjs [#7591](https://github.com/diaspora/diaspora/pull/7591) * Move enable/disable notification icon [#7592](https://github.com/diaspora/diaspora/pull/7592) * Use Bootstrap 3 progress-bar for polls [#7600](https://github.com/diaspora/diaspora/pull/7600) ## Bug fixes * Fix displaying polls with long answers [#7579](https://github.com/diaspora/diaspora/pull/7579) Loading app/assets/javascripts/app/views/poll_view.js +7 −7 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ app.views.Poll = app.views.Base.extend({ events: { "click .submit" : "clickSubmit", "click .toggle_result" : "toggleResult" "click .toggle-result": "toggleResult" }, initialize: function() { Loading Loading @@ -55,7 +55,7 @@ app.views.Poll = app.views.Base.extend({ percent = Math.round(answer.vote_count / participation_count * 100); } var progressBar = _this.$(".poll_progress_bar[data-answerid="+answer.id+"]"); var progressBar = _this.$(".progress-bar[data-answerid=" + answer.id + "]"); _this.setProgressBarData(progressBar, percent); }); Loading @@ -68,8 +68,8 @@ app.views.Poll = app.views.Base.extend({ pollButtons: function() { if(!this.poll || !this.poll.post_id) { this.$('.submit').attr('disabled', true); this.$('.toggle_result').attr('disabled', true); this.$(".submit").attr("disabled", true); this.$(".toggle-result").attr("disabled", true); } }, Loading @@ -83,14 +83,14 @@ app.views.Poll = app.views.Base.extend({ } this.toggleElements(); var toggle_result = this.$('.toggle_result'); var toggleResult = this.$(".toggle-result"); if(!this.toggleMode) { toggle_result.html(Diaspora.I18n.t("poll.close_result")); toggleResult.html(Diaspora.I18n.t("poll.close_result")); this.toggleMode = 1; } else { toggle_result.html(Diaspora.I18n.t("poll.show_result")); toggleResult.html(Diaspora.I18n.t("poll.show_result")); this.toggleMode = 0; } }, Loading app/assets/stylesheets/color_themes/_color_theme_override_dark.scss +2 −2 Original line number Diff line number Diff line Loading @@ -19,9 +19,9 @@ body { .info .tag { background-color: $gray-light; } .poll_form .progress { .poll-form .progress { background-color: $gray-dark; .bar { background-color: $gray-light; } .progress-bar { background-color: $gray-light; } .users-vote { background-color: $brand-primary; } } Loading app/assets/stylesheets/poll.scss +7 −18 Original line number Diff line number Diff line .poll_form { .poll-form { border-bottom: 1px solid $border-grey; border-top: 1px solid $border-grey; margin: 10px 0; Loading @@ -14,38 +14,27 @@ } .progress { background-image: none; box-shadow: 0 0 0; height: 10px; margin-bottom: 5px; clear: both; .bar { background: $border-dark-grey none; color: $text-dark-grey; height: 100%; text-align: left; } .users-vote { background-color: $brand-primary; } .progress-bar { background-color: $border-dark-grey; } .users-vote { background-color: $brand-primary; } } .submit[disabled] { color: $text-grey; cursor: default; &:hover, &:active { background-image: none; } } } .poll-content { margin-top: 5px; .result-head { margin-bottom: 5px; } [type=radio], label { font-weight: normal; Loading app/assets/templates/poll_tpl.jst.hbs +21 −19 Original line number Diff line number Diff line {{#if poll}} <div class="poll_form"> <div class="poll_head"> <div class="poll-form"> <div class="poll-head"> <strong>{{poll.question}}</strong> <div class="poll_statistic pull-right"> <div class="poll-statistic pull-right"> {{t "poll.count" count=poll.participation_count}} </div> </div> Loading @@ -12,6 +12,7 @@ {{/if}} {{#poll.poll_answers}} <div class="result-row"> <div class="result-head"> <input type="radio" name="vote" value="{{id}}"/> {{#if isCurrentUserVote}} <label> Loading @@ -25,11 +26,12 @@ <span class="percentage"></span> ({{t "poll.answer_count" count=vote_count}}) </div> <div class="poll_progress_bar_wrapper progress"> </div> <div class="progress"> {{#if isCurrentUserVote}} <div class="poll_progress_bar bar users-vote" data-answerid="{{id}}" style="height: 100%"></div> <div class="progress-bar users-vote" data-answerid="{{id}}" style="height: 100%"></div> {{else}} <div class="poll_progress_bar bar" data-answerid="{{id}}" style="height: 100%"></div> <div class="progress-bar" data-answerid="{{id}}" style="height: 100%"></div> {{/if}} </div> </div> Loading @@ -39,7 +41,7 @@ {{#if preview}} <span>{{t "poll.show_result"}}</span> {{else}} <a class="toggle_result" href="#">{{t "poll.show_result"}}</a> <a class="toggle-result" href="#">{{t "poll.show_result"}}</a> {{/if}} </div> <input type="submit" class="submit pull-right btn btn-default" value="{{t "poll.vote"}}"/> Loading Loading
Changelog.md +1 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ * Merge migrations from before 0.6.0.0 to CreateSchema [#7580](https://github.com/diaspora/diaspora/pull/7580) * Remove auto detection of languages with highlightjs [#7591](https://github.com/diaspora/diaspora/pull/7591) * Move enable/disable notification icon [#7592](https://github.com/diaspora/diaspora/pull/7592) * Use Bootstrap 3 progress-bar for polls [#7600](https://github.com/diaspora/diaspora/pull/7600) ## Bug fixes * Fix displaying polls with long answers [#7579](https://github.com/diaspora/diaspora/pull/7579) Loading
app/assets/javascripts/app/views/poll_view.js +7 −7 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ app.views.Poll = app.views.Base.extend({ events: { "click .submit" : "clickSubmit", "click .toggle_result" : "toggleResult" "click .toggle-result": "toggleResult" }, initialize: function() { Loading Loading @@ -55,7 +55,7 @@ app.views.Poll = app.views.Base.extend({ percent = Math.round(answer.vote_count / participation_count * 100); } var progressBar = _this.$(".poll_progress_bar[data-answerid="+answer.id+"]"); var progressBar = _this.$(".progress-bar[data-answerid=" + answer.id + "]"); _this.setProgressBarData(progressBar, percent); }); Loading @@ -68,8 +68,8 @@ app.views.Poll = app.views.Base.extend({ pollButtons: function() { if(!this.poll || !this.poll.post_id) { this.$('.submit').attr('disabled', true); this.$('.toggle_result').attr('disabled', true); this.$(".submit").attr("disabled", true); this.$(".toggle-result").attr("disabled", true); } }, Loading @@ -83,14 +83,14 @@ app.views.Poll = app.views.Base.extend({ } this.toggleElements(); var toggle_result = this.$('.toggle_result'); var toggleResult = this.$(".toggle-result"); if(!this.toggleMode) { toggle_result.html(Diaspora.I18n.t("poll.close_result")); toggleResult.html(Diaspora.I18n.t("poll.close_result")); this.toggleMode = 1; } else { toggle_result.html(Diaspora.I18n.t("poll.show_result")); toggleResult.html(Diaspora.I18n.t("poll.show_result")); this.toggleMode = 0; } }, Loading
app/assets/stylesheets/color_themes/_color_theme_override_dark.scss +2 −2 Original line number Diff line number Diff line Loading @@ -19,9 +19,9 @@ body { .info .tag { background-color: $gray-light; } .poll_form .progress { .poll-form .progress { background-color: $gray-dark; .bar { background-color: $gray-light; } .progress-bar { background-color: $gray-light; } .users-vote { background-color: $brand-primary; } } Loading
app/assets/stylesheets/poll.scss +7 −18 Original line number Diff line number Diff line .poll_form { .poll-form { border-bottom: 1px solid $border-grey; border-top: 1px solid $border-grey; margin: 10px 0; Loading @@ -14,38 +14,27 @@ } .progress { background-image: none; box-shadow: 0 0 0; height: 10px; margin-bottom: 5px; clear: both; .bar { background: $border-dark-grey none; color: $text-dark-grey; height: 100%; text-align: left; } .users-vote { background-color: $brand-primary; } .progress-bar { background-color: $border-dark-grey; } .users-vote { background-color: $brand-primary; } } .submit[disabled] { color: $text-grey; cursor: default; &:hover, &:active { background-image: none; } } } .poll-content { margin-top: 5px; .result-head { margin-bottom: 5px; } [type=radio], label { font-weight: normal; Loading
app/assets/templates/poll_tpl.jst.hbs +21 −19 Original line number Diff line number Diff line {{#if poll}} <div class="poll_form"> <div class="poll_head"> <div class="poll-form"> <div class="poll-head"> <strong>{{poll.question}}</strong> <div class="poll_statistic pull-right"> <div class="poll-statistic pull-right"> {{t "poll.count" count=poll.participation_count}} </div> </div> Loading @@ -12,6 +12,7 @@ {{/if}} {{#poll.poll_answers}} <div class="result-row"> <div class="result-head"> <input type="radio" name="vote" value="{{id}}"/> {{#if isCurrentUserVote}} <label> Loading @@ -25,11 +26,12 @@ <span class="percentage"></span> ({{t "poll.answer_count" count=vote_count}}) </div> <div class="poll_progress_bar_wrapper progress"> </div> <div class="progress"> {{#if isCurrentUserVote}} <div class="poll_progress_bar bar users-vote" data-answerid="{{id}}" style="height: 100%"></div> <div class="progress-bar users-vote" data-answerid="{{id}}" style="height: 100%"></div> {{else}} <div class="poll_progress_bar bar" data-answerid="{{id}}" style="height: 100%"></div> <div class="progress-bar" data-answerid="{{id}}" style="height: 100%"></div> {{/if}} </div> </div> Loading @@ -39,7 +41,7 @@ {{#if preview}} <span>{{t "poll.show_result"}}</span> {{else}} <a class="toggle_result" href="#">{{t "poll.show_result"}}</a> <a class="toggle-result" href="#">{{t "poll.show_result"}}</a> {{/if}} </div> <input type="submit" class="submit pull-right btn btn-default" value="{{t "poll.vote"}}"/> Loading