Committer: dpetrov
LJSUP-8396: Interstitial need to open in new windowU trunk/htdocs/js/share.js
Modified: trunk/htdocs/js/share.js =================================================================== --- trunk/htdocs/js/share.js 2011-03-28 07:38:08 UTC (rev 18719) +++ trunk/htdocs/js/share.js 2011-03-28 09:06:44 UTC (rev 18720) @@ -212,7 +212,12 @@ dom.find( selectors.close ).bind( 'click', function( ev ) { togglePopup( false ); } ); $( document ).bind( 'click', checkClose ); $( window ).bind( 'resize', checkClose ); - dom.find( selectors.links ).click( function() { togglePopup( false ); } ); + dom.find( selectors.links ).click( function( ev ) + { + togglePopup( false ); + ev.preventDefault(); + window.open(this.href, 'sharer', 'toolbar=0,status=0,width=640,height=300'); + } ); } function updatePopupPosition() { @@ -312,14 +317,10 @@ if( service in global_options.services ) { link.each( function() { var url = supplant( serviceObj.bindLink, options ); - if( this.tagName.toLowerCase() === 'a' ) { - this.href = url; - this.target = "_blank"; - } else { - $( this ).click( function() { - window.open( url ); - } ); - } + $( this ).click( function( ev ) { + window.open( url, 'sharer', 'toolbar=0,status=0,width=640,height=300'); + ev.preventDefault(); + } ); } ); }