diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/app/views/publisher/poll_creator_view.js | 5 | ||||
-rw-r--r-- | app/assets/javascripts/app/views/publisher_view.js | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/comments.css.scss | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/new_styles/_forms.scss | 7 | ||||
-rw-r--r-- | app/assets/stylesheets/publisher.css.scss | 15 | ||||
-rw-r--r-- | app/assets/stylesheets/publisher_blueprint.css.scss | 11 | ||||
-rw-r--r-- | app/assets/templates/comment-stream_tpl.jst.hbs | 2 | ||||
-rw-r--r-- | app/assets/templates/poll_creator_tpl.jst.hbs | 25 | ||||
-rw-r--r-- | app/controllers/admins_controller.rb | 2 | ||||
-rw-r--r-- | app/helpers/report_helper.rb | 2 | ||||
-rw-r--r-- | app/presenters/statistics_presenter.rb | 4 | ||||
-rw-r--r-- | app/views/admins/weekly_user_stats.haml | 2 | ||||
-rw-r--r-- | app/views/passwords/edit.mobile.haml | 8 | ||||
-rw-r--r-- | app/views/passwords/new.haml | 2 | ||||
-rw-r--r-- | app/views/passwords/new.mobile.haml | 8 | ||||
-rw-r--r-- | app/views/publisher/_publisher_blueprint.html.haml | 2 | ||||
-rw-r--r-- | app/views/publisher/_publisher_bootstrap.html.haml | 12 |
17 files changed, 60 insertions, 51 deletions
diff --git a/app/assets/javascripts/app/views/publisher/poll_creator_view.js b/app/assets/javascripts/app/views/publisher/poll_creator_view.js index ebc6755aa..f443801c5 100644 --- a/app/assets/javascripts/app/views/publisher/poll_creator_view.js +++ b/app/assets/javascripts/app/views/publisher/poll_creator_view.js @@ -71,15 +71,14 @@ app.views.PublisherPollCreator = app.views.Base.extend({ }, validateInput: function(input){ - var wrapper = input.parents('.control-group'); var isValid = this.isValidInput(input); if(isValid){ - wrapper.removeClass('error'); + input.removeClass('error'); return true; } else { - wrapper.addClass('error'); + input.addClass('error'); return false; } }, diff --git a/app/assets/javascripts/app/views/publisher_view.js b/app/assets/javascripts/app/views/publisher_view.js index 2f20a3b44..a14b55df7 100644 --- a/app/assets/javascripts/app/views/publisher_view.js +++ b/app/assets/javascripts/app/views/publisher_view.js @@ -123,7 +123,7 @@ app.views.Publisher = Backbone.View.extend({ this.view_uploader.on('change', this.checkSubmitAvailability, this); this.view_poll_creator = new app.views.PublisherPollCreator({ - el: this.$('#publisher-poll-creator') + el: this.$('#poll_creator_container') }); this.view_poll_creator.on('change', this.checkSubmitAvailability, this); this.view_poll_creator.render(); diff --git a/app/assets/stylesheets/comments.css.scss b/app/assets/stylesheets/comments.css.scss index 5d4e45361..d9d13eb98 100644 --- a/app/assets/stylesheets/comments.css.scss +++ b/app/assets/stylesheets/comments.css.scss @@ -38,5 +38,5 @@ width: 95%; } .comment_box { width: 95%; } - .comment_box:focus { min-height: 100px; } + .comment_box:focus, .comment_box:valid { min-height: 100px; } } diff --git a/app/assets/stylesheets/new_styles/_forms.scss b/app/assets/stylesheets/new_styles/_forms.scss index a6ecf1569..15aeddeac 100644 --- a/app/assets/stylesheets/new_styles/_forms.scss +++ b/app/assets/stylesheets/new_styles/_forms.scss @@ -87,11 +87,16 @@ form.block-form { } textarea, input[type=text], input[type=password], input[type=search] { - &:focus, &:invalid:focus { + &:focus, + &:invalid, + &:invalid:focus, + &:invalid:required, + &:invalid:required:focus { border: 1px solid $border-dark-grey; outline: none; -webkit-box-shadow: none; box-shadow: none; + color : $text-dark-grey; } } diff --git a/app/assets/stylesheets/publisher.css.scss b/app/assets/stylesheets/publisher.css.scss index 696f573d6..6326d8ea1 100644 --- a/app/assets/stylesheets/publisher.css.scss +++ b/app/assets/stylesheets/publisher.css.scss @@ -50,7 +50,7 @@ border-radius: 3px; border: 1px solid $border-dark-grey; - input[type='text'] { + input[type='text']#status_message_text { border: none; box-shadow: none; margin: none; @@ -87,13 +87,22 @@ border-top: 1px dashed $border-grey; } - #poll_creator_wrapper { - display:none; + .row-fluid#poll_creator_container { + display: none; border-top: 1px dashed $border-grey; padding:4px 6px 4px 6px; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; + .remove-answer.entypo.cross { + display: none; + color: lighten($black,75%); + &.active { display: block; } + &:hover { color: $black; } + line-height: 30px; + font-size: 18px; + cursor: pointer; + } } &.with_location .row-fluid#location_container { diff --git a/app/assets/stylesheets/publisher_blueprint.css.scss b/app/assets/stylesheets/publisher_blueprint.css.scss index 97dd3b56d..95ea2ac45 100644 --- a/app/assets/stylesheets/publisher_blueprint.css.scss +++ b/app/assets/stylesheets/publisher_blueprint.css.scss @@ -344,7 +344,7 @@ } } -#publisher-poll-creator { +#poll_creator_container { border: 1px solid $border-dark-grey; padding: 5px; margin-top: 5px; @@ -379,19 +379,18 @@ } } .poll-answer { + .span1, .span11 { display: inline-block; } + .span11 { width: 96%; } input { - width: 96%; + width: 100%; display: inline-block; vertical-align: bottom; } .remove-answer { - width: 14px; - height: 14px; @include opacity(0.4); cursor: pointer; - vertical-align: top; - margin-top: 7px; display: none; + line-height: 27px; &:hover { @include opacity(1); diff --git a/app/assets/templates/comment-stream_tpl.jst.hbs b/app/assets/templates/comment-stream_tpl.jst.hbs index abcc20324..2525f1c5b 100644 --- a/app/assets/templates/comment-stream_tpl.jst.hbs +++ b/app/assets/templates/comment-stream_tpl.jst.hbs @@ -20,7 +20,7 @@ <div class="bd"> <form accept-charset="UTF-8" action="/posts/{{id}}/comments" class="new_comment" id="new_comment_on_{{id}}" method="post"> - <textarea class="comment_box" id="comment_text_on_{{id}}" name="text" rows="2" placeholder="{{t "stream.comment"}}" /> + <textarea class="comment_box" id="comment_text_on_{{id}}" name="text" rows="2" required placeholder="{{t "stream.comment"}}" /> <div class="submit_button"> <input class="button creation" id="comment_submit_{{id}}" name="commit" type="submit" value="{{t "stream.comment"}}" /> </div> diff --git a/app/assets/templates/poll_creator_tpl.jst.hbs b/app/assets/templates/poll_creator_tpl.jst.hbs index f71d46f01..ea5ce6207 100644 --- a/app/assets/templates/poll_creator_tpl.jst.hbs +++ b/app/assets/templates/poll_creator_tpl.jst.hbs @@ -1,20 +1,21 @@ <div class="poll-question control-group"> - <div class="controls"> - <input class="span12" placeholder="{{t 'publisher.question' }}" type="text" name="poll_question"> - </div> + <input class="input-block-level" placeholder="{{t 'publisher.question' }}" type="text" name="poll_question"> </div> <div class="poll-answers"> - <div class="poll-answer control-group"> - <div class="controls"> - <input type="text" name="poll_answers[]" placeholder="{{t 'publisher.option' }}"> - <div class="remove-answer icons-deletelabel"></div> + <div class="poll-answer row-fluid"> + <div class="span11"> + <input type="text" class="input-block-level" name="poll_answers[]" placeholder="{{t 'publisher.option' }}"> + </div> + <div class="span1"> + <i class="remove-answer entypo cross"></i> </div> </div> - <div class="poll-answer control-group"> - <div class="controls"> - <input type="text" name="poll_answers[]" placeholder="{{t 'publisher.option' }}"> - <div class="remove-answer icons-deletelabel"></div> + <div class="poll-answer row-fluid"> + <div class="span11"> + <input type="text" class="input-block-level" name="poll_answers[]" placeholder="{{t 'publisher.option' }}"> + </div> + <div class="span1"> + <i class="remove-answer entypo cross"></i> </div> </div> </div> - diff --git a/app/controllers/admins_controller.rb b/app/controllers/admins_controller.rb index 2ce13ca0e..badca5317 100644 --- a/app/controllers/admins_controller.rb +++ b/app/controllers/admins_controller.rb @@ -41,7 +41,7 @@ class AdminsController < Admin::AdminController @created_users_by_week[week] << u.username end - @selected_week = params[:week] || @created_users_by_week.keys.first + @selected_week = params[:week] || @created_users_by_week.keys.last @counter = @created_users_by_week[@selected_week].count end diff --git a/app/helpers/report_helper.rb b/app/helpers/report_helper.rb index 10509ccfd..2170e3665 100644 --- a/app/helpers/report_helper.rb +++ b/app/helpers/report_helper.rb @@ -9,7 +9,7 @@ module ReportHelper elsif type == 'comment' && !(comment = Comment.find_by_id(id)).nil? # comment_message is not html_safe. To prevent # cross-site-scripting we have to escape html - raw t('report.comment_label', data: h(comment_message(comment))) + raw t('report.comment_label', data: link_to(h(comment_message(comment)), post_path(comment.post.id, anchor: comment.guid))) else raw t('report.not_found') end diff --git a/app/presenters/statistics_presenter.rb b/app/presenters/statistics_presenter.rb index a3bcb8b32..f723fc639 100644 --- a/app/presenters/statistics_presenter.rb +++ b/app/presenters/statistics_presenter.rb @@ -4,7 +4,8 @@ class StatisticsPresenter result = { 'name' => AppConfig.settings.pod_name, 'version' => AppConfig.version_string, - 'registrations_open' => AppConfig.settings.enable_registrations + 'registrations_open' => AppConfig.settings.enable_registrations, + 'services' => [] } if AppConfig.privacy.statistics.user_counts? result['total_users'] = User.count @@ -17,6 +18,7 @@ class StatisticsPresenter if AppConfig.privacy.statistics.comment_counts? result['local_comments'] = self.local_comments end + result["services"] = Configuration::KNOWN_SERVICES.select {|service| AppConfig["services.#{service}.enable"]}.map(&:to_s) Configuration::KNOWN_SERVICES.each do |service, options| result[service.to_s] = AppConfig["services.#{service}.enable"] end diff --git a/app/views/admins/weekly_user_stats.haml b/app/views/admins/weekly_user_stats.haml index 2a56d2b8d..61ba8edec 100644 --- a/app/views/admins/weekly_user_stats.haml +++ b/app/views/admins/weekly_user_stats.haml @@ -7,7 +7,7 @@ %div.pull-right = form_tag('/admins/weekly_user_stats', method: 'get', class: 'form-inline') do - = select_tag(:week, options_for_select(@created_users_by_week.keys), selected: @selected_week) + = select_tag(:week, options_for_select(@created_users_by_week.keys.reverse), selected: @selected_week) = submit_tag t('admins.stats.go'), class: 'btn btn-primary' = t('.amount_of', count: @counter) diff --git a/app/views/passwords/edit.mobile.haml b/app/views/passwords/edit.mobile.haml index db592f77c..18c97e636 100644 --- a/app/views/passwords/edit.mobile.haml +++ b/app/views/passwords/edit.mobile.haml @@ -10,20 +10,20 @@ = f.hidden_field :reset_password_token %fieldset %legend - =t('.change_password') + =t('devise.passwords.edit.change_password') .control-group - = f.label :password, t('password'), :class => "control-label" + = f.label :password, t('devise.passwords.edit.new_password'), :class => "control-label" .controls = f.password_field :password .control-group - = f.label :password_confirmation, t('password_confirmation'), :class => "control-label" + = f.label :password_confirmation, t('devise.passwords.edit.confirm_password'), :class => "control-label" .controls = f.password_field :password_confirmation .controls - = f.submit t('.change_password'), :class => 'btn primary' + = f.submit t('devise.passwords.edit.change_password'), :class => 'btn primary' %footer = link_to t('layouts.application.toggle'), toggle_mobile_path diff --git a/app/views/passwords/new.haml b/app/views/passwords/new.haml index 9ffcca124..9ee0347e5 100644 --- a/app/views/passwords/new.haml +++ b/app/views/passwords/new.haml @@ -5,6 +5,8 @@ %h1{id: "huge-text"}= AppConfig.settings.pod_name = form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => {:class => "form-horizontal block-form"}, :autocomplete => 'off') do |f| + %legend + %i= t('devise.passwords.new.no_account') unless devise_error_messages!.empty? %fieldset .control-group %label{class: "control-label", for: "user_email", style: "width: 40%; text-align: center; padding: 10px 0; overflow: hidden"} diff --git a/app/views/passwords/new.mobile.haml b/app/views/passwords/new.mobile.haml index ea60939b3..dee951b4e 100644 --- a/app/views/passwords/new.mobile.haml +++ b/app/views/passwords/new.mobile.haml @@ -8,17 +8,17 @@ = form_for(resource, :as => resource_name, :url => password_path(resource_name)) do |f| %fieldset %legend - =t('.forgot_password') + =t('devise.passwords.new.forgot_password') - unless devise_error_messages!.empty? - %i= t('.no_account') + %i= t('devise.passwords.new.no_account') .control-group - = f.label :email, t('email'), :class => "control-label" + = f.label :email, t('devise.passwords.new.email'), :class => "control-label" .controls = f.text_field :email .controls - = f.submit t('.send_password_instructions'), :class => 'btn' + = f.submit t('devise.passwords.new.send_password_instructions'), :class => 'btn' %footer - if display_registration_link? diff --git a/app/views/publisher/_publisher_blueprint.html.haml b/app/views/publisher/_publisher_blueprint.html.haml index b54a3e716..b43ea5512 100644 --- a/app/views/publisher/_publisher_blueprint.html.haml +++ b/app/views/publisher/_publisher_blueprint.html.haml @@ -37,7 +37,7 @@ = image_tag 'icons/camera.png', :alt => t('shared.publisher.upload_photos').titleize, :class => 'publisher_image' = hidden_field :location, :coords #location_container - #publisher-poll-creator + #poll_creator_container - if publisher_public = hidden_field_tag 'aspect_ids[]', "public" diff --git a/app/views/publisher/_publisher_bootstrap.html.haml b/app/views/publisher/_publisher_bootstrap.html.haml index 627f7258e..77c506702 100644 --- a/app/views/publisher/_publisher_bootstrap.html.haml +++ b/app/views/publisher/_publisher_bootstrap.html.haml @@ -22,16 +22,8 @@ %ul#photodropzone .row-fluid#location_container = hidden_field :location, :coords - .row-fluid#poll_creator_wrapper - #poll_question_wrapper{:class => "input-block-level"} - %input{:id => 'poll_question', :placeholder => t('shared.publisher.poll.question'), :name => 'poll_question', :class=> "form-control"} - .poll_answer - %input{:class => 'form-control poll_answer_input', :placeholder => t('shared.publisher.poll.option'), :name => 'poll_answers[]'} - .remove_poll_answer.btn.btn-link{:title => t('shared.publisher.poll.remove_poll_answer')} - %i.entypo.trash - #add_poll_answer_wrapper - #add_poll_answer{:class => 'btn btn-default'} - = t('shared.publisher.poll.add_poll_answer') + .row-fluid#poll_creator_container + -# handlebars template .row-fluid#button_container #publisher-images.pull-right #poll_creator.btn.btn-link{:title => t('shared.publisher.poll.add_a_poll')} |