diff --git a/Changelog.md b/Changelog.md index 84f822686..98cc06be1 100644 --- a/Changelog.md +++ b/Changelog.md @@ -38,6 +38,7 @@ * Remove private post content from "also commented" mails [#5931](https://github.com/diaspora/diaspora/pull/5931) * Add a button to follow/unfollow tags to the mobile interface [#5941](https://github.com/diaspora/diaspora/pull/5941) * Add a "Manage followed tags" page to mass unfollow tags in the mobile interface [#5945](https://github.com/diaspora/diaspora/pull/5945) +* Add popover/tooltip about email visibility to registration/settings page [#5956](https://github.com/diaspora/diaspora/pull/5956) # 0.5.0.1 diff --git a/app/assets/javascripts/app/pages/registration.js b/app/assets/javascripts/app/pages/registration.js new file mode 100644 index 000000000..fec226363 --- /dev/null +++ b/app/assets/javascripts/app/pages/registration.js @@ -0,0 +1,10 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later +app.pages.Registration = Backbone.View.extend({ + initialize: function() { + $("input#user_email").popover({ + placement: "left", + trigger: "focus" + }).popover("show"); + } +}); +// @license-end diff --git a/app/assets/javascripts/app/pages/settings.js b/app/assets/javascripts/app/pages/settings.js new file mode 100644 index 000000000..c111d5681 --- /dev/null +++ b/app/assets/javascripts/app/pages/settings.js @@ -0,0 +1,7 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later +app.pages.Settings = Backbone.View.extend({ + initialize: function() { + $(".settings_visibilty").tooltip({placement: "top"}); + } +}); +// @license-end diff --git a/app/assets/javascripts/app/router.js b/app/assets/javascripts/app/router.js index d471f9c98..8cefd3f1a 100644 --- a/app/assets/javascripts/app/router.js +++ b/app/assets/javascripts/app/router.js @@ -7,6 +7,8 @@ app.Router = Backbone.Router.extend({ "help": "help", "contacts": "contacts", "conversations": "conversations", + "user/edit": "settings", + "users/sign_up": "registration", //new hotness "posts/:id": "singlePost", @@ -60,6 +62,14 @@ app.Router = Backbone.Router.extend({ app.conversations = new app.views.Conversations(); }, + registration: function() { + app.page = new app.pages.Registration(); + }, + + settings: function() { + app.page = new app.pages.Settings(); + }, + singlePost : function(id) { this.renderPage(function(){ return new app.pages.SinglePostViewer({ id: id })}); }, diff --git a/app/assets/stylesheets/new_styles/_settings.scss b/app/assets/stylesheets/new_styles/_settings.scss index f0679ed8a..88e181e88 100644 --- a/app/assets/stylesheets/new_styles/_settings.scss +++ b/app/assets/stylesheets/new_styles/_settings.scss @@ -18,3 +18,5 @@ max-width: 200px; margin-bottom: 10px; } + +.settings_visibilty { margin-left: 10px; } diff --git a/app/views/registrations/_form.haml b/app/views/registrations/_form.haml index ea851bae8..f4a904294 100644 --- a/app/views/registrations/_form.haml +++ b/app/views/registrations/_form.haml @@ -2,9 +2,15 @@ %fieldset %label - = f.label :user_email, t('registrations.new.email'), class: 'control-label' + = f.label :user_email, t("registrations.new.email"), class: "control-label" %i.entypo.mail - = f.email_field :email, class: "input-block-level form-control", placeholder: t('registrations.new.email'), title: t('registrations.new.enter_email'), required: true + = f.email_field :email, + autofocus: true, + class: "input-block-level form-control", + data: {content: t("users.edit.your_email_private")}, + placeholder: t("registrations.new.email"), + required: true, + title: t("registrations.new.enter_email") %label.control-label{for: "user_username"} = t('registrations.new.username') diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index 08bf521df..78f6f8780 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -25,7 +25,8 @@ .span6 %h3 = t('.your_email') - %small= t('.your_email_private') + %i.entypo.lock.gray.settings_visibilty{title: t("users.edit.your_email_private")} + = form_for 'user', :url => user_path, :html => { :method => :put } do |f| = f.error_messages .form-inline