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:
@@ -7,6 +7,7 @@ gwt_module(
|
|||||||
resources = [
|
resources = [
|
||||||
SRC + 'clippy/client/clippy.css',
|
SRC + 'clippy/client/clippy.css',
|
||||||
SRC + 'clippy/client/clippy.swf',
|
SRC + 'clippy/client/clippy.swf',
|
||||||
|
SRC + 'clippy/client/clipboard-16.png',
|
||||||
SRC + 'clippy/client/CopyableLabelText.properties',
|
SRC + 'clippy/client/CopyableLabelText.properties',
|
||||||
],
|
],
|
||||||
provided_deps = ['//lib/gwt:user'],
|
provided_deps = ['//lib/gwt:user'],
|
||||||
@@ -14,6 +15,7 @@ gwt_module(
|
|||||||
':SafeHtml',
|
':SafeHtml',
|
||||||
':UserAgent',
|
':UserAgent',
|
||||||
'//lib:LICENSE-clippy',
|
'//lib:LICENSE-clippy',
|
||||||
|
'//lib:LICENSE-drifty',
|
||||||
],
|
],
|
||||||
visibility = ['PUBLIC'],
|
visibility = ['PUBLIC'],
|
||||||
)
|
)
|
||||||
|
@@ -18,6 +18,7 @@ import com.google.gwt.core.client.GWT;
|
|||||||
import com.google.gwt.resources.client.ClientBundle;
|
import com.google.gwt.resources.client.ClientBundle;
|
||||||
import com.google.gwt.resources.client.DataResource;
|
import com.google.gwt.resources.client.DataResource;
|
||||||
import com.google.gwt.resources.client.DataResource.DoNotEmbed;
|
import com.google.gwt.resources.client.DataResource.DoNotEmbed;
|
||||||
|
import com.google.gwt.resources.client.ImageResource;
|
||||||
|
|
||||||
public interface ClippyResources extends ClientBundle {
|
public interface ClippyResources extends ClientBundle {
|
||||||
public static final ClippyResources I = GWT.create(ClippyResources.class);
|
public static final ClippyResources I = GWT.create(ClippyResources.class);
|
||||||
@@ -28,4 +29,7 @@ public interface ClippyResources extends ClientBundle {
|
|||||||
@Source("clippy.swf")
|
@Source("clippy.swf")
|
||||||
@DoNotEmbed
|
@DoNotEmbed
|
||||||
DataResource swf();
|
DataResource swf();
|
||||||
|
|
||||||
|
@Source("clipboard-16.png")
|
||||||
|
ImageResource clipboard();
|
||||||
}
|
}
|
||||||
|
@@ -119,7 +119,12 @@ public class CopyableLabel extends Composite implements HasText {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (UserAgent.hasJavaScriptClipboard()) {
|
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());
|
copier.setStyleName(ClippyResources.I.css().copier());
|
||||||
Tooltip.addStyle(copier);
|
Tooltip.addStyle(copier);
|
||||||
Tooltip.setLabel(copier, CopyableLabelText.I.tooltip());
|
Tooltip.setLabel(copier, CopyableLabelText.I.tooltip());
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 623 B |
@@ -54,7 +54,7 @@ public class UserPopupPanel extends PopupPanel {
|
|||||||
switchAccount.setHref(Gerrit.info().auth().switchAccountUrl());
|
switchAccount.setHref(Gerrit.info().auth().switchAccountUrl());
|
||||||
} else if (Gerrit.info().auth().isDev()
|
} else if (Gerrit.info().auth().isDev()
|
||||||
|| Gerrit.info().auth().isOpenId()) {
|
|| Gerrit.info().auth().isOpenId()) {
|
||||||
switchAccount.setHref(Gerrit.selfRedirect("/login/"));
|
switchAccount.setHref(Gerrit.selfRedirect("/login"));
|
||||||
} else {
|
} else {
|
||||||
switchAccount.removeFromParent();
|
switchAccount.removeFromParent();
|
||||||
switchAccount = null;
|
switchAccount = null;
|
||||||
|
1
lib/BUCK
1
lib/BUCK
@@ -12,6 +12,7 @@ define_license(name = 'bouncycastle')
|
|||||||
define_license(name = 'clippy')
|
define_license(name = 'clippy')
|
||||||
define_license(name = 'codemirror')
|
define_license(name = 'codemirror')
|
||||||
define_license(name = 'diffy')
|
define_license(name = 'diffy')
|
||||||
|
define_license(name = 'drifty')
|
||||||
define_license(name = 'freebie_application_icon_set')
|
define_license(name = 'freebie_application_icon_set')
|
||||||
define_license(name = 'h2')
|
define_license(name = 'h2')
|
||||||
define_license(name = 'jgit')
|
define_license(name = 'jgit')
|
||||||
|
21
lib/LICENSE-drifty
Normal file
21
lib/LICENSE-drifty
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2014 Drifty (http://drifty.com/)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
Reference in New Issue
Block a user