diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 87c9cd862..ed6074c6e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -71,4 +71,8 @@ module ApplicationHelper def all_services_connected? current_user.services.size == AppConfig[:configured_services].size end + + def popover_with_close_html(without_close_html) + without_close_html + "#{link_to(image_tag('deletelabel.png'), "#", :class => 'close')}" + end end diff --git a/app/views/shared/_publisher.html.haml b/app/views/shared/_publisher.html.haml index 20982f675..f51a3802e 100644 --- a/app/views/shared/_publisher.html.haml +++ b/app/views/shared/_publisher.html.haml @@ -19,32 +19,7 @@ :javascript $(document).ready(function() { - $("#publisher .dropdown").popover({trigger: 'manual', offset: 10, placement:'below'}); - $("#publisher .dropdown").bind("click", function(){$(this).popover("hide")}); - - $("#publisher #status_message_fake_text").popover({trigger: 'manual', placement: 'right', offset: 30, id: "first_message_explain"}); - $("#publisher #status_message_fake_text").bind("click", function(){$(this).popover("hide")}); - - $("#gs-shim").popover({trigger: 'manual', placement: 'left', offset: -5}); - $("#gs-shim").bind("click", function(){$(this).popover("hide")}); - - setTimeout(function(){ - $("#publisher #status_message_fake_text").popover("show"); - }, 600); - - setTimeout(function(){ - $("#publisher .dropdown").popover("show"); - }, 1000); - - setTimeout(function(){ - $("#gs-shim").popover("show"); - }, 1400); - - $("#publisher .button.creation").bind("click", function(){ - $("#publisher .dropdown").popover("hide"); - $("#publisher #status_message_fake_text").popover("hide"); - $("#gs-shim").popover("hide"); - }); + Publisher.triggerGettingStarted(); }); #publisher.closed{:class => ((aspect == :profile)? 'mention_popup' : nil )} @@ -57,7 +32,7 @@ = link_to( image_tag('deletelabel.png'), "#", :id => "hide_publisher", :title => t('.discard_post')) %ul#photodropzone = status.text_area :fake_text, :rows => 2, :value => h(publisher_formatted_text), :tabindex => 1, :placeholder => t('.whats_on_your_mind'), - :title => "1. #{t('shared.public_explain.share')}", 'data-content' => t('shared.public_explain.new_user_welcome_message') + :title => "#{popover_with_close_html("1. #{t('shared.public_explain.share')}")}", 'data-content' => t('shared.public_explain.new_user_welcome_message') = status.hidden_field :text, :value => h(publisher_hidden_text), :class => 'clear_on_submit' #file-upload{:title => t('.upload_photos')} diff --git a/public/javascripts/publisher.js b/public/javascripts/publisher.js index 0e0b8ff1e..cf093856b 100644 --- a/public/javascripts/publisher.js +++ b/public/javascripts/publisher.js @@ -454,7 +454,7 @@ var Publisher = { triggerGettingStarted: function(){ Publisher.setUpPopovers("#publisher .dropdown", {trigger: 'manual', offset: 10, placement:'below'}, 1000); - Publisher.setUpPopovers("#publisher #status_message_fake_text", {trigger: 'manual', placement: 'right', offset: 30, id: "first_message_explain"}, 600); + Publisher.setUpPopovers("#publisher #status_message_fake_text", {trigger: 'manual', placement: 'right', offset: 30, id: "first_message_explain", html:true}, 600); Publisher.setUpPopovers("#gs-shim", {trigger: 'manual', placement: 'left', offset: -5}, 1400); $("#publisher .button.creation").bind("click", function(){ diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index c459533b9..daa3c2c1d 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -3453,3 +3453,7 @@ a.toggle_selector #tag_following_submit &.hidden :display none + +.popover + .close + :float right