Commit d46acfb7b1b90aec8867a54bda2245f1dd38022b
1 parent
bc210052
Exists in
master
and in
29 other branches
social-share: allows users to set networks they want always on
I decided to use the local storage approach offered by the plugin and not the cookie approach because this information is irrelevant to the server so it doesn't make much sense to send it to the server along with every request (like cookies). (ActionItem3238)
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
plugins/social_share_privacy/lib/social_share_privacy_plugin.rb
... | ... | @@ -21,9 +21,10 @@ class SocialSharePrivacyPlugin < Noosfero::Plugin |
21 | 21 | settings = Noosfero::Plugin::Settings.new(environment, SocialSharePrivacyPlugin) |
22 | 22 | locale = FastGettext.locale |
23 | 23 | javascript_include_tag('plugins/social_share_privacy/socialshareprivacy/javascripts/socialshareprivacy.js') + |
24 | + javascript_include_tag('plugins/social_share_privacy/socialshareprivacy/javascripts/localstorage.js') + | |
24 | 25 | javascript_include_tag(settings.get_setting(:networks).map { |service| "plugins/social_share_privacy/socialshareprivacy/javascripts/modules/#{service}.js" }) + |
25 | 26 | (locale != 'en' ? javascript_include_tag("plugins/social_share_privacy/socialshareprivacy/javascripts/locale/jquery.socialshareprivacy.min.#{locale}.js") : '') + |
26 | - javascript_tag("jQuery.fn.socialSharePrivacy.settings.path_prefix = '../../plugins/social_share_privacy/socialshareprivacy/'; jQuery.fn.socialSharePrivacy.settings.order = #{settings.get_setting(:networks)}; jQuery(document).ready(function () { jQuery('.social-buttons').socialSharePrivacy({perma_option: false, info_link_target: '_blank'});});") + | |
27 | + javascript_tag("jQuery.fn.socialSharePrivacy.settings.path_prefix = '../../plugins/social_share_privacy/socialshareprivacy/'; jQuery.fn.socialSharePrivacy.settings.order = #{settings.get_setting(:networks)}; jQuery(document).ready(function () { jQuery('.social-buttons').socialSharePrivacy({info_link_target: '_blank'});});") + | |
27 | 28 | content_tag(:div, '', :class => "social-buttons") |
28 | 29 | end |
29 | 30 | end | ... | ... |