commit/galaxy-central: kanwei: trackster: fix farb color picker playing badly with tipsy
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/afae1b303ca8/ changeset: r5017:afae1b303ca8 user: kanwei date: 2011-02-08 00:11:44 summary: trackster: fix farb color picker playing badly with tipsy affected #: 1 file (207 bytes) --- a/static/scripts/trackster.js Mon Feb 07 16:59:12 2011 -0500 +++ b/static/scripts/trackster.js Mon Feb 07 18:11:44 2011 -0500 @@ -870,22 +870,25 @@ var value = track_config.values[ param.key ]; var input = $('<input />').attr("id", id ).attr("name", id ).val( value ); // Color picker in tool tip style float - var tip = $( "<div class='tipsy tipsy-north' style='position: absolute;' />" ) - .append( $("<div class='tipsy-inner' />") - .farbtastic( { width: 100, height: 100, callback: input, color: value } ) ) - .hide(); + var tip = $( "<div class='tipsy tipsy-north' style='position: absolute;' />" ).hide(); + // Inner div for padding purposes + var tip_inner = $("<div style='background-color: black; padding: 10px;'></div>").appendTo(tip); + var farb_container = $("<div/>") + .appendTo(tip_inner) + .farbtastic( { width: 100, height: 100, callback: input, color: value }); + // Outer div container input and tip for hover to work $("<div />").append( input ).append( tip ).appendTo( row ).bind( "click", function ( e ) { tip.css( { left: $(this).position().left + ( $(input).width() / 2 ) - 60, top: $(this).position().top + $(this.height) - } ).show(); - $(document).bind( "click.color-picker", function() { - tip.hide(); - $(document).unbind( "click.color-picker" ); - }); + } ).show(); + $(document).bind( "click.color-picker", function() { + tip.hide(); + $(document).unbind( "click.color-picker" ); + }); e.stopPropagation(); - } ); + }); } else { row.append( $('<input />').attr("id", id ).attr("name", id ).val( track_config.values[ param.key ] ) ); } @@ -2369,7 +2372,7 @@ if (result.message) { canvas.css({ border: "solid red", - "border-width": "2px 2px 2px 0px" + "border-width": "2px 2px 2px 0px" }); ctx.fillStyle = "red"; ctx.textAlign = "left"; Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket