Merge branch 'stable-2.11' into stable-2.12
* stable-2.11: Fix double slash on URL when switching account. Use image instead of Unicode Character for Copy Button Change-Id: I6474cf80326eb80e42505c050f9ed42a16af43c3
This commit is contained in:
@@ -18,6 +18,7 @@ import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.DataResource;
|
||||
import com.google.gwt.resources.client.DataResource.DoNotEmbed;
|
||||
import com.google.gwt.resources.client.ImageResource;
|
||||
|
||||
public interface ClippyResources extends ClientBundle {
|
||||
public static final ClippyResources I = GWT.create(ClippyResources.class);
|
||||
@@ -28,4 +29,7 @@ public interface ClippyResources extends ClientBundle {
|
||||
@Source("clippy.swf")
|
||||
@DoNotEmbed
|
||||
DataResource swf();
|
||||
|
||||
@Source("clipboard-16.png")
|
||||
ImageResource clipboard();
|
||||
}
|
||||
|
@@ -119,7 +119,12 @@ public class CopyableLabel extends Composite implements HasText {
|
||||
}
|
||||
|
||||
if (UserAgent.hasJavaScriptClipboard()) {
|
||||
copier = new Button("📋"); // CLIPBOARD
|
||||
copier = new Button(new SafeHtmlBuilder()
|
||||
.openElement("img")
|
||||
.setAttribute("src", ClippyResources.I.clipboard().getSafeUri().asString())
|
||||
.setWidth(14)
|
||||
.setHeight(14)
|
||||
.closeSelf());
|
||||
copier.setStyleName(ClippyResources.I.css().copier());
|
||||
Tooltip.addStyle(copier);
|
||||
Tooltip.setLabel(copier, CopyableLabelText.I.tooltip());
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 623 B |
Reference in New Issue
Block a user