Initial commit
BIN
plugins/jetpack/modules/publicize/assets/connected.gif
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
plugins/jetpack/modules/publicize/assets/facebook-logo.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
plugins/jetpack/modules/publicize/assets/linkedin-logo.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
plugins/jetpack/modules/publicize/assets/path-logo.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
plugins/jetpack/modules/publicize/assets/publicize-fb-2x.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
plugins/jetpack/modules/publicize/assets/publicize-google-2x.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.2 KiB |
BIN
plugins/jetpack/modules/publicize/assets/publicize-path-2x.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
199
plugins/jetpack/modules/publicize/assets/publicize-rtl.css
Normal file
|
@ -0,0 +1,199 @@
|
|||
div#publicize-services-block {
|
||||
display: block;
|
||||
clear: both;
|
||||
margin-bottom: 25px;
|
||||
background-color: #fff;
|
||||
padding: 25px 20px 5px 25px;
|
||||
overflow: hidden;
|
||||
max-width: 1200px;
|
||||
}
|
||||
|
||||
/* Add the logos for the Publicize services */
|
||||
span.pub-logos {
|
||||
float: right;
|
||||
display: block;
|
||||
width: 130px;
|
||||
height: 75px;
|
||||
margin-top: -18px;
|
||||
margin-right: 5px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.left, .right{
|
||||
width: 50%;
|
||||
float: right;
|
||||
}
|
||||
|
||||
div#facebook { background: url( publicize-fb-2x.png ) no-repeat; background-size: 32px 32px; padding-right: 42px;background-position: 0px 0px;padding-top:5px; }
|
||||
div#twitter { background: url( publicize-twitter-2x.png ) no-repeat; background-size: 32px 32px; padding-right: 42px;background-position: 0px 0px;padding-top:5px; }
|
||||
div#linkedin { background: url( publicize-linkedin-2x.png )no-repeat; background-size: 32px 32px; padding-right: 42px;background-position: 0px 0px;padding-top:5px; }
|
||||
div#tumblr { background: url( publicize-tumblr-2x.png ) no-repeat; background-size: 32px 32px; padding-right: 42px;background-position: 0px 0px;padding-top:5px; }
|
||||
div#path { background: url( publicize-path-2x.png ) no-repeat; background-size: 32px 32px; padding-right: 42px;background-position: 0px 0px;padding-top:5px; }
|
||||
div#google_plus { background: url( publicize-google-2x.png ) no-repeat; background-size: 32px 32px; padding-right: 42px;background-position: 0px 0px;padding-top:5px; }
|
||||
|
||||
a.publicize-profile-link, a.publicize-profile-link:visited {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a.publicize-profile-link:hover {
|
||||
color: #f1831e;
|
||||
}
|
||||
|
||||
a.publicize-add-connection, a.publicize-add-connection:visited {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.publicize-add-connection:hover {
|
||||
color: #f1831e;
|
||||
}
|
||||
|
||||
div.publicize-service-entry {
|
||||
clear: both;
|
||||
margin-bottom: 10px;
|
||||
padding: 10px 0 25px 0;
|
||||
border-bottom: 1px #eee solid;
|
||||
margin-left: 40px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.publicize-service-entry:last-of-type{
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
div.publicize-service-left {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
vertical-align: top;
|
||||
min-height: 35px;
|
||||
}
|
||||
|
||||
|
||||
div.publicize-service-left a{
|
||||
font-size: 24px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div.publicize-service-left a:hover{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
div.publicize-service-right {
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
float: left;
|
||||
padding-top:5px;
|
||||
}
|
||||
|
||||
div.publicize-service-right ul {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
div.publicize-service-right li {
|
||||
list-style-type: none;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.pub-disconnect-button {
|
||||
-webkit-border-image: none;
|
||||
border-bottom-color: #CCC;
|
||||
border-bottom-style: none;
|
||||
border-bottom-width: 0px;
|
||||
border-right-color: #CCC;
|
||||
border-right-style: none;
|
||||
border-right-width: 0px;
|
||||
border-left-color: #CCC;
|
||||
border-left-style: none;
|
||||
border-left-width: 0px;
|
||||
border-top-color: #CCC;
|
||||
border-top-style: none;
|
||||
border-top-width: 0px;
|
||||
color: #CCC;
|
||||
cursor: auto;
|
||||
display: inline;
|
||||
font-family: sans-serif;
|
||||
font-size: 20px;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
height: auto;
|
||||
line-height: 22px;
|
||||
list-style-image: none;
|
||||
list-style-position: outside;
|
||||
list-style-type: none;
|
||||
margin-bottom: 0px;
|
||||
margin-right: 0px;
|
||||
margin-left: 0px;
|
||||
margin-top: 0px;
|
||||
outline-color: #CCC;
|
||||
outline-style: none;
|
||||
outline-width: 0px;
|
||||
overflow-y: visible;
|
||||
padding-bottom: 0px;
|
||||
padding-right: 0px;
|
||||
padding-left: 0px;
|
||||
padding-top: 0px;
|
||||
position: static;
|
||||
left: auto;
|
||||
text-align: right;
|
||||
text-decoration: none;
|
||||
top: auto;
|
||||
vertical-align: baseline;
|
||||
width: auto;
|
||||
z-index: auto;
|
||||
}
|
||||
|
||||
.pub-disconnect-button:hover {
|
||||
color: #f1831e;
|
||||
}
|
||||
|
||||
table#option-profile {
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
table#option-profile td {
|
||||
font-family: "Lucida Grande",Verdana,Arial,sans-serif;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table#option-profile td.radio {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
table#option-profile td.thumbnail {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
table#option-profile td.details {
|
||||
font-weight: bold; color: #333333
|
||||
}
|
||||
|
||||
table#option-fb-fanpage td, table#option-fanpage td {
|
||||
font-family: "Lucida Grande",Verdana,Arial,sans-serif;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table#option-fb-fanpage td.thumbnail, table#option-fanpage td.thumbnail {
|
||||
padding: 5px 20px 5px 20px;
|
||||
}
|
||||
|
||||
table#option-fb-fanpage td.details, table#option-fanpage td.details {
|
||||
width: 130px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
table#option-fb-fanpage td.details span.name, table#option-fanpage td.details span.name {
|
||||
font-weight: bold; color: #333333;
|
||||
}
|
||||
|
||||
table#option-fb-fanpage td.details span.category, table#option-fanpage td.details span.category {
|
||||
font-size: 10px; color: #888888;
|
||||
}
|
||||
|
||||
input.fb-options {
|
||||
font-family: "Lucida Grande",Verdana,Arial,sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.pub-connection-error {
|
||||
color: #ff0000;
|
||||
}
|
1
plugins/jetpack/modules/publicize/assets/publicize-rtl.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
div#publicize-services-block{display:block;clear:both;margin-bottom:25px;background-color:#fff;padding:25px 20px 5px 25px;overflow:hidden;max-width:1200px}span.pub-logos{float:right;display:block;width:130px;height:75px;margin-top:-18px;margin-right:5px;vertical-align:top}.left,.right{width:50%;float:right}div#facebook{background:url(publicize-fb-2x.png) 0 0/32px 32px no-repeat;padding-right:42px;padding-top:5px}div#twitter{background:url(publicize-twitter-2x.png) 0 0/32px 32px no-repeat;padding-right:42px;padding-top:5px}div#linkedin{background:url(publicize-linkedin-2x.png)no-repeat 0 0/32px 32px;padding-right:42px;padding-top:5px}div#tumblr{background:url(publicize-tumblr-2x.png) 0 0/32px 32px no-repeat;padding-right:42px;padding-top:5px}div#path{background:url(publicize-path-2x.png) 0 0/32px 32px no-repeat;padding-right:42px;padding-top:5px}div#google_plus{background:url(publicize-google-2x.png) 0 0/32px 32px no-repeat;padding-right:42px;padding-top:5px}a.publicize-profile-link,a.publicize-profile-link:visited{text-decoration:none;font-weight:700}a.publicize-profile-link:hover{color:#f1831e}a.publicize-add-connection,a.publicize-add-connection:visited{text-decoration:none}a.publicize-add-connection:hover{color:#f1831e}div.publicize-service-entry{clear:both;margin-bottom:10px;padding:10px 0 25px;border-bottom:1px #eee solid;margin-left:40px;overflow:hidden}div.publicize-service-entry:last-of-type{border-width:0}div.publicize-service-left{display:inline-block;width:150px;vertical-align:top;min-height:35px}div.publicize-service-left a{font-size:24px;text-decoration:none}div.publicize-service-left a:hover{text-decoration:underline}div.publicize-service-right{display:inline-block;text-align:left;float:left;padding-top:5px}div.publicize-service-right ul{margin-top:0}div.publicize-service-right li{list-style-type:none;font-size:14px}.pub-disconnect-button{-webkit-border-image:none;border-color:#CCC;border-style:none;border-width:0;color:#CCC;cursor:auto;display:inline;font-family:sans-serif;font-size:20px;font-style:normal;font-weight:400;height:auto;line-height:22px;list-style:none;margin:0;outline:#CCC 0;overflow-y:visible;padding:0;position:static;left:auto;text-align:right;text-decoration:none;top:auto;vertical-align:baseline;width:auto;z-index:auto}.pub-disconnect-button:hover{color:#f1831e}table#option-profile{padding-bottom:8px}table#option-profile td{font-family:"Lucida Grande",Verdana,Arial,sans-serif;vertical-align:middle}table#option-profile td.radio,table#option-profile td.thumbnail{padding-left:20px}table#option-profile td.details{font-weight:700;color:#333}table#option-fanpage td,table#option-fb-fanpage td{font-family:"Lucida Grande",Verdana,Arial,sans-serif;vertical-align:middle}table#option-fanpage td.thumbnail,table#option-fb-fanpage td.thumbnail{padding:5px 20px}table#option-fanpage td.details,table#option-fb-fanpage td.details{width:130px;padding-left:10px}table#option-fanpage td.details span.name,table#option-fb-fanpage td.details span.name{font-weight:700;color:#333}table#option-fanpage td.details span.category,table#option-fb-fanpage td.details span.category{font-size:10px;color:#888}input.fb-options{font-family:"Lucida Grande",Verdana,Arial,sans-serif;font-size:12px}.pub-connection-error{color:red}
|
BIN
plugins/jetpack/modules/publicize/assets/publicize-tumblr-2x.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 3.3 KiB |
199
plugins/jetpack/modules/publicize/assets/publicize.css
Normal file
|
@ -0,0 +1,199 @@
|
|||
div#publicize-services-block {
|
||||
display: block;
|
||||
clear: both;
|
||||
margin-bottom: 25px;
|
||||
background-color: #fff;
|
||||
padding: 25px 25px 5px 20px;
|
||||
overflow: hidden;
|
||||
max-width: 1200px;
|
||||
}
|
||||
|
||||
/* Add the logos for the Publicize services */
|
||||
span.pub-logos {
|
||||
float: left;
|
||||
display: block;
|
||||
width: 130px;
|
||||
height: 75px;
|
||||
margin-top: -18px;
|
||||
margin-left: 5px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.left, .right{
|
||||
width: 50%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
div#facebook { background: url( publicize-fb-2x.png ) no-repeat; background-size: 32px 32px; padding-left: 42px;background-position: 0px 0px;padding-top:5px; }
|
||||
div#twitter { background: url( publicize-twitter-2x.png ) no-repeat; background-size: 32px 32px; padding-left: 42px;background-position: 0px 0px;padding-top:5px; }
|
||||
div#linkedin { background: url( publicize-linkedin-2x.png )no-repeat; background-size: 32px 32px; padding-left: 42px;background-position: 0px 0px;padding-top:5px; }
|
||||
div#tumblr { background: url( publicize-tumblr-2x.png ) no-repeat; background-size: 32px 32px; padding-left: 42px;background-position: 0px 0px;padding-top:5px; }
|
||||
div#path { background: url( publicize-path-2x.png ) no-repeat; background-size: 32px 32px; padding-left: 42px;background-position: 0px 0px;padding-top:5px; }
|
||||
div#google_plus { background: url( publicize-google-2x.png ) no-repeat; background-size: 32px 32px; padding-left: 42px;background-position: 0px 0px;padding-top:5px; }
|
||||
|
||||
a.publicize-profile-link, a.publicize-profile-link:visited {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a.publicize-profile-link:hover {
|
||||
color: #f1831e;
|
||||
}
|
||||
|
||||
a.publicize-add-connection, a.publicize-add-connection:visited {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.publicize-add-connection:hover {
|
||||
color: #f1831e;
|
||||
}
|
||||
|
||||
div.publicize-service-entry {
|
||||
clear: both;
|
||||
margin-bottom: 10px;
|
||||
padding: 10px 0 25px 0;
|
||||
border-bottom: 1px #eee solid;
|
||||
margin-right: 40px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.publicize-service-entry:last-of-type{
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
div.publicize-service-left {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
vertical-align: top;
|
||||
min-height: 35px;
|
||||
}
|
||||
|
||||
|
||||
div.publicize-service-left a{
|
||||
font-size: 24px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div.publicize-service-left a:hover{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
div.publicize-service-right {
|
||||
display: inline-block;
|
||||
text-align: right;
|
||||
float: right;
|
||||
padding-top:5px;
|
||||
}
|
||||
|
||||
div.publicize-service-right ul {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
div.publicize-service-right li {
|
||||
list-style-type: none;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.pub-disconnect-button {
|
||||
-webkit-border-image: none;
|
||||
border-bottom-color: #CCC;
|
||||
border-bottom-style: none;
|
||||
border-bottom-width: 0px;
|
||||
border-left-color: #CCC;
|
||||
border-left-style: none;
|
||||
border-left-width: 0px;
|
||||
border-right-color: #CCC;
|
||||
border-right-style: none;
|
||||
border-right-width: 0px;
|
||||
border-top-color: #CCC;
|
||||
border-top-style: none;
|
||||
border-top-width: 0px;
|
||||
color: #CCC;
|
||||
cursor: auto;
|
||||
display: inline;
|
||||
font-family: sans-serif;
|
||||
font-size: 20px;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
height: auto;
|
||||
line-height: 22px;
|
||||
list-style-image: none;
|
||||
list-style-position: outside;
|
||||
list-style-type: none;
|
||||
margin-bottom: 0px;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
margin-top: 0px;
|
||||
outline-color: #CCC;
|
||||
outline-style: none;
|
||||
outline-width: 0px;
|
||||
overflow-y: visible;
|
||||
padding-bottom: 0px;
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
padding-top: 0px;
|
||||
position: static;
|
||||
right: auto;
|
||||
text-align: left;
|
||||
text-decoration: none;
|
||||
top: auto;
|
||||
vertical-align: baseline;
|
||||
width: auto;
|
||||
z-index: auto;
|
||||
}
|
||||
|
||||
.pub-disconnect-button:hover {
|
||||
color: #f1831e;
|
||||
}
|
||||
|
||||
table#option-profile {
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
table#option-profile td {
|
||||
font-family: "Lucida Grande",Verdana,Arial,sans-serif;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table#option-profile td.radio {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
table#option-profile td.thumbnail {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
table#option-profile td.details {
|
||||
font-weight: bold; color: #333333
|
||||
}
|
||||
|
||||
table#option-fb-fanpage td, table#option-fanpage td {
|
||||
font-family: "Lucida Grande",Verdana,Arial,sans-serif;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table#option-fb-fanpage td.thumbnail, table#option-fanpage td.thumbnail {
|
||||
padding: 5px 20px 5px 20px;
|
||||
}
|
||||
|
||||
table#option-fb-fanpage td.details, table#option-fanpage td.details {
|
||||
width: 130px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
table#option-fb-fanpage td.details span.name, table#option-fanpage td.details span.name {
|
||||
font-weight: bold; color: #333333;
|
||||
}
|
||||
|
||||
table#option-fb-fanpage td.details span.category, table#option-fanpage td.details span.category {
|
||||
font-size: 10px; color: #888888;
|
||||
}
|
||||
|
||||
input.fb-options {
|
||||
font-family: "Lucida Grande",Verdana,Arial,sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.pub-connection-error {
|
||||
color: #ff0000;
|
||||
}
|
184
plugins/jetpack/modules/publicize/assets/publicize.js
Normal file
|
@ -0,0 +1,184 @@
|
|||
/* jshint onevar: false, smarttabs: true */
|
||||
/* global tb_show, tb_pathToImage, ajaxurl, tb_init, tb_remove */
|
||||
/* global myblogsResponse, publicizeConnTestStart:true, publicizeConnTestComplete:true, publicizeConnRefreshClick:true */
|
||||
|
||||
var showOptionsPage;
|
||||
|
||||
jQuery( function( $ ) {
|
||||
|
||||
showOptionsPage = function( service, nonce, connection, blogId ) {
|
||||
tb_show( null, null, null );
|
||||
$('body').append( '<div id=\'TB_load\'><img src=\'' + tb_pathToImage + '\' /></div>' );
|
||||
$('#TB_load').show();
|
||||
|
||||
var query = '';
|
||||
if ( connection ) {
|
||||
query += '&connection=' + encodeURIComponent( connection );
|
||||
}
|
||||
if ( 'undefined' !== typeof( blogId ) && blogId ) {
|
||||
query += '&blog_id=' + Number( blogId );
|
||||
}
|
||||
|
||||
$.post( ajaxurl, 'action=publicize_' + service + '_options_page&_wpnonce=' + nonce + query, function( response ) {
|
||||
$('#TB_load').remove();
|
||||
|
||||
try {
|
||||
var obj = jQuery.parseJSON( response );
|
||||
if ( obj && 'object' === typeof( obj ) ) {
|
||||
if ( obj.hasOwnProperty( 'fb_redirect' ) ) {
|
||||
location.href = obj.fb_redirect + '&redirect_uri=' + encodeURIComponent( location.href );
|
||||
return;
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
// Do nothing and move on
|
||||
}
|
||||
|
||||
if ( response ) {
|
||||
var blogID = $( 'input[name=wpas_ajax_blog_id]' ).val();
|
||||
|
||||
var message = $( '<div id="wpas-ajax-' + blogID + '" class="wrap"></div>' ).append( response );
|
||||
message.append( '<a href="#TB_inline?thickbox&height=420&width=555&inlineId=wpas-ajax-' + blogID + '" id="wpas-click-' + blogID + '" class="new-thickbox" style="display: none;"></a>' );
|
||||
$('#wpas-message').html( message );
|
||||
|
||||
|
||||
tb_init( 'a.new-thickbox' );
|
||||
$('#wpas-click-' + blogID).click();
|
||||
|
||||
var tb_height = parseInt( $('#TB_ajaxContent').css('height'), 10 );
|
||||
var content_height = $('#thickbox-content').height();
|
||||
if ( content_height < tb_height ) {
|
||||
var new_height = content_height + 15;
|
||||
$('#TB_ajaxContent').css( 'height', new_height );
|
||||
|
||||
var new_margin = parseInt( $('#TB_window').css( 'margin-top'), 10 ) + (tb_height - new_height) / 2 + 'px';
|
||||
$('#TB_window').css( 'margin-top', new_margin);
|
||||
}
|
||||
|
||||
$('.save-options').unbind('click').click( function() {
|
||||
var sel = $( 'input[name=\'option\']:checked' );
|
||||
var global = $( 'input[name=\'global\']:checked' );
|
||||
|
||||
var connection = $(this).data('connection');
|
||||
var token = encodeURIComponent( sel.val() );
|
||||
var id = encodeURIComponent( sel.attr( 'id' ) );
|
||||
var type = encodeURIComponent( sel.attr( 'data-type' ) );
|
||||
var nonce = $(this).attr('rel');
|
||||
var global_conn = 'off';
|
||||
var global_nonce = '';
|
||||
|
||||
if ( global.length ) {
|
||||
global_conn = 'on';
|
||||
global_nonce = global.val();
|
||||
}
|
||||
|
||||
$.post( ajaxurl, 'action=publicize_'+ service + '_options_save&connection=' + connection + '&selected_id=' + id + '&token=' + token + '&type=' + type + '&_wpnonce=' + nonce + '&global=' + global_conn + '&global_nonce=' + global_nonce, function( /*response*/ ) {
|
||||
var frameNonce;
|
||||
tb_remove();
|
||||
frameNonce = document.location.search.match( /frame-nonce=([^&]+)/ );
|
||||
if ( /inside-newdash=1/.test( document.location.search ) && frameNonce ) {
|
||||
document.location = 'options-general.php?page=sharing&inside-newdash=1&frame-nonce' + frameNonce[1];
|
||||
} else {
|
||||
top.location = 'options-general.php?page=sharing';
|
||||
}
|
||||
} );
|
||||
|
||||
} );
|
||||
}
|
||||
|
||||
}, 'html' );
|
||||
};
|
||||
|
||||
$( 'body' ).append( '<div id="wpas-message" style="display: none"></div>' );
|
||||
|
||||
$( '.wpas-posts' ).change( function() {
|
||||
var inputs = $(this).parents( 'td:first' ).find( ':input' );
|
||||
var _this = this;
|
||||
var blogID = inputs.filter( '[name=wpas_ajax_blog_id]' ).val();
|
||||
|
||||
$( '#waiting_' + blogID ).show();
|
||||
$.post( ajaxurl, inputs.serialize() + '&action=wpas_post', function( response ) { myblogsResponse.call( _this, blogID, response ); }, 'html' );
|
||||
} );
|
||||
|
||||
$( '.options' ).unbind('click').bind( 'click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
var service = $(this).attr('class').replace( 'options ', '' );
|
||||
|
||||
var blogId = null;
|
||||
if ( 'undefined' !== typeof( $(this).attr('id') ) ) {
|
||||
blogId = parseInt( $(this).attr('id').replace( 'options-', '' ), 10 );
|
||||
}
|
||||
|
||||
var nonce = $(this).attr('href').replace( '#nonce=', '' );
|
||||
var connection = $(this).data( 'connection' );
|
||||
showOptionsPage.call( this, service, nonce, connection, blogId );
|
||||
});
|
||||
|
||||
/**
|
||||
* Kicks off tests for all connections
|
||||
*/
|
||||
publicizeConnTestStart = function() {
|
||||
$( '.pub-connection-test' )
|
||||
.addClass( 'test-in-progress' );
|
||||
$.post( ajaxurl, { action: 'test_publicize_conns' }, publicizeConnTestComplete );
|
||||
};
|
||||
|
||||
publicizeConnRefreshClick = function( event ) {
|
||||
event.preventDefault();
|
||||
var popupURL = event.currentTarget.href;
|
||||
var popupTitle = event.currentTarget.title;
|
||||
// open a popup window
|
||||
// when it is closed, kick off the tests again
|
||||
var popupWin = window.open( popupURL, popupTitle, '' );
|
||||
var popupWinTimer= window.setInterval( function() {
|
||||
if ( popupWin.closed !== false ) {
|
||||
window.clearInterval( popupWinTimer );
|
||||
publicizeConnTestStart();
|
||||
}
|
||||
}, 500 );
|
||||
};
|
||||
|
||||
publicizeConnTestComplete = function( response ) {
|
||||
$( '.pub-connection-test' ).removeClass( 'test-in-progress' );
|
||||
|
||||
$.each( response.data, function( index, testResult ) {
|
||||
// find the li for this connection
|
||||
var testSelector = '#pub-connection-test-' + testResult.connectionID;
|
||||
if ( testResult.connectionTestPassed ) {
|
||||
$( testSelector )
|
||||
.addClass( 'test-passed' )
|
||||
.html( '' )
|
||||
.removeClass( 'test-failed' );
|
||||
} else {
|
||||
$( testSelector )
|
||||
.addClass( 'test-failed' )
|
||||
.html( '<p><span class="pub-connection-error">' + testResult.connectionTestMessage + '</span></p>' )
|
||||
.removeClass( 'test-passed' );
|
||||
|
||||
if ( testResult.userCanRefresh ) {
|
||||
$( testSelector )
|
||||
.append( '<br/>' );
|
||||
$( '<a/>', {
|
||||
'class' : 'pub-refresh-button button',
|
||||
'title' : testResult.refreshText,
|
||||
'href' : testResult.refreshURL,
|
||||
'text' : testResult.refreshText,
|
||||
'target' : '_refresh_' + testResult.serviceName
|
||||
} )
|
||||
.appendTo( testSelector )
|
||||
.click( publicizeConnRefreshClick );
|
||||
}
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
||||
$( document ).ready( function() {
|
||||
// If we have at least one .pub-connection-test div present, kick off the connection test
|
||||
if ( $( '.pub-connection-test' ).length ) {
|
||||
publicizeConnTestStart();
|
||||
}
|
||||
} );
|
||||
|
||||
} );
|
1
plugins/jetpack/modules/publicize/assets/publicize.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
div#publicize-services-block{display:block;clear:both;margin-bottom:25px;background-color:#fff;padding:25px 25px 5px 20px;overflow:hidden;max-width:1200px}span.pub-logos{float:left;display:block;width:130px;height:75px;margin-top:-18px;margin-left:5px;vertical-align:top}.left,.right{width:50%;float:left}div#facebook{background:url(publicize-fb-2x.png) 0 0/32px 32px no-repeat;padding-left:42px;padding-top:5px}div#twitter{background:url(publicize-twitter-2x.png) 0 0/32px 32px no-repeat;padding-left:42px;padding-top:5px}div#linkedin{background:url(publicize-linkedin-2x.png)no-repeat 0 0/32px 32px;padding-left:42px;padding-top:5px}div#tumblr{background:url(publicize-tumblr-2x.png) 0 0/32px 32px no-repeat;padding-left:42px;padding-top:5px}div#path{background:url(publicize-path-2x.png) 0 0/32px 32px no-repeat;padding-left:42px;padding-top:5px}div#google_plus{background:url(publicize-google-2x.png) 0 0/32px 32px no-repeat;padding-left:42px;padding-top:5px}a.publicize-profile-link,a.publicize-profile-link:visited{text-decoration:none;font-weight:700}a.publicize-profile-link:hover{color:#f1831e}a.publicize-add-connection,a.publicize-add-connection:visited{text-decoration:none}a.publicize-add-connection:hover{color:#f1831e}div.publicize-service-entry{clear:both;margin-bottom:10px;padding:10px 0 25px;border-bottom:1px #eee solid;margin-right:40px;overflow:hidden}div.publicize-service-entry:last-of-type{border-width:0}div.publicize-service-left{display:inline-block;width:150px;vertical-align:top;min-height:35px}div.publicize-service-left a{font-size:24px;text-decoration:none}div.publicize-service-left a:hover{text-decoration:underline}div.publicize-service-right{display:inline-block;text-align:right;float:right;padding-top:5px}div.publicize-service-right ul{margin-top:0}div.publicize-service-right li{list-style-type:none;font-size:14px}.pub-disconnect-button{-webkit-border-image:none;border-color:#CCC;border-style:none;border-width:0;color:#CCC;cursor:auto;display:inline;font-family:sans-serif;font-size:20px;font-style:normal;font-weight:400;height:auto;line-height:22px;list-style:none;margin:0;outline:#CCC 0;overflow-y:visible;padding:0;position:static;right:auto;text-align:left;text-decoration:none;top:auto;vertical-align:baseline;width:auto;z-index:auto}.pub-disconnect-button:hover{color:#f1831e}table#option-profile{padding-bottom:8px}table#option-profile td{font-family:"Lucida Grande",Verdana,Arial,sans-serif;vertical-align:middle}table#option-profile td.radio,table#option-profile td.thumbnail{padding-right:20px}table#option-profile td.details{font-weight:700;color:#333}table#option-fanpage td,table#option-fb-fanpage td{font-family:"Lucida Grande",Verdana,Arial,sans-serif;vertical-align:middle}table#option-fanpage td.thumbnail,table#option-fb-fanpage td.thumbnail{padding:5px 20px}table#option-fanpage td.details,table#option-fb-fanpage td.details{width:130px;padding-right:10px}table#option-fanpage td.details span.name,table#option-fb-fanpage td.details span.name{font-weight:700;color:#333}table#option-fanpage td.details span.category,table#option-fb-fanpage td.details span.category{font-size:10px;color:#888}input.fb-options{font-family:"Lucida Grande",Verdana,Arial,sans-serif;font-size:12px}.pub-connection-error{color:red}
|
201
plugins/jetpack/modules/publicize/assets/rtl/publicize-rtl.css
Normal file
|
@ -0,0 +1,201 @@
|
|||
/* This file was automatically generated on Jan 15 2014 20:27:52 */
|
||||
|
||||
div#publicize-services-block {
|
||||
display: block;
|
||||
clear: both;
|
||||
margin-bottom: 25px;
|
||||
background-color: #fff;
|
||||
padding: 25px 20px 5px 25px;
|
||||
overflow: hidden;
|
||||
max-width: 1200px;
|
||||
}
|
||||
|
||||
/* Add the logos for the Publicize services */
|
||||
span.pub-logos {
|
||||
float: right;
|
||||
display: block;
|
||||
width: 130px;
|
||||
height: 75px;
|
||||
margin-top: -18px;
|
||||
margin-right: 5px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.left, .right{
|
||||
width: 50%;
|
||||
float: right;
|
||||
}
|
||||
|
||||
div#facebook { background: url( ../publicize-fb-2x.png ) no-repeat; background-size: 32px 32px; padding-right: 42px;background-position: 0px 0px;padding-top:5px; }
|
||||
div#twitter { background: url( ../publicize-twitter-2x.png ) no-repeat; background-size: 32px 32px; padding-right: 42px;background-position: 0px 0px;padding-top:5px; }
|
||||
div#linkedin { background: url( ../publicize-linkedin-2x.png )no-repeat; background-size: 32px 32px; padding-right: 42px;background-position: 0px 0px;padding-top:5px; }
|
||||
div#tumblr { background: url( ../publicize-tumblr-2x.png ) no-repeat; background-size: 32px 32px; padding-right: 42px;background-position: 0px 0px;padding-top:5px; }
|
||||
div#path { background: url( ../publicize-path-2x.png ) no-repeat; background-size: 32px 32px; padding-right: 42px;background-position: 0px 0px;padding-top:5px; }
|
||||
div#google_plus { background: url( ../publicize-google-2x.png ) no-repeat; background-size: 32px 32px; padding-right: 42px;background-position: 0px 0px;padding-top:5px; }
|
||||
|
||||
a.publicize-profile-link, a.publicize-profile-link:visited {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a.publicize-profile-link:hover {
|
||||
color: #f1831e;
|
||||
}
|
||||
|
||||
a.publicize-add-connection, a.publicize-add-connection:visited {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.publicize-add-connection:hover {
|
||||
color: #f1831e;
|
||||
}
|
||||
|
||||
div.publicize-service-entry {
|
||||
clear: both;
|
||||
margin-bottom: 10px;
|
||||
padding: 10px 0 25px 0;
|
||||
border-bottom: 1px #eee solid;
|
||||
margin-left: 40px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.publicize-service-entry:last-of-type{
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
div.publicize-service-left {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
vertical-align: top;
|
||||
min-height: 35px;
|
||||
}
|
||||
|
||||
|
||||
div.publicize-service-left a{
|
||||
font-size: 24px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div.publicize-service-left a:hover{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
div.publicize-service-right {
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
float: left;
|
||||
padding-top:5px;
|
||||
}
|
||||
|
||||
div.publicize-service-right ul {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
div.publicize-service-right li {
|
||||
list-style-type: none;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.pub-disconnect-button {
|
||||
-webkit-border-image: none;
|
||||
border-bottom-color: #CCC;
|
||||
border-bottom-style: none;
|
||||
border-bottom-width: 0px;
|
||||
border-right-color: #CCC;
|
||||
border-right-style: none;
|
||||
border-right-width: 0px;
|
||||
border-left-color: #CCC;
|
||||
border-left-style: none;
|
||||
border-left-width: 0px;
|
||||
border-top-color: #CCC;
|
||||
border-top-style: none;
|
||||
border-top-width: 0px;
|
||||
color: #CCC;
|
||||
cursor: auto;
|
||||
display: inline;
|
||||
font-family: sans-serif;
|
||||
font-size: 20px;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
height: auto;
|
||||
line-height: 22px;
|
||||
list-style-image: none;
|
||||
list-style-position: outside;
|
||||
list-style-type: none;
|
||||
margin-bottom: 0px;
|
||||
margin-right: 0px;
|
||||
margin-left: 0px;
|
||||
margin-top: 0px;
|
||||
outline-color: #CCC;
|
||||
outline-style: none;
|
||||
outline-width: 0px;
|
||||
overflow-y: visible;
|
||||
padding-bottom: 0px;
|
||||
padding-right: 0px;
|
||||
padding-left: 0px;
|
||||
padding-top: 0px;
|
||||
position: static;
|
||||
left: auto;
|
||||
text-align: right;
|
||||
text-decoration: none;
|
||||
top: auto;
|
||||
vertical-align: baseline;
|
||||
width: auto;
|
||||
z-index: auto;
|
||||
}
|
||||
|
||||
.pub-disconnect-button:hover {
|
||||
color: #f1831e;
|
||||
}
|
||||
|
||||
table#option-profile {
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
table#option-profile td {
|
||||
font-family: "Lucida Grande",Verdana,Arial,sans-serif;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table#option-profile td.radio {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
table#option-profile td.thumbnail {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
table#option-profile td.details {
|
||||
font-weight: bold; color: #333333
|
||||
}
|
||||
|
||||
table#option-fb-fanpage td, table#option-fanpage td {
|
||||
font-family: "Lucida Grande",Verdana,Arial,sans-serif;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table#option-fb-fanpage td.thumbnail, table#option-fanpage td.thumbnail {
|
||||
padding: 5px 20px 5px 20px;
|
||||
}
|
||||
|
||||
table#option-fb-fanpage td.details, table#option-fanpage td.details {
|
||||
width: 130px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
table#option-fb-fanpage td.details span.name, table#option-fanpage td.details span.name {
|
||||
font-weight: bold; color: #333333;
|
||||
}
|
||||
|
||||
table#option-fb-fanpage td.details span.category, table#option-fanpage td.details span.category {
|
||||
font-size: 10px; color: #888888;
|
||||
}
|
||||
|
||||
input.fb-options {
|
||||
font-family: "Lucida Grande",Verdana,Arial,sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.pub-connection-error {
|
||||
color: #ff0000;
|
||||
}
|
BIN
plugins/jetpack/modules/publicize/assets/spinner.gif
Normal file
After Width: | Height: | Size: 457 B |
BIN
plugins/jetpack/modules/publicize/assets/tumblr-logo.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
BIN
plugins/jetpack/modules/publicize/assets/twitter-logo.png
Normal file
After Width: | Height: | Size: 4.4 KiB |