Skip to content
Snippets Groups Projects
Commit 5e57a262 authored by lucha's avatar lucha Committed by agata
Browse files

update privacy share buttons css and selected the compressed javascript

parent b2562ff0
Branches
Tags
No related merge requests found
......@@ -43,7 +43,7 @@
/* Tooltips end */
/* Settings/Info begin */
.social_share_privacy_area li.settings_info {position:relative; top:8px; width:135px;}
.social_share_privacy_area li.settings_info {position:relative; top:8px; width:135px; overflow:visible;}
.social_share_privacy_area li.settings_info a {text-decoration:none; margin:0 !important;}
.social_share_privacy_area li.settings_info .settings_info_menu {background-color:#f3f4f5; border:2px solid #e7e3e3; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; -moz-box-shadow:2px 2px 3px #c1c1c1; -webkit-box-shadow:2px 2px 3px #c1c1c1; box-shadow:3px 3px 3px #c1c1c1; left:0; position:absolute; top:0; width:135px; z-index:10;}
.social_share_privacy_area li.settings_info .settings_info_menu.off {border-width:0; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; background-color:transparent; }
......@@ -53,7 +53,7 @@
.social_share_privacy_area li.settings_info .settings_info_menu form fieldset {border-width: 0; margin:0; padding:0 10px 10px; }
.social_share_privacy_area li.settings_info .settings_info_menu form fieldset legend {font-size:11px; font-weight:bold; line-height:14px; margin:0; padding:10px 0; width:115px; color:#151515;}
.social_share_privacy_area li.settings_info .settings_info_menu form fieldset input {clear:both; float:left; margin:4px 10px 4px 0; width:auto;}
.social_share_privacy_area li.settings_info .settings_info_menu form fieldset label {display:inline-block; float:left; font-size:12px; font-weight:bold; line-height:24px; -moz-transition:color .5s ease-in; -webkit-transition:color .5s ease-in; transition:color .5s ease-in; color:#151515;}
.social_share_privacy_area li.settings_info .settings_info_menu form fieldset label {display:inline-block; float:left; font-size:12px; font-weight:bold; line-height:24px; -moz-transition:color .5s ease-in; -webkit-transition:color .5s ease-in; transition:color .5s ease-in; color:#151515; margin-bottom:0px;}
.social_share_privacy_area li.settings_info .settings_info_menu form fieldset label.checked {color:#090;}
......
......@@ -112,8 +112,8 @@ var SocialButton = function(elements, options){
+ ' var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s); })(); </script>';
return gplusdiv.append(gplusjs);
}
},
'flattr' : {
}
/* 'flattr' : {
'display_name' : 'Flattr',
'status' : 'off',
'perma' : 'on',
......@@ -134,6 +134,7 @@ var SocialButton = function(elements, options){
'xing_lib' : '',
'iframe_src' : function(){return '';}
}
*/
}
},
......
(function(b){var a=function(d,c){this.elements=d;this.options=b.extend(true,{},this.defaults,c);if(!this.is_on()){return}this.append_css();this.attach()};a.prototype={defaults:{info_link:"http://cavallette.noblogs.org/?p=7641",txt_help:"When you activate these buttons by clicking on them, some of your personal data will be transferred to third parties and can be stored by them. For more information click on the <em> i </em>",settings_perma:"Permanently enable data transfer for:",css_path:"",uri:"",cookie_options:{path:"/",expires:365},services:{facebook:{display_name:"Facebook",status:"off",perma:"on",txt_info:"2 click for more privacy: only if you click here, the button will activate and you will be able to send your recommendation to Facebook. When enabled, data will be transferred to third parties - see <em> i </em>.",txt_off:"not connected with Facebook",txt_on:"connected with Facebook",dummy_img:"",action:"recommend",iframe_src:function(c){return'<iframe src="//www.facebook.com/plugins/like.php?href='+c.uri+"&amp;send=false&amp;layout=button_count&amp;width=100&amp;show_faces=false&amp;action="+c.services.facebook.action+'&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:130px; height:25px;" allowTransparency="true"></iframe>'}},twitter:{display_name:"Twitter",status:"off",perma:"on",txt_info:"2 click for more privacy: only if you click here, the button will activate and you will be able to send your recommendation to Twitter. When enabled, data will be transferred to third parties - see <em> i </em>.",txt_off:"not connected with Twitter",txt_on:"connected with Twitter",dummy_img:"",reply_to:"",text:encodeURIComponent(document.title),iframe_src:function(d){var c=(d.services.twitter.reply_to!="")?"&amp;via="+d.services.twitter.reply_to:"";return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?url='+d.uri+"&amp;counturl="+d.uri+"&amp;text="+d.services.twitter.text+c+"&amp;count=horizontal&amp;lang="+d.services.twitter.language+'" style="width:100px; height:25px;"></iframe>'}},identica:{display_name:"Identi.ca",status:"off",perma:"on",txt_info:"2 click for more privacy: only if you click here, the button will activate and you will be able to send your recommendation to Identi.ca. When enabled, data will be transferred to third parties - see <em> i </em>.",txt_off:"not connected with Identi.ca",txt_on:"connected with Identi.ca",dummy_img:"",text:encodeURIComponent(document.title),identica_lib:"",iframe_src:function(c){return'<iframe scrolling="no" frameborder="0" src="'+c.services.identica.identica_lib+"?noscript&style2&amp;title="+c.services.identica.text+'" allowtransparency="true" style="width:130px; height:25px; position: absolute;"></iframe>'}},gplus:{display_name:"Google+",status:"off",perma:"on",txt_info:"2 click for more privacy: only if you click here, the button will activate and you will be able to send your recommendation to Google+. When enabled, data will be transferred to third parties - see <em> i </em>.",txt_off:"not connected with Google+",txt_on:"connected with Google+",dummy_img:"",language:"en",iframe_src:function(d){var c=b('<div class="g-plusone" data-size="medium"></div>');var e='<script type="text/javascript">window.___gcfg = {lang: "'+d.services.gplus.language+'"}; (function() { var po = document.createElement("script"); po.type = "text/javascript";po.async = true; po.src = "https://apis.google.com/js/plusone.js"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s); })(); <\/script>';return c.append(e)}},flattr:{display_name:"Flattr",status:"off",perma:"on",txt_info:"2 click for more privacy: only if you click here, the button will activate and you will be able to send yout recommendation to Flattr. When enabled, data will be transferred to third parties - see <em> i </em>.",txt_flattr_off:"not connected with Flattr",txt_flattr_on:"connected with Flattr",dummy_img:"",iframe_src:function(){return""}},xing:{display_name:"Xing",status:"off",perma:"on",txt_info:"2 click for more privacy: only if you click here, the button will activate and you will be able to send your recommendation to Xing. When enabled, data will be transferred to third parties - see <em> i </em>.",txt_gplus_off:"not connected with Xing",txt_plus_on:"connected with Xing",dummy_img:"",xing_lib:"",iframe_src:function(){return""}}}},is_on:function(){var d=false;for(var c in this.options.services){var e=this.options.services[c];if(e.status=="on"){d=true;break}}return d},perma_is_on:function(){var d=false;for(var c in this.options.services){var e=this.options.services[c];if(e.status=="on"&&e.perma=="on"){d=true;break}}return d&&(!b.browser.msie||(b.browser.msie&&(b.browser.version>7)))},append_css:function(){if(this.options.css_path.length>0){if(document.createStyleSheet){document.createStyleSheet(options.css_path)}else{b("head").append('<link rel="stylesheet" type="text/css" href="'+options.css_path+'" />')}}},dummy_image:function(c){return b("<img/>",{src:c.dummy_img,alt:c.display_name+" Dummy Image","class":"dummy_img"})},switch_button:function(c,f){var e=b(".switch",b(f));var d=b("div.dummy_btn",b(f));if(e.hasClass("off")){b(f).addClass("info_off");e.addClass("on").removeClass("off").html(c.txt_on);d.html(c.iframe_src(this.options))}else{b(f).removeClass("info_off");e.addClass("off").removeClass("on").html(c.txt_off);d.html(this.dummy_image(c))}},attach:function(){var c=this;this.elements.each(function(){var g=b('<ul class="social_share_privacy_area"></ul>').appendTo(this);for(var f in c.options.services){var k=c.options.services[f];if(k.status!="on"){continue}var h=k.iframe_src(c.options);var e=b('<li class="help_info '+f+'"><span class="info">'+k.txt_info+"</span></li>").appendTo(g);b('<span class="switch off">'+k.txt_off+"</span>").appendTo(e);var d=b('<div class="dummy_btn"></div>').appendTo(e);d.append(c.dummy_image(k));e.click({serv:k,element:e},function(l){c.switch_button(l.data.serv,l.data.element)})}var e=b('<li class="settings_info"><div class="settings_info_menu off perma_option_off"><a href="'+c.options.info_link+'"><span class="help_info icon"><span class="info">'+c.options.txt_help+"</span></span></a></div></li>").appendTo(g);b(".help_info").each(function(){b(this).mouseenter(function(){if(!b(this).hasClass("info_off")){b(".info",this).show()}});b(this).mouseleave(function(){b(".info",this).hide()})});if(c.perma_is_on()){var j=e.find(".settings_info_menu").removeClass("perma_option_off");b('<span class="settings">Settings</span><form><fieldset><legend>'+c.options.settings_perma+"</legend></fieldset></form>").appendTo(j);for(var f in c.options.services){var k=c.options.services[f];if(!(k.status=="on"&&k.perma=="on")){continue}var i=(b.cookie("privacyShareButtons_"+f)=="perma_on")?'checked="checked"':"";j.find("form fieldset").append('<input type="checkbox" name="perma_status_'+f+'" id="perma_status_'+f+'" '+i+' /><label for="perma_status_'+f+'">'+k.display_name+"</label>");if(i!=""){b("li."+f+" span.switch",g).click()}}j.find("span.settings").css("cursor","pointer");j.find("span.settings").mouseenter(function(){j.removeClass("off").addClass("on")});e.mouseleave(function(){j.removeClass("on").addClass("off")});b(j.find("fieldset input")).click(function(n){var m=n.target.id;var l=m.substr(m.lastIndexOf("_")+1,m.length);var o="privacyShareButtons_"+l;if(b("#"+n.target.id+":checked").length){b.cookie(o,"perma_on",c.options.cookie_options);b("form fieldset label[for="+m+"]",g).addClass("checked")}else{b.cookie(o,null,c.options.cookie_options);b("form fieldset label[for="+m+"]",g).removeClass("checked")}})}})}};b.fn.socialShareButtons=function(c){new a(this,c);return this};b(document).ready(b(".social_share_privacy").socialShareButtons(socialshareprivacy_settings))})(jQuery);
\ No newline at end of file
(function(b){var a=function(d,c){this.elements=d;this.options=b.extend(true,{},this.defaults,c);if(!this.is_on()){return}this.append_css();this.attach()};a.prototype={defaults:{info_link:"http://cavallette.noblogs.org/?p=7641",txt_help:"When you activate these buttons by clicking on them, some of your personal data will be transferred to third parties and can be stored by them. For more information click on the <em> i </em>",settings_perma:"Permanently enable data transfer for:",css_path:"",uri:"",cookie_options:{path:"/",expires:365},services:{facebook:{display_name:"Facebook",status:"off",perma:"on",txt_info:"2 click for more privacy: only if you click here, the button will activate and you will be able to send your recommendation to Facebook. When enabled, data will be transferred to third parties - see <em> i </em>.",txt_off:"not connected with Facebook",txt_on:"connected with Facebook",dummy_img:"",action:"recommend",iframe_src:function(c){return'<iframe src="//www.facebook.com/plugins/like.php?href='+c.uri+"&amp;send=false&amp;layout=button_count&amp;width=100&amp;show_faces=false&amp;action="+c.services.facebook.action+'&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:130px; height:25px;" allowTransparency="true"></iframe>'}},twitter:{display_name:"Twitter",status:"off",perma:"on",txt_info:"2 click for more privacy: only if you click here, the button will activate and you will be able to send your recommendation to Twitter. When enabled, data will be transferred to third parties - see <em> i </em>.",txt_off:"not connected with Twitter",txt_on:"connected with Twitter",dummy_img:"",reply_to:"",text:encodeURIComponent(document.title),iframe_src:function(d){var c=(d.services.twitter.reply_to!="")?"&amp;via="+d.services.twitter.reply_to:"";return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?url='+d.uri+"&amp;counturl="+d.uri+"&amp;text="+d.services.twitter.text+c+"&amp;count=horizontal&amp;lang="+d.services.twitter.language+'" style="width:100px; height:25px;"></iframe>'}},identica:{display_name:"Identi.ca",status:"off",perma:"on",txt_info:"2 click for more privacy: only if you click here, the button will activate and you will be able to send your recommendation to Identi.ca. When enabled, data will be transferred to third parties - see <em> i </em>.",txt_off:"not connected with Identi.ca",txt_on:"connected with Identi.ca",dummy_img:"",text:encodeURIComponent(document.title),identica_lib:"",iframe_src:function(c){return'<iframe scrolling="no" frameborder="0" src="'+c.services.identica.identica_lib+"?noscript&style2&amp;title="+c.services.identica.text+'" allowtransparency="true" style="width:130px; height:25px; position: absolute;"></iframe>'}},gplus:{display_name:"Google+",status:"off",perma:"on",txt_info:"2 click for more privacy: only if you click here, the button will activate and you will be able to send your recommendation to Google+. When enabled, data will be transferred to third parties - see <em> i </em>.",txt_off:"not connected with Google+",txt_on:"connected with Google+",dummy_img:"",language:"en",iframe_src:function(d){var c=b('<div class="g-plusone" data-size="medium"></div>');var e='<script type="text/javascript">window.___gcfg = {lang: "'+d.services.gplus.language+'"}; (function() { var po = document.createElement("script"); po.type = "text/javascript";po.async = true; po.src = "https://apis.google.com/js/plusone.js"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s); })(); <\/script>';return c.append(e)}}}},is_on:function(){var d=false;for(var c in this.options.services){var e=this.options.services[c];if(e.status=="on"){d=true;break}}return d},perma_is_on:function(){var d=false;for(var c in this.options.services){var e=this.options.services[c];if(e.status=="on"&&e.perma=="on"){d=true;break}}return d&&(!b.browser.msie||(b.browser.msie&&(b.browser.version>7)))},append_css:function(){if(this.options.css_path.length>0){if(document.createStyleSheet){document.createStyleSheet(options.css_path)}else{b("head").append('<link rel="stylesheet" type="text/css" href="'+options.css_path+'" />')}}},dummy_image:function(c){return b("<img/>",{src:c.dummy_img,alt:c.display_name+" Dummy Image","class":"dummy_img"})},switch_button:function(c,f){var e=b(".switch",b(f));var d=b("div.dummy_btn",b(f));if(e.hasClass("off")){b(f).addClass("info_off");e.addClass("on").removeClass("off").html(c.txt_on);d.html(c.iframe_src(this.options))}else{b(f).removeClass("info_off");e.addClass("off").removeClass("on").html(c.txt_off);d.html(this.dummy_image(c))}},attach:function(){var c=this;this.elements.each(function(){var g=b('<ul class="social_share_privacy_area"></ul>').appendTo(this);for(var f in c.options.services){var k=c.options.services[f];if(k.status!="on"){continue}var h=k.iframe_src(c.options);var e=b('<li class="help_info '+f+'"><span class="info">'+k.txt_info+"</span></li>").appendTo(g);b('<span class="switch off">'+k.txt_off+"</span>").appendTo(e);var d=b('<div class="dummy_btn"></div>').appendTo(e);d.append(c.dummy_image(k));e.click({serv:k,element:e},function(l){c.switch_button(l.data.serv,l.data.element)})}var e=b('<li class="settings_info"><div class="settings_info_menu off perma_option_off"><a href="'+c.options.info_link+'"><span class="help_info icon"><span class="info">'+c.options.txt_help+"</span></span></a></div></li>").appendTo(g);b(".help_info").each(function(){b(this).mouseenter(function(){if(!b(this).hasClass("info_off")){b(".info",this).show()}});b(this).mouseleave(function(){b(".info",this).hide()})});if(c.perma_is_on()){var j=e.find(".settings_info_menu").removeClass("perma_option_off");b('<span class="settings">Settings</span><form><fieldset><legend>'+c.options.settings_perma+"</legend></fieldset></form>").appendTo(j);for(var f in c.options.services){var k=c.options.services[f];if(!(k.status=="on"&&k.perma=="on")){continue}var i=(b.cookie("privacyShareButtons_"+f)=="perma_on")?'checked="checked"':"";j.find("form fieldset").append('<input type="checkbox" name="perma_status_'+f+'" id="perma_status_'+f+'" '+i+' /><label for="perma_status_'+f+'">'+k.display_name+"</label>");if(i!=""){b("li."+f+" span.switch",g).click()}}j.find("span.settings").css("cursor","pointer");j.find("span.settings").mouseenter(function(){j.removeClass("off").addClass("on")});e.mouseleave(function(){j.removeClass("on").addClass("off")});b(j.find("fieldset input")).click(function(n){var m=n.target.id;var l=m.substr(m.lastIndexOf("_")+1,m.length);var o="privacyShareButtons_"+l;if(b("#"+n.target.id+":checked").length){b.cookie(o,"perma_on",c.options.cookie_options);b("form fieldset label[for="+m+"]",g).addClass("checked")}else{b.cookie(o,null,c.options.cookie_options);b("form fieldset label[for="+m+"]",g).removeClass("checked")}})}})}};b.fn.socialShareButtons=function(c){new a(this,c);return this};b(document).ready(b(".social_share_privacy").socialShareButtons(socialshareprivacy_settings))})(jQuery);
\ No newline at end of file
......@@ -37,8 +37,8 @@ class ShareButton {
$this->url = plugins_url(basename(dirname(__FILE__)));
$this->css = $this->url .'/css/socialshareprivacy.css';
$this->js = $this->url .'/js/jquery.privacysharebuttons.js';
$this->jquery_cookie = $this->url .'/js/jquery.cookie.js';
$this->js = $this->url .'/js/jquery.privacysharebuttons.min.js';
$this->jquery_cookie = $this->url .'/js/jquery.cookie.min.js';
$this->images = $this->url .'/images/';
$this->libs = $this->url .'/libs/';
$this->services = array(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment