1.diff (59348B)
1 diff --git a/html_header.php b/html_header.php 2 new file mode 100644 3 index 0000000..2f0e482 4 --- /dev/null 5 +++ b/html_header.php 6 @@ -0,0 +1,20 @@ 7 + <script type="text/javascript" src="../../core/libs/theme_engine/jquery/jquery-1.11.2.min.js"></script> 8 + <script type="text/javascript" src="../../core/backend/admin/modules/share_buttons/socialshareprivacy/js/jquery.socialshareprivacy.min.js"></script> 9 + <script type="text/javascript"> 10 + jQuery(document).ready(function($){ 11 + if($('#socialshareprivacy').length > 0){ 12 + $('#socialshareprivacy').socialSharePrivacy({ 13 + services : { 14 + facebook : { 15 + 'perma_option' : 'on' 16 + }, 17 + gplus : { 18 + } 19 + }, 20 + "css_path" : "../../core/backend/admin/modules/share_buttons/socialshareprivacy/socialshareprivacy.css", 21 + "lang_path" : "../../core/backend/admin/modules/share_buttons/socialshareprivacy/lang/", 22 + "language" : "de" 23 + }); 24 + } 25 + }); 26 + </script> 27 \ No newline at end of file 28 diff --git a/post_footer.php b/post_footer.php 29 new file mode 100644 30 index 0000000..cc2dcaf 31 --- /dev/null 32 +++ b/post_footer.php 33 @@ -0,0 +1 @@ 34 +<div id="socialshareprivacy"></div> 35 \ No newline at end of file 36 diff --git a/socialshareprivacy/images/2-klick-logo.jpg b/socialshareprivacy/images/2-klick-logo.jpg 37 new file mode 100644 38 index 0000000..f7079fc 39 Binary files /dev/null and b/socialshareprivacy/images/2-klick-logo.jpg differ 40 diff --git a/socialshareprivacy/images/dummy_facebook.png b/socialshareprivacy/images/dummy_facebook.png 41 new file mode 100644 42 index 0000000..870743d 43 Binary files /dev/null and b/socialshareprivacy/images/dummy_facebook.png differ 44 diff --git a/socialshareprivacy/images/dummy_facebook_dark.png b/socialshareprivacy/images/dummy_facebook_dark.png 45 new file mode 100644 46 index 0000000..054baf8 47 Binary files /dev/null and b/socialshareprivacy/images/dummy_facebook_dark.png differ 48 diff --git a/socialshareprivacy/images/dummy_facebook_en.png b/socialshareprivacy/images/dummy_facebook_en.png 49 new file mode 100644 50 index 0000000..bfb0a53 51 Binary files /dev/null and b/socialshareprivacy/images/dummy_facebook_en.png differ 52 diff --git a/socialshareprivacy/images/dummy_facebook_like.png b/socialshareprivacy/images/dummy_facebook_like.png 53 new file mode 100644 54 index 0000000..2c851a2 55 Binary files /dev/null and b/socialshareprivacy/images/dummy_facebook_like.png differ 56 diff --git a/socialshareprivacy/images/dummy_facebook_share_de.png b/socialshareprivacy/images/dummy_facebook_share_de.png 57 new file mode 100644 58 index 0000000..a8e076d 59 Binary files /dev/null and b/socialshareprivacy/images/dummy_facebook_share_de.png differ 60 diff --git a/socialshareprivacy/images/dummy_facebook_share_de_dark.png b/socialshareprivacy/images/dummy_facebook_share_de_dark.png 61 new file mode 100644 62 index 0000000..42fc413 63 Binary files /dev/null and b/socialshareprivacy/images/dummy_facebook_share_de_dark.png differ 64 diff --git a/socialshareprivacy/images/dummy_facebook_share_en.png b/socialshareprivacy/images/dummy_facebook_share_en.png 65 new file mode 100644 66 index 0000000..23aafbc 67 Binary files /dev/null and b/socialshareprivacy/images/dummy_facebook_share_en.png differ 68 diff --git a/socialshareprivacy/images/dummy_facebook_share_en_dark.png b/socialshareprivacy/images/dummy_facebook_share_en_dark.png 69 new file mode 100644 70 index 0000000..3aea384 71 Binary files /dev/null and b/socialshareprivacy/images/dummy_facebook_share_en_dark.png differ 72 diff --git a/socialshareprivacy/images/dummy_gplus.png b/socialshareprivacy/images/dummy_gplus.png 73 new file mode 100644 74 index 0000000..1708345 75 Binary files /dev/null and b/socialshareprivacy/images/dummy_gplus.png differ 76 diff --git a/socialshareprivacy/images/dummy_gplus_alt.png b/socialshareprivacy/images/dummy_gplus_alt.png 77 new file mode 100644 78 index 0000000..d04e1f4 79 Binary files /dev/null and b/socialshareprivacy/images/dummy_gplus_alt.png differ 80 diff --git a/socialshareprivacy/images/dummy_gplus_dark.png b/socialshareprivacy/images/dummy_gplus_dark.png 81 new file mode 100644 82 index 0000000..6bcade1 83 Binary files /dev/null and b/socialshareprivacy/images/dummy_gplus_dark.png differ 84 diff --git a/socialshareprivacy/images/dummy_twitter.png b/socialshareprivacy/images/dummy_twitter.png 85 new file mode 100644 86 index 0000000..fb18fd6 87 Binary files /dev/null and b/socialshareprivacy/images/dummy_twitter.png differ 88 diff --git a/socialshareprivacy/images/dummy_twitter_dark.png b/socialshareprivacy/images/dummy_twitter_dark.png 89 new file mode 100644 90 index 0000000..24cacee 91 Binary files /dev/null and b/socialshareprivacy/images/dummy_twitter_dark.png differ 92 diff --git a/socialshareprivacy/images/facebook_share_de.png b/socialshareprivacy/images/facebook_share_de.png 93 new file mode 100644 94 index 0000000..ab71395 95 Binary files /dev/null and b/socialshareprivacy/images/facebook_share_de.png differ 96 diff --git a/socialshareprivacy/images/facebook_share_de_dark.png b/socialshareprivacy/images/facebook_share_de_dark.png 97 new file mode 100644 98 index 0000000..a960984 99 Binary files /dev/null and b/socialshareprivacy/images/facebook_share_de_dark.png differ 100 diff --git a/socialshareprivacy/images/facebook_share_en.png b/socialshareprivacy/images/facebook_share_en.png 101 new file mode 100644 102 index 0000000..d86cbc6 103 Binary files /dev/null and b/socialshareprivacy/images/facebook_share_en.png differ 104 diff --git a/socialshareprivacy/images/facebook_share_en_dark.png b/socialshareprivacy/images/facebook_share_en_dark.png 105 new file mode 100644 106 index 0000000..5125d83 107 Binary files /dev/null and b/socialshareprivacy/images/facebook_share_en_dark.png differ 108 diff --git a/socialshareprivacy/images/settings.png b/socialshareprivacy/images/settings.png 109 new file mode 100644 110 index 0000000..d21192e 111 Binary files /dev/null and b/socialshareprivacy/images/settings.png differ 112 diff --git a/socialshareprivacy/images/settings_dark.png b/socialshareprivacy/images/settings_dark.png 113 new file mode 100644 114 index 0000000..c875670 115 Binary files /dev/null and b/socialshareprivacy/images/settings_dark.png differ 116 diff --git a/socialshareprivacy/images/socialshareprivacy_info.png b/socialshareprivacy/images/socialshareprivacy_info.png 117 new file mode 100644 118 index 0000000..160d420 119 Binary files /dev/null and b/socialshareprivacy/images/socialshareprivacy_info.png differ 120 diff --git a/socialshareprivacy/images/socialshareprivacy_info_dark.png b/socialshareprivacy/images/socialshareprivacy_info_dark.png 121 new file mode 100644 122 index 0000000..2052c76 123 Binary files /dev/null and b/socialshareprivacy/images/socialshareprivacy_info_dark.png differ 124 diff --git a/socialshareprivacy/images/socialshareprivacy_on_off.png b/socialshareprivacy/images/socialshareprivacy_on_off.png 125 new file mode 100644 126 index 0000000..03f4969 127 Binary files /dev/null and b/socialshareprivacy/images/socialshareprivacy_on_off.png differ 128 diff --git a/socialshareprivacy/images/socialshareprivacy_on_off_dark.png b/socialshareprivacy/images/socialshareprivacy_on_off_dark.png 129 new file mode 100644 130 index 0000000..1ade18f 131 Binary files /dev/null and b/socialshareprivacy/images/socialshareprivacy_on_off_dark.png differ 132 diff --git a/socialshareprivacy/js/jquery.socialshareprivacy.js b/socialshareprivacy/js/jquery.socialshareprivacy.js 133 new file mode 100644 134 index 0000000..8ad1a1f 135 --- /dev/null 136 +++ b/socialshareprivacy/js/jquery.socialshareprivacy.js 137 @@ -0,0 +1,445 @@ 138 +/* 139 + * jquery.socialshareprivacy.js | 2 Klicks fuer mehr Datenschutz (1.6) 140 + * 141 + * http://www.heise.de/extras/socialshareprivacy/ 142 + * http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html 143 + * 144 + * Copyright (c) 2011-2014 Hilko Holweg, Sebastian Hilbig, Nicolas Heiringhoff, Juergen Schmidt, 145 + * Heise Zeitschriften Verlag GmbH & Co. KG, http://www.heise.de 146 + * 147 + * is released under the MIT License http://www.opensource.org/licenses/mit-license.php 148 + * 149 + * Spread the word, link to us if you can. 150 + */ 151 +(function ($) { 152 + 153 + "use strict"; 154 + 155 + // 156 + // helper functions 157 + // 158 + 159 + // abbreviate at last blank before length and add "\u2026" (horizontal ellipsis) 160 + function abbreviateText(text, length) { 161 + var abbreviated = decodeURIComponent(text); 162 + if (abbreviated.length <= length) { 163 + return text; 164 + } 165 + 166 + var lastWhitespaceIndex = abbreviated.substring(0, length - 1).lastIndexOf(' '); 167 + abbreviated = encodeURIComponent(abbreviated.substring(0, lastWhitespaceIndex)) + "\u2026"; 168 + 169 + return abbreviated; 170 + } 171 + 172 + // returns content of <meta name="" content=""> tags or '' if empty/non existant 173 + function getMeta(name) { 174 + var metaContent = $('meta[name="' + name + '"]').attr('content'); 175 + return metaContent || ''; 176 + } 177 + 178 + // create tweet text from content of <meta name="DC.title"> and <meta name="DC.creator"> 179 + // fallback to content of <title> tag 180 + function getTweetText() { 181 + var title = getMeta('DC.title'); 182 + var creator = getMeta('DC.creator'); 183 + 184 + if (title.length > 0 && creator.length > 0) { 185 + title += ' - ' + creator; 186 + } else { 187 + title = $('title').text(); 188 + } 189 + 190 + return encodeURIComponent(title); 191 + } 192 + 193 + // build URI from rel="canonical" or document.location 194 + function getURI() { 195 + var uri = document.location.href; 196 + var canonical = $("link[rel=canonical]").attr("href"); 197 + 198 + if (canonical && canonical.length > 0) { 199 + if (canonical.indexOf("http") < 0) { 200 + canonical = document.location.protocol + "//" + document.location.host + canonical; 201 + } 202 + uri = canonical; 203 + } 204 + 205 + return uri; 206 + } 207 + 208 + function cookieSet(name, value, days, path, domain) { 209 + var expires = new Date(); 210 + expires.setTime(expires.getTime() + (days * 24 * 60 * 60 * 1000)); 211 + document.cookie = name + '=' + value + '; expires=' + expires.toUTCString() + '; path=' + path + '; domain=' + domain; 212 + } 213 + function cookieDel(name, value, path, domain) { 214 + var expires = new Date(); 215 + expires.setTime(expires.getTime() - 100); 216 + document.cookie = name + '=' + value + '; expires=' + expires.toUTCString() + '; path=' + path + '; domain=' + domain; 217 + } 218 + 219 + // extend jquery with our plugin function 220 + $.fn.socialSharePrivacy = function (settings) { 221 + var defaults = { 222 + 'services' : { 223 + 'facebook' : { 224 + 'status' : 'on', 225 + 'dummy_img' : '../../core/backend/admin/modules/share_buttons/socialshareprivacy/images/dummy_facebook.png', 226 + 'perma_option' : 'on', 227 + 'referrer_track' : '', 228 + 'action' : 'recommend', 229 + 'layout' : 'button_count', 230 + 'sharer' : { 231 + 'status' : 'off', 232 + 'dummy_img' : '../../core/backend/admin/modules/share_buttons/socialshareprivacy/images/dummy_facebook_share_de.png', 233 + 'img' : '../../core/backend/admin/modules/share_buttons/socialshareprivacy/images/dummy_facebook_share_active_de.png' 234 + } 235 + }, 236 + 'twitter' : { 237 + 'status' : 'on', 238 + 'dummy_img' : '../../core/backend/admin/modules/share_buttons/socialshareprivacy/images/dummy_twitter.png', 239 + 'perma_option' : 'on', 240 + 'referrer_track' : '', 241 + 'tweet_text' : getTweetText, 242 + 'count' : 'horizontal' 243 + }, 244 + 'gplus' : { 245 + 'status' : 'on', 246 + 'dummy_img' : '../../core/backend/admin/modules/share_buttons/socialshareprivacy/images/dummy_gplus.png', 247 + 'perma_option' : 'on', 248 + 'referrer_track' : '', 249 + 'size' : 'medium' 250 + } 251 + }, 252 + 'info_link' : 'http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html', 253 + 'cookie_path' : '/', 254 + 'cookie_domain' : document.location.host, 255 + 'cookie_expires' : '365', 256 + 'css_path' : '../../core/backend/admin/modules/share_buttons/socialshareprivacy/socialshareprivacy.css', 257 + 'uri' : getURI, 258 + 'language' : 'de', 259 + 'lang_path' : '../../core/backend/admin/modules/share_buttons/socialshareprivacy/lang/', 260 + 'skin' : 'light', 261 + 'alignment' : 'horizontal', 262 + 'switch_alignment' : 'left', 263 + 'perma_orientation' : 'down' 264 + }; 265 + 266 + // Standardwerte des Plug-Ins mit den vom User angegebenen Optionen ueberschreiben 267 + var options = $.extend(true, defaults, settings); 268 + 269 + var facebook_on = (options.services.facebook.status === 'on'); 270 + var facebook_sharer_on = (options.services.facebook.sharer.status === 'on'); 271 + var twitter_on = (options.services.twitter.status === 'on'); 272 + var gplus_on = (options.services.gplus.status === 'on'); 273 + 274 + // check if at least one service is "on" 275 + if (!facebook_on && !twitter_on && !gplus_on) { 276 + return; 277 + } 278 + 279 + // insert stylesheet into document and prepend target element 280 + if (options.css_path.length > 0 && $(window).data('socialshareprivacy_css') != '1') { 281 + // IE fix (noetig fuer IE < 9 - wird hier aber fuer alle IE gemacht) 282 + if (document.createStyleSheet) { 283 + document.createStyleSheet(options.css_path); 284 + } 285 + else { 286 + $('head').append('<link rel="stylesheet" type="text/css" href="' + options.css_path + '" />'); 287 + } 288 + 289 + $(window).data('socialshareprivacy_css','1'); 290 + } 291 + 292 + var language; 293 + 294 + function loadLangFile() { 295 + var d = $.Deferred(); 296 + 297 + $.getJSON(options.lang_path + options.language+'.lang', function(data) { 298 + language = data; 299 + d.resolve(); 300 + }).fail(function(s){ 301 + if(typeof console !== "undefined") { 302 + console.log('Error ' + s.status + ' while loading the language file ('+options.lang_path+options.language+'.lang)'); 303 + } 304 + d.reject(); 305 + }); 306 + 307 + return d.promise(); 308 + } 309 + 310 + return this.each(function () { 311 + $('div#socialshareprivacy').each(function(){ 312 + var iteration = this; 313 + 314 + $.when( 315 + loadLangFile()) 316 + .then( function() { 317 + $(iteration).prepend('<ul class="social_share_privacy_area clearfix"></ul>'); 318 + var context = $('.social_share_privacy_area', iteration); 319 + 320 + // Class for dark skinning 321 + if(options.skin == 'dark') { 322 + $(context).addClass('skin-dark'); 323 + } 324 + 325 + // Class for alignment 326 + if(options.alignment == 'vertical') { 327 + $(context).addClass('vertical'); 328 + 329 + if(options.switch_alignment == 'right' && 330 + ((facebook_on && options.services.facebook.layout == 'box_count') || (!facebook_on)) && 331 + ((twitter_on && options.services.twitter.count == 'vertical') || (!twitter_on)) && 332 + ((gplus_on && options.services.gplus.size == 'tall') || (!gplus_on))) { 333 + $(context).addClass('switch_right'); 334 + } 335 + } 336 + 337 + // canonical uri that will be shared 338 + var uri = options.uri; 339 + if (typeof uri === 'function') { 340 + uri = uri(context); 341 + } 342 + 343 + // 344 + // Facebook 345 + // 346 + if (facebook_on) { 347 + var fb_dummy_btn; 348 + var fb_code; 349 + 350 + var fb_height = options.services.facebook.layout == 'box_count' ? '61' : '21'; 351 + var fb_width = options.services.facebook.layout == 'box_count' ? '90' : '130'; 352 + 353 + var fb_enc_uri = encodeURIComponent(uri + options.services.facebook.referrer_track); 354 + 355 + if (facebook_sharer_on) { 356 + fb_dummy_btn = '<img src="' + options.services.facebook.sharer.dummy_img + '" alt="Facebook "Share"-Dummy" class="fb_like_privacy_dummy" />'; 357 + fb_code = '<a href="#" onclick="window.open(\'https://www.facebook.com/sharer/sharer.php?u=' + fb_enc_uri + '\', \'facebook-share-dialog\', \'width=626,height=436\'); return false;"><img src="'+options.services.facebook.sharer.img+'" alt="" /></a>'; 358 + } 359 + else { 360 + fb_dummy_btn = '<img src="' + options.services.facebook.dummy_img + '" alt="Facebook "Like"-Dummy" class="fb_like_privacy_dummy" />'; 361 + fb_code = '<iframe src="//www.facebook.com/plugins/like.php?locale=' + language.services.facebook.language + '&href=' + fb_enc_uri + '&width=' + fb_width + '&layout=' + options.services.facebook.layout + '&action=' + options.services.facebook.action + '&show_faces=false&share=false&height=' + fb_height + '&colorscheme=' + options.skin + '" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:' + fb_width + 'px; height:' + fb_height + 'px;" allowTransparency="true"></iframe>'; 362 + } 363 + context.append('<li class="facebook help_info clearfix"><span class="info">' + language.services.facebook.txt_info + '</span><a href="#" class="switch off">' + language.services.facebook.txt_fb_off + '</a><div class="fb_like dummy_btn">' + fb_dummy_btn + '</div></li>'); 364 + 365 + var $container_fb = $('li.facebook', context); 366 + $(context).on('click', 'li.facebook div.fb_like img.fb_like_privacy_dummy,li.facebook .switch', function (e) { 367 + e.preventDefault(); 368 + if ($container_fb.find('.switch').hasClass('off')) { 369 + $container_fb.addClass('info_off'); 370 + $container_fb.find('.switch').addClass('on').removeClass('off').html(language.services.facebook.txt_fb_on); 371 + $container_fb.find('img.fb_like_privacy_dummy').replaceWith(fb_code); 372 + } 373 + else { 374 + $container_fb.removeClass('info_off'); 375 + $container_fb.find('.switch').addClass('off').removeClass('on').html(language.services.facebook.txt_fb_off); 376 + $container_fb.find('.fb_like').html(fb_dummy_btn); 377 + } 378 + }); 379 + } 380 + 381 + // 382 + // Twitter 383 + // 384 + if (twitter_on) { 385 + var text = options.services.twitter.tweet_text; 386 + if (typeof text === 'function') { 387 + text = text(); 388 + } 389 + // 120 is the max character count left after twitters automatic url shortening with t.co 390 + text = abbreviateText(text, '120'); 391 + 392 + var tw_height = options.services.twitter.count == 'horizontal' ? '25' : '62'; 393 + var tw_width = options.services.twitter.count == 'horizontal' ? '130' : '83'; 394 + 395 + var twitter_enc_uri = encodeURIComponent(uri + options.services.twitter.referrer_track); 396 + var twitter_count_url = encodeURIComponent(uri); 397 + var twitter_code = '<iframe allowtransparency="true" frameborder="0" scrolling="no" src="//platform.twitter.com/widgets/tweet_button.html?url=' + twitter_enc_uri + '&counturl=' + twitter_count_url + '&text=' + text + '&count=' + options.services.twitter.count + '&lang=' + language.services.twitter.language + '&dnt=true" style="width:' + tw_width + 'px; height:' + tw_height + 'px;"></iframe>'; 398 + var twitter_dummy_btn = '<img src="' + options.services.twitter.dummy_img + '" alt=""Tweet this"-Dummy" class="tweet_this_dummy" />'; 399 + 400 + context.append('<li class="twitter help_info clearfix"><span class="info">' + language.services.twitter.txt_info + '</span><a href="#" class="switch off">' + language.services.twitter.txt_twitter_off + '</a><div class="tweet dummy_btn">' + twitter_dummy_btn + '</div></li>'); 401 + 402 + var $container_tw = $('li.twitter', context); 403 + 404 + $(context).on('click', 'li.twitter div.tweet img,li.twitter .switch', function (e) { 405 + e.preventDefault(); 406 + if ($container_tw.find('.switch').hasClass('off')) { 407 + $container_tw.addClass('info_off'); 408 + $container_tw.find('.switch').addClass('on').removeClass('off').html(language.services.twitter.txt_twitter_on); 409 + $container_tw.find('img.tweet_this_dummy').replaceWith(twitter_code); 410 + } 411 + else { 412 + $container_tw.removeClass('info_off'); 413 + $container_tw.find('.switch').addClass('off').removeClass('on').html(language.services.twitter.txt_twitter_off); 414 + $container_tw.find('.tweet').html(twitter_dummy_btn); 415 + } 416 + }); 417 + } 418 + 419 + // 420 + // Google+ 421 + // 422 + if (gplus_on) { 423 + // fuer G+ wird die URL nicht encoded, da das zu einem Fehler fuehrt 424 + var gplus_uri = uri + options.services.gplus.referrer_track; 425 + 426 + // we use the Google+ "asynchronous" code, standard code is flaky if inserted into dom after load 427 + var gplus_code = '<div class="g-plusone" data-size="' + options.services.gplus.size + '" data-href="' + gplus_uri + '"></div><script type="text/javascript">window.___gcfg = {lang: "' + language.services.gplus.language + '"}; (function() { var po = document.createElement("script"); po.type = "text/javascript"; po.async = true; po.src = "https://apis.google.com/js/platform.js"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s); })(); </script>'; 428 + var gplus_dummy_btn = '<img src="' + options.services.gplus.dummy_img + '" alt=""Google+1"-Dummy" class="gplus_one_dummy" />'; 429 + 430 + context.append('<li class="gplus help_info clearfix"><span class="info">' + language.services.gplus.txt_info + '</span><a href="#" class="switch off">' + language.services.gplus.txt_gplus_off + '</a><div class="gplusone dummy_btn">' + gplus_dummy_btn + '</div></li>'); 431 + 432 + var $container_gplus = $('li.gplus', context); 433 + 434 + $(context).on('click', 'li.gplus div.gplusone img,li.gplus .switch', function (e) { 435 + e.preventDefault(); 436 + if ($container_gplus.find('.switch').hasClass('off')) { 437 + $container_gplus.addClass('info_off'); 438 + $container_gplus.find('.switch').addClass('on').removeClass('off').html(language.services.gplus.txt_gplus_on); 439 + $container_gplus.find('img.gplus_one_dummy').replaceWith(gplus_code); 440 + } 441 + else { 442 + $container_gplus.removeClass('info_off'); 443 + $container_gplus.find('.switch').addClass('off').removeClass('on').html(language.services.gplus.txt_gplus_off); 444 + $container_gplus.find('.gplusone').html(gplus_dummy_btn); 445 + } 446 + }); 447 + } 448 + 449 + // 450 + // Der Info/Settings-Bereich wird eingebunden 451 + // 452 + context.append('<li class="settings_info ' + options.perma_orientation + '"><div class="settings_info_menu off perma_option_off"><a href="' + options.info_link + '"><span class="help_info icon"><span class="info">' + language.txt_help + '</span></span></a></div></li>'); 453 + 454 + // Info-Overlays mit leichter Verzoegerung einblenden 455 + $(context).on('mouseenter', '.help_info:not(.info_off)', function () { 456 + var $info_wrapper = $(this); 457 + var timeout_id = window.setTimeout(function () { $($info_wrapper).addClass('display'); }, 500); 458 + $(this).data('timeout_id', timeout_id); 459 + }); 460 + $(context).on('mouseleave', '.help_info', function () { 461 + var timeout_id = $(this).data('timeout_id'); 462 + window.clearTimeout(timeout_id); 463 + if ($(this).hasClass('display')) { 464 + $(this).removeClass('display'); 465 + } 466 + }); 467 + 468 + var facebook_perma = (options.services.facebook.perma_option === 'on'); 469 + var twitter_perma = (options.services.twitter.perma_option === 'on'); 470 + var gplus_perma = (options.services.gplus.perma_option === 'on'); 471 + 472 + // Menue zum dauerhaften Einblenden der aktiven Dienste via Cookie einbinden 473 + if ((facebook_on && facebook_perma) || (twitter_on && twitter_perma) || (gplus_on && gplus_perma)) { 474 + 475 + // Cookies abrufen 476 + var cookie_list = document.cookie.split(';'); 477 + var cookies = '{'; 478 + var i = 0; 479 + for (; i < cookie_list.length; i += 1) { 480 + var foo = cookie_list[i].split('='); 481 + // Spaces and Quotes getting removed 482 + foo[0] = $.trim(foo[0].replace(/"/g, '')); 483 + foo[1] = $.trim(foo[1].replace(/"/g, '')); 484 + cookies += '"' + foo[0] + '":"' + foo[1] + '"'; 485 + if (i < cookie_list.length - 1) { 486 + cookies += ','; 487 + } 488 + } 489 + cookies += '}'; 490 + cookies = jQuery.parseJSON(cookies); 491 + 492 + // Container definieren 493 + var $container_settings_info = $('li.settings_info', context); 494 + 495 + // Klasse entfernen, die das i-Icon alleine formatiert, da Perma-Optionen eingeblendet werden 496 + $container_settings_info.find('.settings_info_menu').removeClass('perma_option_off'); 497 + 498 + // Perma-Optionen-Icon (.settings) und Formular (noch versteckt) einbinden 499 + $container_settings_info.find('.settings_info_menu').append('<a href="#" class="settings">' + language.settings + '</a><form><fieldset><legend>' + language.settings_perma + '</legend></fieldset></form>'); 500 + 501 + 502 + var random = 'r' + Math.floor(Math.random()*101); 503 + 504 + // Die Dienste mit <input> und <label>, sowie checked-Status laut Cookie, schreiben 505 + var checked = ' checked="checked"'; 506 + if (facebook_on && facebook_perma) { 507 + var perma_status_facebook = cookies.socialSharePrivacy_facebook === 'perma_on' ? checked : ''; 508 + $container_settings_info.find('form fieldset').append( 509 + '<input type="checkbox" name="perma_status_facebook" id="' + random + '_perma_status_facebook"' + perma_status_facebook + ' /><label for="'+random+'_perma_status_facebook">' + language.services.facebook.perma_display_name + '</label>' 510 + ); 511 + } 512 + 513 + if (twitter_on && twitter_perma) { 514 + var perma_status_twitter = cookies.socialSharePrivacy_twitter === 'perma_on' ? checked : ''; 515 + $container_settings_info.find('form fieldset').append( 516 + '<input type="checkbox" name="perma_status_twitter" id="' + random + '_perma_status_twitter"' + perma_status_twitter + ' /><label for="'+random+'_perma_status_twitter">' + language.services.twitter.perma_display_name + '</label>' 517 + ); 518 + } 519 + 520 + if (gplus_on && gplus_perma) { 521 + var perma_status_gplus = cookies.socialSharePrivacy_gplus === 'perma_on' ? checked : ''; 522 + $container_settings_info.find('form fieldset').append( 523 + '<input type="checkbox" name="perma_status_gplus" id="'+random+'_perma_status_gplus"' + perma_status_gplus + ' /><label for="'+random+'_perma_status_gplus">' + language.services.gplus.perma_display_name + '</label>' 524 + ); 525 + } 526 + 527 + // Settings-Menue per Tastatur erreichbar machen, die Mouseevents werden getriggert 528 + $(context).on('click', 'li.settings_info .settings', function (e) { 529 + e.preventDefault(); 530 + if($(this).data('keyb') == 'on') { 531 + $('li.settings_info', context).trigger('mouseleave'); 532 + $(this).data('keyb','off'); 533 + } 534 + else { 535 + $('li.settings_info .settings', context).trigger('mouseenter'); 536 + $(this).data('keyb','on'); 537 + } 538 + }); 539 + 540 + // Einstellungs-Menue bei mouseover ein-/ausblenden 541 + $(context).on('mouseenter', 'li.settings_info .settings', function () { 542 + var timeout_id = window.setTimeout(function () { $container_settings_info.find('.settings_info_menu').removeClass('off').addClass('on'); }, 500); 543 + $(this).data('timeout_id', timeout_id); 544 + }); 545 + $(context).on('mouseleave', 'li.settings_info', function () { 546 + var timeout_id = $(this).data('timeout_id'); 547 + window.clearTimeout(timeout_id); 548 + $container_settings_info.find('.settings_info_menu').removeClass('on').addClass('off'); 549 + }); 550 + 551 + // Klick-Interaktion auf <input> um Dienste dauerhaft ein- oder auszuschalten (Cookie wird gesetzt oder geloescht) 552 + $(context).on('click', 'li.settings_info fieldset input', function (event) { 553 + var click = event.target.id; 554 + var service = click.substr(click.lastIndexOf('_') + 1, click.length); 555 + var cookie_name = 'socialSharePrivacy_' + service; 556 + 557 + if ($('#' + event.target.id + ':checked').length) { 558 + cookieSet(cookie_name, 'perma_on', options.cookie_expires, options.cookie_path, options.cookie_domain); 559 + $('form fieldset label[for=' + click + ']', context).addClass('checked'); 560 + } 561 + else { 562 + cookieDel(cookie_name, 'perma_on', options.cookie_path, options.cookie_domain); 563 + $('form fieldset label[for=' + click + ']', context).removeClass('checked'); 564 + } 565 + }); 566 + 567 + // Dienste automatisch einbinden, wenn entsprechendes Cookie vorhanden ist 568 + if (facebook_on && facebook_perma && cookies.socialSharePrivacy_facebook === 'perma_on') { 569 + $('li.facebook .switch', context).click(); 570 + } 571 + if (twitter_on && twitter_perma && cookies.socialSharePrivacy_twitter === 'perma_on') { 572 + $('li.twitter .switch', context).click(); 573 + } 574 + if (gplus_on && gplus_perma && cookies.socialSharePrivacy_gplus === 'perma_on') { 575 + $('li.gplus .switch', context).click(); 576 + } 577 + } 578 + }); // .then() 579 + }); 580 + }); // this.each(function () 581 + }; // $.fn.socialSharePrivacy = function (settings) { 582 +}(jQuery)); 583 \ No newline at end of file 584 diff --git a/socialshareprivacy/js/jquery.socialshareprivacy.min.js b/socialshareprivacy/js/jquery.socialshareprivacy.min.js 585 new file mode 100644 586 index 0000000..883636d 587 --- /dev/null 588 +++ b/socialshareprivacy/js/jquery.socialshareprivacy.min.js 589 @@ -0,0 +1 @@ 590 +!function(e){"use strict";function t(e,t){var s=decodeURIComponent(e);if(s.length<=t)return e;var a=s.substring(0,t-1).lastIndexOf(" ");return s=encodeURIComponent(s.substring(0,a))+"…"}function s(t){var s=e('meta[name="'+t+'"]').attr("content");return s||""}function a(){var t=s("DC.title"),a=s("DC.creator");return t.length>0&&a.length>0?t+=" - "+a:t=e("title").text(),encodeURIComponent(t)}function i(){var t=document.location.href,s=e("link[rel=canonical]").attr("href");return s&&s.length>0&&(s.indexOf("http")<0&&(s=document.location.protocol+"//"+document.location.host+s),t=s),t}function o(e,t,s,a,i){var o=new Date;o.setTime(o.getTime()+24*s*60*60*1e3),document.cookie=e+"="+t+"; expires="+o.toUTCString()+"; path="+a+"; domain="+i}function r(e,t,s,a){var i=new Date;i.setTime(i.getTime()-100),document.cookie=e+"="+t+"; expires="+i.toUTCString()+"; path="+s+"; domain="+a}e.fn.socialSharePrivacy=function(s){function n(){var t=e.Deferred();return e.getJSON(l.lang_path+l.language+".lang",function(e){u=e,t.resolve()}).fail(function(e){"undefined"!=typeof console&&console.log("Error "+e.status+" while loading the language file ("+l.lang_path+l.language+".lang)"),t.reject()}),t.promise()}var c={services:{facebook:{status:"on",dummy_img:"../../core/backend/admin/modules/share_buttons/socialshareprivacy/images/dummy_facebook.png",perma_option:"on",referrer_track:"",action:"recommend",layout:"button_count",sharer:{status:"off",dummy_img:"../../core/backend/admin/modules/share_buttons/socialshareprivacy/images/dummy_facebook_share_de.png",img:"../../core/backend/admin/modules/share_buttons/socialshareprivacy/images/dummy_facebook_share_active_de.png"}},twitter:{status:"on",dummy_img:"../../core/backend/admin/modules/share_buttons/socialshareprivacy/images/dummy_twitter.png",perma_option:"on",referrer_track:"",tweet_text:a,count:"horizontal"},gplus:{status:"on",dummy_img:"../../core/backend/admin/modules/share_buttons/socialshareprivacy/images/dummy_gplus.png",perma_option:"on",referrer_track:"",size:"medium"}},info_link:"http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html",cookie_path:"/",cookie_domain:document.location.host,cookie_expires:"365",css_path:"../../core/backend/admin/modules/share_buttons/socialshareprivacy/socialshareprivacy.css",uri:i,language:"de",lang_path:"../../core/backend/admin/modules/share_buttons/socialshareprivacy/lang/",skin:"light",alignment:"horizontal",switch_alignment:"left",perma_orientation:"down"},l=e.extend(!0,c,s),f="on"===l.services.facebook.status,m="on"===l.services.facebook.sharer.status,p="on"===l.services.twitter.status,d="on"===l.services.gplus.status;if(f||p||d){l.css_path.length>0&&"1"!=e(window).data("socialshareprivacy_css")&&(document.createStyleSheet?document.createStyleSheet(l.css_path):e("head").append('<link rel="stylesheet" type="text/css" href="'+l.css_path+'" />'),e(window).data("socialshareprivacy_css","1"));var u;return this.each(function(){e("div#socialshareprivacy").each(function(){var s=this;e.when(n()).then(function(){e(s).prepend('<ul class="social_share_privacy_area clearfix"></ul>');var a=e(".social_share_privacy_area",s);"dark"==l.skin&&e(a).addClass("skin-dark"),"vertical"==l.alignment&&(e(a).addClass("vertical"),"right"==l.switch_alignment&&(f&&"box_count"==l.services.facebook.layout||!f)&&(p&&"vertical"==l.services.twitter.count||!p)&&(d&&"tall"==l.services.gplus.size||!d)&&e(a).addClass("switch_right"));var i=l.uri;if("function"==typeof i&&(i=i(a)),f){var n,c,_="box_count"==l.services.facebook.layout?"61":"21",h="box_count"==l.services.facebook.layout?"90":"130",g=encodeURIComponent(i+l.services.facebook.referrer_track);m?(n='<img src="'+l.services.facebook.sharer.dummy_img+'" alt="Facebook "Share"-Dummy" class="fb_like_privacy_dummy" />',c='<a href="#" onclick="window.open(\'https://www.facebook.com/sharer/sharer.php?u='+g+"', 'facebook-share-dialog', 'width=626,height=436'); return false;\"><img src=\""+l.services.facebook.sharer.img+'" alt="" /></a>'):(n='<img src="'+l.services.facebook.dummy_img+'" alt="Facebook "Like"-Dummy" class="fb_like_privacy_dummy" />',c='<iframe src="//www.facebook.com/plugins/like.php?locale='+u.services.facebook.language+"&href="+g+"&width="+h+"&layout="+l.services.facebook.layout+"&action="+l.services.facebook.action+"&show_faces=false&share=false&height="+_+"&colorscheme="+l.skin+'" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:'+h+"px; height:"+_+'px;" allowTransparency="true"></iframe>'),a.append('<li class="facebook help_info clearfix"><span class="info">'+u.services.facebook.txt_info+'</span><a href="#" class="switch off">'+u.services.facebook.txt_fb_off+'</a><div class="fb_like dummy_btn">'+n+"</div></li>");var v=e("li.facebook",a);e(a).on("click","li.facebook div.fb_like img.fb_like_privacy_dummy,li.facebook .switch",function(e){e.preventDefault(),v.find(".switch").hasClass("off")?(v.addClass("info_off"),v.find(".switch").addClass("on").removeClass("off").html(u.services.facebook.txt_fb_on),v.find("img.fb_like_privacy_dummy").replaceWith(c)):(v.removeClass("info_off"),v.find(".switch").addClass("off").removeClass("on").html(u.services.facebook.txt_fb_off),v.find(".fb_like").html(n))})}if(p){var k=l.services.twitter.tweet_text;"function"==typeof k&&(k=k()),k=t(k,"120");var w="horizontal"==l.services.twitter.count?"25":"62",b="horizontal"==l.services.twitter.count?"130":"83",y=encodeURIComponent(i+l.services.twitter.referrer_track),C=encodeURIComponent(i),x='<iframe allowtransparency="true" frameborder="0" scrolling="no" src="//platform.twitter.com/widgets/tweet_button.html?url='+y+"&counturl="+C+"&text="+k+"&count="+l.services.twitter.count+"&lang="+u.services.twitter.language+'&dnt=true" style="width:'+b+"px; height:"+w+'px;"></iframe>',S='<img src="'+l.services.twitter.dummy_img+'" alt=""Tweet this"-Dummy" class="tweet_this_dummy" />';a.append('<li class="twitter help_info clearfix"><span class="info">'+u.services.twitter.txt_info+'</span><a href="#" class="switch off">'+u.services.twitter.txt_twitter_off+'</a><div class="tweet dummy_btn">'+S+"</div></li>");var D=e("li.twitter",a);e(a).on("click","li.twitter div.tweet img,li.twitter .switch",function(e){e.preventDefault(),D.find(".switch").hasClass("off")?(D.addClass("info_off"),D.find(".switch").addClass("on").removeClass("off").html(u.services.twitter.txt_twitter_on),D.find("img.tweet_this_dummy").replaceWith(x)):(D.removeClass("info_off"),D.find(".switch").addClass("off").removeClass("on").html(u.services.twitter.txt_twitter_off),D.find(".tweet").html(S))})}if(d){var T=i+l.services.gplus.referrer_track,z='<div class="g-plusone" data-size="'+l.services.gplus.size+'" data-href="'+T+'"></div><script type="text/javascript">window.___gcfg = {lang: "'+u.services.gplus.language+'"}; (function() { var po = document.createElement("script"); po.type = "text/javascript"; po.async = true; po.src = "https://apis.google.com/js/platform.js"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s); })(); </script>',q='<img src="'+l.services.gplus.dummy_img+'" alt=""Google+1"-Dummy" class="gplus_one_dummy" />';a.append('<li class="gplus help_info clearfix"><span class="info">'+u.services.gplus.txt_info+'</span><a href="#" class="switch off">'+u.services.gplus.txt_gplus_off+'</a><div class="gplusone dummy_btn">'+q+"</div></li>");var I=e("li.gplus",a);e(a).on("click","li.gplus div.gplusone img,li.gplus .switch",function(e){e.preventDefault(),I.find(".switch").hasClass("off")?(I.addClass("info_off"),I.find(".switch").addClass("on").removeClass("off").html(u.services.gplus.txt_gplus_on),I.find("img.gplus_one_dummy").replaceWith(z)):(I.removeClass("info_off"),I.find(".switch").addClass("off").removeClass("on").html(u.services.gplus.txt_gplus_off),I.find(".gplusone").html(q))})}a.append('<li class="settings_info '+l.perma_orientation+'"><div class="settings_info_menu off perma_option_off"><a href="'+l.info_link+'"><span class="help_info icon"><span class="info">'+u.txt_help+"</span></span></a></div></li>"),e(a).on("mouseenter",".help_info:not(.info_off)",function(){var t=e(this),s=window.setTimeout(function(){e(t).addClass("display")},500);e(this).data("timeout_id",s)}),e(a).on("mouseleave",".help_info",function(){var t=e(this).data("timeout_id");window.clearTimeout(t),e(this).hasClass("display")&&e(this).removeClass("display")});var P="on"===l.services.facebook.perma_option,U="on"===l.services.twitter.perma_option,j="on"===l.services.gplus.perma_option;if(f&&P||p&&U||d&&j){for(var R=document.cookie.split(";"),O="{",N=0;N<R.length;N+=1){var E=R[N].split("=");E[0]=e.trim(E[0].replace(/"/g,"")),E[1]=e.trim(E[1].replace(/"/g,"")),O+='"'+E[0]+'":"'+E[1]+'"',N<R.length-1&&(O+=",")}O+="}",O=jQuery.parseJSON(O);var W=e("li.settings_info",a);W.find(".settings_info_menu").removeClass("perma_option_off"),W.find(".settings_info_menu").append('<a href="#" class="settings">'+u.settings+"</a><form><fieldset><legend>"+u.settings_perma+"</legend></fieldset></form>");var B="r"+Math.floor(101*Math.random()),F=' checked="checked"';if(f&&P){var J="perma_on"===O.socialSharePrivacy_facebook?F:"";W.find("form fieldset").append('<input type="checkbox" name="perma_status_facebook" id="'+B+'_perma_status_facebook"'+J+' /><label for="'+B+'_perma_status_facebook">'+u.services.facebook.perma_display_name+"</label>")}if(p&&U){var M="perma_on"===O.socialSharePrivacy_twitter?F:"";W.find("form fieldset").append('<input type="checkbox" name="perma_status_twitter" id="'+B+'_perma_status_twitter"'+M+' /><label for="'+B+'_perma_status_twitter">'+u.services.twitter.perma_display_name+"</label>")}if(d&&j){var Q="perma_on"===O.socialSharePrivacy_gplus?F:"";W.find("form fieldset").append('<input type="checkbox" name="perma_status_gplus" id="'+B+'_perma_status_gplus"'+Q+' /><label for="'+B+'_perma_status_gplus">'+u.services.gplus.perma_display_name+"</label>")}e(a).on("click","li.settings_info .settings",function(t){t.preventDefault(),"on"==e(this).data("keyb")?(e("li.settings_info",a).trigger("mouseleave"),e(this).data("keyb","off")):(e("li.settings_info .settings",a).trigger("mouseenter"),e(this).data("keyb","on"))}),e(a).on("mouseenter","li.settings_info .settings",function(){var t=window.setTimeout(function(){W.find(".settings_info_menu").removeClass("off").addClass("on")},500);e(this).data("timeout_id",t)}),e(a).on("mouseleave","li.settings_info",function(){var t=e(this).data("timeout_id");window.clearTimeout(t),W.find(".settings_info_menu").removeClass("on").addClass("off")}),e(a).on("click","li.settings_info fieldset input",function(t){var s=t.target.id,i=s.substr(s.lastIndexOf("_")+1,s.length),n="socialSharePrivacy_"+i;e("#"+t.target.id+":checked").length?(o(n,"perma_on",l.cookie_expires,l.cookie_path,l.cookie_domain),e("form fieldset label[for="+s+"]",a).addClass("checked")):(r(n,"perma_on",l.cookie_path,l.cookie_domain),e("form fieldset label[for="+s+"]",a).removeClass("checked"))}),f&&P&&"perma_on"===O.socialSharePrivacy_facebook&&e("li.facebook .switch",a).click(),p&&U&&"perma_on"===O.socialSharePrivacy_twitter&&e("li.twitter .switch",a).click(),d&&j&&"perma_on"===O.socialSharePrivacy_gplus&&e("li.gplus .switch",a).click()}})})})}}}(jQuery); 591 \ No newline at end of file 592 diff --git a/socialshareprivacy/lang/de.lang b/socialshareprivacy/lang/de.lang 593 new file mode 100644 594 index 0000000..eff055d 595 --- /dev/null 596 +++ b/socialshareprivacy/lang/de.lang 597 @@ -0,0 +1,29 @@ 598 +{ 599 + "services" : { 600 + "facebook" : { 601 + "txt_info" : "2 Klicks für mehr Datenschutz: Erst wenn Sie hier klicken, wird der Button aktiv und Sie können Ihre Empfehlung an Facebook senden. Schon beim Aktivieren werden Daten an Dritte übertragen – siehe <em>i</em>.", 602 + "txt_fb_off" : "nicht mit Facebook verbunden", 603 + "txt_fb_on" : "mit Facebook verbunden", 604 + "language" : "de_DE", 605 + "perma_display_name" : "Facebook" 606 + }, 607 + "twitter" : { 608 + "txt_info" : "2 Klicks für mehr Datenschutz: Erst wenn Sie hier klicken, wird der Button aktiv und Sie können Ihre Empfehlung an Twitter senden. Schon beim Aktivieren werden Daten an Dritte übertragen – siehe <em>i</em>.", 609 + "txt_twitter_off" : "nicht mit Twitter verbunden", 610 + "txt_twitter_on" : "mit Twitter verbunden", 611 + "language" : "en", 612 + "perma_display_name" : "Twitter" 613 + }, 614 + "gplus" : { 615 + "txt_info" : "2 Klicks für mehr Datenschutz: Erst wenn Sie hier klicken, wird der Button aktiv und Sie können Ihre Empfehlung an Google+ senden. Schon beim Aktivieren werden Daten an Dritte übertragen – siehe <em>i</em>.", 616 + "txt_gplus_off" : "nicht mit Google+ verbunden", 617 + "txt_gplus_on" : "mit Google+ verbunden", 618 + "language" : "de", 619 + "perma_display_name" : "Google+" 620 + } 621 + }, 622 + "language" : "de", 623 + "txt_help" : "Wenn Sie diese Felder durch einen Klick aktivieren, werden Informationen an Facebook, Twitter oder Google in die USA übertragen und unter Umständen auch dort gespeichert. Näheres erfahren Sie durch einen Klick auf das <em>i</em>.", 624 + "settings_perma" : "Dauerhaft aktivieren und Datenüber­tragung zustimmen:", 625 + "settings" : "Einstellungen" 626 +} 627 \ No newline at end of file 628 diff --git a/socialshareprivacy/lang/en.lang b/socialshareprivacy/lang/en.lang 629 new file mode 100644 630 index 0000000..24fa134 631 --- /dev/null 632 +++ b/socialshareprivacy/lang/en.lang 633 @@ -0,0 +1,29 @@ 634 +{ 635 + "services" : { 636 + "facebook" : { 637 + "txt_info" : "2 clicks for more privacy: When you click here the button will be activated and you can send your recommendation. As soon as the button is activated data will be send to third party – for details click on <em>i</em>.", 638 + "txt_fb_off" : "not connected to Facebook", 639 + "txt_fb_on" : "connected to Facebook", 640 + "language" : "en_US", 641 + "perma_display_name" : "Facebook" 642 + }, 643 + "twitter" : { 644 + "txt_info" : "2 clicks for more privacy: When you click here the button will be activated and you can send your recommendation. As soon as the button is activated data will be send to third party – for details click on <em>i</em>", 645 + "txt_twitter_off" : "not connected to Twitter", 646 + "txt_twitter_on" : "connected to Twitter", 647 + "language" : "en", 648 + "perma_display_name" : "Twitter" 649 + }, 650 + "gplus" : { 651 + "txt_info" : "2 clicks for more privacy: When you click here the button will be activated and you can send your recommendation. As soon as the button is activated data will be send to third party – for details click on <em>i</em>", 652 + "txt_gplus_off" : "not connected to Google+", 653 + "txt_gplus_on" : "connected to Google+", 654 + "language" : "en", 655 + "perma_display_name" : "Google+" 656 + } 657 + }, 658 + "language" : "en", 659 + "txt_help" : "If you activate these buttons with a click informations will be send to Facebook, Twitter or Google in the USA and may be stored there. For details click on <em>i</em>.", 660 + "settings_perma" : "Agree permanent activation and data transfer:", 661 + "settings" : "settings" 662 +} 663 \ No newline at end of file 664 diff --git a/socialshareprivacy/socialshareprivacy.css b/socialshareprivacy/socialshareprivacy.css 665 new file mode 100644 666 index 0000000..32086ae 667 --- /dev/null 668 +++ b/socialshareprivacy/socialshareprivacy.css 669 @@ -0,0 +1,334 @@ 670 +.social_share_privacy_area .clearfix::after { 671 + content: ""; 672 + height: 0; 673 + line-height: 0; 674 + font-size: 0; 675 + visibility: hidden; 676 + clear: both; 677 + display: block; 678 +} 679 +.social_share_privacy_area { 680 + clear: both; 681 + margin: 20px 0 !important; 682 + list-style-type: none; 683 + padding: 0 !important; 684 + width: auto; 685 + height: 25px; 686 + display: block; 687 + font-family: Arial, sans-serif; 688 +} 689 +.social_share_privacy_area.vertical { 690 + height: auto; 691 +} 692 +.social_share_privacy_area li { 693 + margin: 0 !important; 694 + padding: 0 !important; 695 + height: 21px; 696 + float: left; 697 +} 698 +.social_share_privacy_area.vertical li { 699 + float: none; 700 + clear: both; 701 + width: 150px; 702 + height: auto; 703 + margin: 0 0 10px !important; 704 +} 705 +.social_share_privacy_area.vertical li.settings_info { 706 + height: 24px; 707 +} 708 +.social_share_privacy_area.vertical.switch_right li { 709 + width: 120px; 710 +} 711 +.social_share_privacy_area li .dummy_btn { 712 + float: left; 713 + margin: 0 0 0 10px; 714 + cursor: pointer; 715 + padding: 0; 716 + height: inherit; 717 +} 718 +.social_share_privacy_area.vertical li .dummy_btn { 719 + width: 90px; 720 +} 721 +.social_share_privacy_area.vertical.switch_right li .dummy_btn { 722 + margin-left: 0; 723 +} 724 +.social_share_privacy_area li div iframe { 725 + overflow: hidden; 726 + height: inherit; 727 + width: inherit; 728 +} 729 +/* Facebook begin */ 730 +.social_share_privacy_area .facebook { 731 + width: 180px; 732 + display: inline-block; 733 +} 734 +.social_share_privacy_area.vertical .facebook { 735 + display: block; 736 +} 737 +.social_share_privacy_area .facebook .fb_like iframe { 738 + width: 130px; 739 +} 740 +/* Facebook end */ 741 +/* Twitter begin */ 742 +.social_share_privacy_area .twitter { 743 + width: 148px; 744 +} 745 +.social_share_privacy_area li div.tweet { 746 + width: 100px; 747 +} 748 +/* Twitter end */ 749 +/* Google+ begin */ 750 +.social_share_privacy_area .gplus { 751 + width: 123px; 752 +} 753 +.social_share_privacy_area li div.gplusone { 754 + width: 75px; 755 +} 756 +/* Google+ end */ 757 +/* Switch begin */ 758 +.social_share_privacy_area li .switch { 759 + text-indent: -9999em; 760 + background: transparent url(images/socialshareprivacy_on_off.png) no-repeat 0 0 scroll; 761 + width: 23px; 762 + height: 12px; 763 + overflow: hidden; 764 + float: left; 765 + margin: 4px 0 0; 766 + padding: 0; 767 + cursor: pointer; 768 +} 769 +.social_share_privacy_area.vertical.switch_right li .switch { 770 + float: right; 771 +} 772 +.social_share_privacy_area.skin-dark li .switch { 773 + background-image: url(images/socialshareprivacy_on_off_dark.png); 774 +} 775 +.social_share_privacy_area li .switch.on { 776 + background-position: 0 -12px; 777 +} 778 +/* Switch end */ 779 +/* Tooltips begin */ 780 +.social_share_privacy_area li.help_info { 781 + position: relative; 782 +} 783 +.social_share_privacy_area li.help_info .info, 784 +.social_share_privacy_area li .help_info.icon .info { 785 + display: none; 786 + position: absolute; 787 + bottom: 40px; 788 + left: 0; 789 + width: 290px; 790 + padding: 10px 15px; 791 + margin: 0; 792 + font-size: 12px; 793 + line-height: 16px; 794 + font-weight: bold; 795 + border: 1px solid #ccc; 796 + -moz-border-radius: 4px; 797 + -webkit-border-radius: 4px; 798 + border-radius: 4px; 799 + -moz-box-shadow: 0 3px 4px #999; 800 + -webkit-box-shadow: 0 3px 4px #999; 801 + box-shadow: 0 3px 4px #999; 802 + background-color: #fdfbec; 803 + color: #000; 804 + z-index: 500; 805 +} 806 +.social_share_privacy_area li.gplus.help_info .info { 807 + left: -60px; 808 +} 809 +.social_share_privacy_area li .help_info.icon .info { 810 + left: -243px; 811 + width: 350px; 812 +} 813 +.social_share_privacy_area.vertical li.gplus.help_info .info, 814 +.social_share_privacy_area.vertical li .help_info.icon .info { 815 + left: 0; 816 +} 817 +.social_share_privacy_area li.help_info.display .info, 818 +.social_share_privacy_area li .help_info.icon.display .info { 819 + display: block; 820 +} 821 +.social_share_privacy_area li.help_info.info_off.display .info { 822 + display: none; 823 +} 824 +.social_share_privacy_area li .help_info.icon { 825 + background: #fff url(images/socialshareprivacy_info.png) no-repeat center center scroll; 826 + width: 25px; 827 + height: 20px; 828 + position: relative; 829 + display: inline-block; 830 + vertical-align: top; 831 + border: 2px solid #e7e3e3; 832 + border-right-width: 0; 833 + -moz-border-radius: 5px 0 0 5px; 834 + -webkit-border-radius: 5px 0 0 5px; 835 + border-radius: 5px 0 0 5px; 836 + margin: 0; 837 + padding: 0; 838 +} 839 +.social_share_privacy_area.skin-dark li .help_info.icon { 840 + background-image: url(images/socialshareprivacy_info_dark.png),-moz-linear-gradient(top,#6a6767 0,#2d2a2a 100%); 841 + background-image: url(images/socialshareprivacy_info_dark.png),-webkit-gradient(linear,center top,center bottom,color-stop(0%,#6a6767),color-stop(100%,#2d2a2a)); 842 + background-image: url(images/socialshareprivacy_info_dark.png),-webkit-linear-gradient(top,#6a6767 0,#2d2a2a 100%); 843 + background-image: url(images/socialshareprivacy_info_dark.png),-o-linear-gradient(top,#6a6767 0,#2d2a2a 100%); 844 + background-image: url(images/socialshareprivacy_info_dark.png),-ms-linear-gradient(top,#6a6767 0,#2d2a2a 100%); 845 + background-image: url(images/socialshareprivacy_info_dark.png),linear-gradient(top,#6a6767 0,#2d2a2a 100%); 846 + background-image: url(images/socialshareprivacy_info_dark.png); 847 + background-color: #4f4c4c; 848 + border-color: #7e7e7e; 849 +} 850 +.social_share_privacy_area li.settings_info .settings_info_menu.on .help_info.icon { 851 + border-top-width: 0; 852 + border-left-width: 0; 853 +} 854 +.social_share_privacy_area li.settings_info .settings_info_menu.perma_option_off .help_info.icon { 855 + border-right-width: 2px; 856 + -moz-border-radius: 5px; 857 + -webkit-border-radius: 5px; 858 + border-radius: 5px; 859 +} 860 +/* Tooltips end */ 861 +/* Settings/Info begin */ 862 +.social_share_privacy_area li.settings_info { 863 + position: relative; 864 + top: -2px; 865 +} 866 +.social_share_privacy_area.vertical li.settings_info { 867 + top: 0; 868 +} 869 +.social_share_privacy_area li.settings_info a { 870 + text-decoration: none; 871 + margin: 0 !important; 872 +} 873 +.social_share_privacy_area li.settings_info .settings_info_menu { 874 + background-color: #f3f4f5; 875 + border: 2px solid #e7e3e3; 876 + -moz-border-radius: 5px; 877 + -webkit-border-radius: 5px; 878 + border-radius: 5px; 879 + -moz-box-shadow: 2px 2px 3px #c1c1c1; 880 + -webkit-box-shadow: 2px 2px 3px #c1c1c1; 881 + box-shadow: 3px 3px 3px #c1c1c1; 882 + left: 0; 883 + position: absolute; 884 + top: 0; 885 + width: 135px; 886 + z-index: 1000; 887 + margin: 0; 888 + padding: 0; 889 +} 890 +.social_share_privacy_area li.settings_info .settings_info_menu.off { 891 + border-width: 0; 892 + -moz-box-shadow: none; 893 + -webkit-box-shadow: none; 894 + box-shadow: none; 895 + background-color: transparent; 896 +} 897 +.social_share_privacy_area li.settings_info .settings_info_menu.off form { 898 + display: none; 899 + margin: 0; 900 + padding: 0; 901 +} 902 +.social_share_privacy_area li.settings_info .settings_info_menu .settings { 903 + text-indent: -9999em; 904 + display: inline-block; 905 + background: #fff url(images/settings.png) no-repeat center center scroll; 906 + width: 25px; 907 + height: 20px; 908 + border: 2px solid #e7e3e3; 909 + -moz-border-radius: 0 5px 5px 0; 910 + -webkit-border-radius: 0 5px 5px 0; 911 + border-radius: 0 5px 5px 0; 912 + border-left: 1px solid #ddd; 913 + margin: 0; 914 + padding: 0; 915 +} 916 +.social_share_privacy_area.skin-dark li.settings_info .settings_info_menu .settings { 917 + background-image: url(images/settings_dark.png),-moz-linear-gradient(top,#6a6767 0,#2d2a2a 100%); 918 + background-image: url(images/settings_dark.png),-webkit-gradient(linear,center top,center bottom,color-stop(0%,#6a6767),color-stop(100%,#2d2a2a)); 919 + background-image: url(images/settings_dark.png),-webkit-linear-gradient(top,#6a6767 0,#2d2a2a 100%); 920 + background-image: url(images/settings_dark.png),-o-linear-gradient(top,#6a6767 0,#2d2a2a 100%); 921 + background-image: url(images/settings_dark.png),-ms-linear-gradient(top,#6a6767 0,#2d2a2a 100%); 922 + background-image: url(images/settings_dark.png),linear-gradient(top,#6a6767 0,#2d2a2a 100%); 923 + background-image: url(images/settings_dark.png); 924 + background-color: #4f4c4c; 925 + border-color: #7e7e7e; 926 +} 927 +.social_share_privacy_area.skin-dark li.settings_info .settings_info_menu.on { 928 + background-color: #4f4c4c; 929 + color: #fff; 930 + -moz-box-shadow: none; 931 + -webkit-box-shadow: none; 932 + box-shadow: none; 933 +} 934 +.social_share_privacy_area li.settings_info .settings_info_menu.on .settings { 935 + border-top-width: 0; 936 +} 937 +.social_share_privacy_area li.settings_info .settings_info_menu form fieldset { 938 + border-width: 0; 939 + margin: 0; 940 + padding: 0 10px 10px; 941 +} 942 +.social_share_privacy_area li.settings_info .settings_info_menu form fieldset legend { 943 + font-size: 11px; 944 + font-weight: bold; 945 + line-height: 14px; 946 + margin: 0; 947 + padding: 10px 0; 948 + width: 115px; 949 +} 950 +.social_share_privacy_area li.settings_info .settings_info_menu form fieldset input { 951 + clear: both; 952 + float: left; 953 + margin: 4px 10px 4px 0; 954 + padding: 0; 955 +} 956 +.social_share_privacy_area li.settings_info .settings_info_menu form fieldset label { 957 + display: inline-block; 958 + float: left; 959 + font-size: 12px; 960 + font-weight: bold; 961 + line-height: 24px; 962 + -moz-transition: color .5s ease-in; 963 + -webkit-transition: color .5s ease-in; 964 + transition: color .5s ease-in; 965 + margin: 0; 966 + padding: 0; 967 +} 968 +.social_share_privacy_area li.settings_info .settings_info_menu form fieldset label.checked { 969 + color: #090; 970 +} 971 +/* Top-Orientation */ 972 +.social_share_privacy_area li.settings_info.top { 973 + 974 +} 975 +.social_share_privacy_area li.settings_info.top .settings_info_menu.on { 976 + top: auto; 977 + bottom: -3px; 978 + padding-bottom: 22px; 979 +} 980 +.social_share_privacy_area.vertical li.settings_info.top .settings_info_menu.on { 981 + bottom: 0; 982 +} 983 +.social_share_privacy_area li.settings_info.top .settings_info_menu.on > a { 984 + position: absolute; 985 + bottom: 0; 986 + left: 0; 987 +} 988 +.social_share_privacy_area li.settings_info.top .settings_info_menu.on > a .help_info.icon { 989 + border-top-width: 2px; 990 + border-bottom-width: 0; 991 + -webkit-border-radius: 0 0 0 5px; 992 + -moz-border-radius: 0 0 0 5px; 993 + border-radius: 0 0 0 5px; 994 +} 995 +.social_share_privacy_area li.settings_info.top .settings_info_menu.on > a.settings { 996 + left: 25px; 997 + border-top-width: 2px; 998 + border-bottom-width: 0; 999 + -webkit-border-radius: 0 5px 0 0; 1000 + -moz-border-radius: 0 5px 0 0; 1001 + border-radius: 0 5px 0 0; 1002 +} 1003 +/* Settings/Info end */ 1004 \ No newline at end of file