Skip to content

Commit

Permalink
Merge branch 'feature/accounts-list-16' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkingorg committed Apr 8, 2012
2 parents f9981ec + 2d7164d commit 2787484
Show file tree
Hide file tree
Showing 19 changed files with 407 additions and 594 deletions.
122 changes: 48 additions & 74 deletions assets/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,6 @@
width: 111px;
}

.social-disconnect {
background: url(delete-sprite.png) 0 0 no-repeat;
height: 14px;
width: 14px;
}

.social-disconnect:hover {
background-position: 0 -100px;
}

#social_proxy_keys {
margin-top: 10px;
}
Expand Down Expand Up @@ -97,34 +87,64 @@
}

.social-accounts {
margin: 10px 0;
margin: 20px 0 0;
max-width: 60em;
}
.social-view .form-table .social-accounts {
.social-accounts:first-child {
margin-top: 0;
}

.social-accounts .social-connect-button {
margin-bottom: 3px;
}

.social-accounts ul {
border-top: 1px solid #e5e5e5;
font-size: 16px;
margin-top: 0;
}

.social-accounts ul ul {
border-top: 0;
font-size: 12px;
.social-accounts ul li {
background: #fff;
margin: 0;
padding: 0;
}

.social-accounts ul ul li {
background: url(child-account-bullet.gif) no-repeat;
padding-left: 32px;
}

.social-accounts .social-accounts-item {
border-bottom: 1px solid #e5e5e5;
min-height: 30px;
line-height: 30px;
min-height: 32px;
line-height: 32px;
margin: 0;
padding: 5px 5px 5px 30px;
position: relative;
}
.social-accounts .social-accounts-item .social-accounts-item:last-child {
border-bottom: 0;
}
.social-accounts .social-accounts-item img {
position: absolute;
}
.social-accounts .social-accounts-item .name {
padding-left: 38px;
}
.social-accounts .social-accounts-item label {
display: block;
height: 32px;
line-height: 32px;
position: absolute;
top: 0;
}
.social-accounts .social-accounts-item label.default {
right: 100px;
}
.social-accounts .social-accounts-item label.enabled {
right: 8px;
}

.social-accounts a {
.social-accounts .name a {
font-weight: bold;
text-decoration: none;
}
Expand Down Expand Up @@ -157,22 +177,6 @@
top: -2px;
}

.social-accounts ul ul input {
margin-right: 5px;
}

.social-accounts .social-twitter-icon,
.social-accounts .social-facebook-icon,
.social-accounts .disconnect {
position: absolute;
}

.social-accounts .social-twitter-icon,
.social-accounts .social-facebook-icon {
top: 12px;
left: 5px;
}

.social-accounts-item .name span {
position: relative;
top: -1px;
Expand All @@ -197,8 +201,12 @@
}

.social-accounts .disconnect {
top: 11px;
right: 5px;
display: block;
height: 32px;
line-height: 32px;
position: absolute;
right: 8px;
top: 0;
}

.social-broadcast-options .social-accounts ul {
Expand Down Expand Up @@ -286,46 +294,12 @@

.social-login {
display: inline-block;
margin: 2px;
width: 150px;
height: 22px;
}

.social-disconnect {
position: relative;
top: 2px;
}

.social-collapsible {
margin: 20px 0;
}

.social-collapsible > .social-title {
background: url(e5e5e5.gif) repeat-x 0 center;
font-size: 14px;
margin: 0 10px 20px;
}

.social-collapsible > .social-title a {
background: #fff url(toggle.gif) no-repeat 0 0;
display: -moz-inline-box; /* FF2 */
display: inline-block; /* Standard. IE8+, Saf, FF3+ */
padding: 0 5px 0 15px;
text-decoration: none;
}

.social-collapsible .social-content {
display: none;
overflow: hidden;
zoom: 1;
}

.social-collapsible.social-open .social-title a {
background-position: 0 -100px;
}

.social-collapsible.social-open .social-content {
display: block;
}

/**
Expand Down Expand Up @@ -362,11 +336,11 @@
.social-connect-button input,
.social-connect-button label {
float: left;
margin: 8px 0 0 5px;
margin: 7px 0 0 10px;
}

.social-connect-button label {
margin-top: 4px;
margin: 4px 0 0 4px;
}

.social-connect-button a {
Expand Down
81 changes: 0 additions & 81 deletions assets/admin.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
(function($) {
$(function() {
$('.social-collapsible').each(function() {
var $t = $(this);
$t.find('.social-title a').click(function(e) {
$t.toggleClass('social-open');
e.preventDefault();
});
});

function counter($object, $counter, max) {
var content = $object.val();
$counter.html(max - content.length);
Expand Down Expand Up @@ -178,78 +170,5 @@
});
});

/**
* Facebook Pages support
*/
var originalHref = '';
$('#social-facebook-pages').click(function(){
var href = $('#facebook_signin').attr('href');

if (originalHref == '') {
originalHref = href;
}

if ($(this).is(':checked')) {
href += '&use_pages=true';
}
else {
href = originalHref;
}

$('#facebook_signin').attr('href', href);
});

$('.social-manage-facebook-pages').click(function(e){
e.preventDefault();

var $this = $(this);
var $parent = $this.closest('.social-accounts-item');
var $spinner = $parent.find('.social-facebook-pages-spinner');
$this.hide();
$spinner.fadeIn();

$.get($this.attr('href'), {}, function(data){
$spinner.hide();
if (data.result == 'success') {
var slide = false;
var $output = $parent.find('.social-facebook-pages');
if ($output.is(':visible')) {
$output.hide();
}
else {
slide = true;
}

$output.html(data.html);
if (slide) {
$output.slideDown();
}
else {
$output.fadeIn();
}

$this.parent().hide();
}
else {
$spinner.hide();
$this.parent().html(' - '+data.html).fadeIn();
}
}, 'json');
});

$('#social-accounts .social-facebook-pages input[type=checkbox]').live('change', function(){
var $parent = $(this).closest('.social-accounts-item');
var data = { 'page_ids[]' : [] };
$parent.find('input[type=checkbox]:checked').each(function(){
data['page_ids[]'].push($(this).val());
});
$.post($parent.find('input[name=social_save_url]').val(), data);
});

$('.social-show-facebook-pages').click(function(e){
e.preventDefault();
$(this).parent().hide();
$(this).closest('.social-accounts-item').find('.social-facebook-pages').slideDown();
});
});
})(jQuery);
Binary file added assets/child-account-bullet.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/delete-sprite.png
Binary file not shown.
Binary file removed assets/toggle.gif
Binary file not shown.
8 changes: 8 additions & 0 deletions lib/social/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,13 @@ public function __construct(Social_Request $request) {
$this->nonce_verified = true;
}
}

public function request() {
return $this->request;
}

public function social() {
return $this->social;
}

} // End Social_Controller
Loading

0 comments on commit 2787484

Please sign in to comment.