From 077d8fd2fef6a9ac2fe8cd7a79dafa267ffe5fcc Mon Sep 17 00:00:00 2001 From: Andrej Kacian <andrej@kacian.sk> Date: Thu, 4 Aug 2011 21:23:57 +0200 Subject: [PATCH] Fixes #1587 by changing globe icon tooltip when switching between public and limited post in publisher. --- app/views/shared/_publisher.html.haml | 2 +- config/locales/diaspora/en.yml | 1 - config/locales/javascript/javascript.en.yml | 2 ++ public/javascripts/publisher.js | 10 +++++++++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/views/shared/_publisher.html.haml b/app/views/shared/_publisher.html.haml index da22fe96ba..d899c3d02a 100644 --- a/app/views/shared/_publisher.html.haml +++ b/app/views/shared/_publisher.html.haml @@ -40,7 +40,7 @@ = t("shared.publisher.click_to_share_with") - if aspect == :all || aspect == :profile = status.hidden_field(:public) - = image_tag "icons/globe.png", :title => t('.public'), :class => 'public_icon dim', :width => 16, :height => 16 + = image_tag "icons/globe.png", :title => t('javascripts.publisher.limited'), :class => 'public_icon dim', :width => 16, :height => 16 - if current_user.services - for service in current_user.services = image_tag "social_media_logos/#{service.provider}-16x16.png", :title => service.provider.titleize, :class => "service_icon dim", :id =>"#{service.provider}", :maxchar => "#{service.class::MAX_CHARACTERS}" diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index e46ecb82ae..9060cff596 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -662,7 +662,6 @@ en: share_with: "share with" whats_on_your_mind: "What's on your mind?" publishing_to: "publishing to: " - public: "Public" click_to_share_with: "Click to share with: " discard_post: "Discard post" add_contact: diff --git a/config/locales/javascript/javascript.en.yml b/config/locales/javascript/javascript.en.yml index ac4ac2ff4b..f32bb50f7b 100644 --- a/config/locales/javascript/javascript.en.yml +++ b/config/locales/javascript/javascript.en.yml @@ -29,6 +29,8 @@ en: search_for: "Search for {{name}}" publisher: at_least_one_aspect: "You must publish to at least one aspect" + limited: "Limited - your post will only be seen by people you are sharing with" + public: "Public - your post will be visible to everyone and found by search engines" infinite_scroll: no_more: "No more posts." web_sockets: diff --git a/public/javascripts/publisher.js b/public/javascripts/publisher.js index e86e6aea5f..6f60543b68 100644 --- a/public/javascripts/publisher.js +++ b/public/javascripts/publisher.js @@ -291,7 +291,15 @@ var Publisher = { $(this).toggleClass("dim"); var public_field= $("#publisher #status_message_public"); - (public_field.val() == 'false') ? (public_field.val('true')) : (public_field.val('false')); + if (public_field.val() == 'false') { + public_field.val('true'); + $(this).attr('title', Diaspora.widgets.i18n.t('publisher.public')); + } else { + public_field.val('false'); + $(this).attr('title', Diaspora.widgets.i18n.t('publisher.limited')); + } + + $(this).mouseover(); }); }, toggleServiceField: function(service){ -- GitLab