Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
copy and functionality fix for the tweet button on your collage page
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Miller authored and Adam Miller committed May 18, 2011
1 parent 0195b80 commit 918e61d
Show file tree
Hide file tree
Showing 4 changed files with 172 additions and 162 deletions.
2 changes: 1 addition & 1 deletion ff4/templates/things/_collage_tools.html
Expand Up @@ -15,7 +15,7 @@
<a target="_blank" class="facebook" href="http://www.facebook.com/share.php?u={{ current_url }}">
<span>{{ _('Post to Facebook') }}</span>
</a>
<a target="_blank" class="twitter" href="http://twitter.com/home?status={{ _('What does your Web look like? See my Webify Me collage and create your own') }}:%20@{{ bitly_url }}">
<a target="_blank" class="twitter" href="http://twitter.com/share" data-via="firefox" data-url="{{ bitly_url }}" data-text="{{ _('What does your Web look like? See my Webify Me collage and create your own') }}">
<span>{{ _('Share on Twitter') }}</span>
</a>

Expand Down
6 changes: 6 additions & 0 deletions static/js/vendor/app.js
Expand Up @@ -40,6 +40,12 @@
clip.setText( 'http://bit.ly/gyWp3m' );
} );
clip.glue( 'copy-btn' );

// social buttons
$( '.your-share .twitter' )
.socialShare( {
'share_params': $( '.your-share .twitter' ).data()
} );
break;
// The gallery page
case 'gallery':
Expand Down
4 changes: 4 additions & 0 deletions static/js/vendor/jquery.socialShare.js
Expand Up @@ -43,6 +43,10 @@
var $this = $( container );
var context = $.extend( {}, $.socialShare.cfg, options );

if( !( 'share_url' in options ) && $this.is( 'a' ) ) {
// use the href attribute for the share_url if it's not passed
if( $this.attr( 'href' ) ) context.share_url = $this.attr( 'href' );
}
context.$link = $this;

context.$link.bind( 'click', function( e ) {
Expand Down

0 comments on commit 918e61d

Please sign in to comment.