Aralot (aralot) wrote in changelog,
Aralot
aralot
changelog

[livejournal] r18865: LJSUP-8561: remove the extra (old) code ...

Committer: szhirkov
LJSUP-8561: remove the extra (old) code from Sharing Widget (because of new universal bubble implementation)
U   trunk/htdocs/js/share.js
Modified: trunk/htdocs/js/share.js
===================================================================
--- trunk/htdocs/js/share.js	2011-04-13 06:20:19 UTC (rev 18864)
+++ trunk/htdocs/js/share.js	2011-04-13 06:30:51 UTC (rev 18865)
@@ -198,25 +198,6 @@
 	}
 
 	function bindControls() {
-		/*
-		dom.bind( 'click', function( ev ) {
-			ev.stopPropagation();
-		} );
-		*/
-
-		
-		/*
-		function checkClose( e ) {
-			if( !skipCloseEvent ) {
-				togglePopup( false );
-			}
-			skipCloseEvent = false;
-		}
-		*/
-
-		//dom.find( selectors.close ).bind( 'click', function( ev ) { togglePopup( false ); } );
-		//$( document ).bind( 'click', checkClose );
-		//$( window ).bind( 'resize', checkClose );
 		dom.find( selectors.links ).click( function( ev )
 		{
 			dom.bubble('hide');
@@ -242,74 +223,6 @@
 		} );
 	}
 
-	/*
-	function updatePopupPosition() {
-		var linkPos = link.offset(),
-			linkH = link.height(), linkW = link.width(),
-			arrPos = "";
-
-		//we check if child elements of the link have bigger dimensions.
-		link.find( '*' ).each( function() {
-			var $this = $( this ),
-				position = $this.css( 'position' ),
-				height = $( this ).outerHeight();
-
-			if( $this.is( ':visible' ) && position != 'absolute'
-				&& position != 'fixed' && height > linkH ) {
-				linkH = height;
-			}
-		} );
-
-		dom.css( { left: "0px", top: "0px" } );
-
-		var scrollOffset = $( window ).scrollTop();
-		var upperSpace = linkPos.top - scrollOffset;
-		var lowerSpace = $( window ).height() - upperSpace - linkH;
-		var domH = dom.height(), domW = dom.width();
-
-		var linkTop = Math.floor( linkPos.top ), linkLeft = Math.floor( linkPos.left );
-
-
-		//we decide whether the popup should be shown under or above the link
-		if( lowerSpace < domH && upperSpace > domH ) {
-			linkTop -= domH + 9;
-			arrPos += "b";
-		} else {
-			linkTop += linkH + 7;
-			arrPos += "t";
-		}
-
-		//we decide whether the popup should positioned to the left or to the right from the link
-		var windowW = $( window ).width();
-		if( linkPos.left + domW > windowW ) {
-			linkLeft = windowW - domW - 8;
-			arrPos += "r";
-		} else {
-			arrPos += "l";
-			linkLeft -= 25;
-			if( linkW == 16 ) {
-				linkLeft -= 4;
-			}
-
-		}
-
-		arrow.removeClass().addClass( arrow_opts.className ).addClass( arrow_opts.position[ arrPos ] ); 
-
-		dom.css( { left: linkLeft + "px",top: linkTop + "px" } );
-	}
-	*/
-
-	/*
-	function togglePopup( show ) {
-		show = show || false;
-		if( show ) {
-			updatePopupPosition();
-		}
-
-		dom[ ( show ) ? 'show' : 'hide' ]();
-	}
-	*/
-
 	link.attr( 'href', 'javascript:void(0)' )
 		.one( 'click', function( ev ) {
 			ev.stopPropagation();

Tags: aralot, js, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments