Merge "ChangeScreen2: Rename "Revisions" to "Patch Sets""
This commit is contained in:
@@ -159,8 +159,8 @@ public class ChangeScreen2 extends Screen {
|
|||||||
@UiField History history;
|
@UiField History history;
|
||||||
|
|
||||||
@UiField Button includedIn;
|
@UiField Button includedIn;
|
||||||
@UiField Button revisions;
|
@UiField Button patchSets;
|
||||||
@UiField Element revisionsText;
|
@UiField Element patchSetsText;
|
||||||
@UiField Button download;
|
@UiField Button download;
|
||||||
@UiField Button reply;
|
@UiField Button reply;
|
||||||
@UiField Button expandAll;
|
@UiField Button expandAll;
|
||||||
@@ -171,7 +171,7 @@ public class ChangeScreen2 extends Screen {
|
|||||||
private ReplyAction replyAction;
|
private ReplyAction replyAction;
|
||||||
private EditMessageAction editMessageAction;
|
private EditMessageAction editMessageAction;
|
||||||
private IncludedInAction includedInAction;
|
private IncludedInAction includedInAction;
|
||||||
private RevisionsAction revisionsAction;
|
private PatchSetsAction patchSetsAction;
|
||||||
private DownloadAction downloadAction;
|
private DownloadAction downloadAction;
|
||||||
|
|
||||||
public ChangeScreen2(Change.Id changeId, String base, String revision, boolean openReplyBox) {
|
public ChangeScreen2(Change.Id changeId, String base, String revision, boolean openReplyBox) {
|
||||||
@@ -340,11 +340,11 @@ public class ChangeScreen2 extends Screen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int currentlyViewedPatchSet = info.revision(revision)._number();
|
int currentlyViewedPatchSet = info.revision(revision)._number();
|
||||||
revisionsText.setInnerText(Resources.M.revisions(
|
patchSetsText.setInnerText(Resources.M.patchSets(
|
||||||
currentlyViewedPatchSet, currentPatchSet));
|
currentlyViewedPatchSet, currentPatchSet));
|
||||||
revisionsAction = new RevisionsAction(
|
patchSetsAction = new PatchSetsAction(
|
||||||
info.legacy_id(), revision,
|
info.legacy_id(), revision,
|
||||||
style, headerLine, revisions);
|
style, headerLine, patchSets);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initDownloadAction(ChangeInfo info, String revision) {
|
private void initDownloadAction(ChangeInfo info, String revision) {
|
||||||
@@ -466,9 +466,9 @@ public class ChangeScreen2 extends Screen {
|
|||||||
downloadAction.show();
|
downloadAction.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@UiHandler("revisions")
|
@UiHandler("patchSets")
|
||||||
void onRevision(ClickEvent e) {
|
void onPatchSets(ClickEvent e) {
|
||||||
revisionsAction.show();
|
patchSetsAction.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@UiHandler("reply")
|
@UiHandler("reply")
|
||||||
|
@@ -358,8 +358,8 @@ limitations under the License.
|
|||||||
<g:Button ui:field='includedIn' styleName='' visible="false">
|
<g:Button ui:field='includedIn' styleName='' visible="false">
|
||||||
<div><ui:msg>Included in</ui:msg></div>
|
<div><ui:msg>Included in</ui:msg></div>
|
||||||
</g:Button>
|
</g:Button>
|
||||||
<g:Button ui:field='revisions' styleName=''>
|
<g:Button ui:field='patchSets' styleName=''>
|
||||||
<div ui:field='revisionsText'/>
|
<div ui:field='patchSetsText'/>
|
||||||
</g:Button>
|
</g:Button>
|
||||||
<g:Button ui:field='download' styleName=''>
|
<g:Button ui:field='download' styleName=''>
|
||||||
<div><ui:msg>Download</ui:msg></div>
|
<div><ui:msg>Download</ui:msg></div>
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
package com.google.gerrit.client.change;
|
package com.google.gerrit.client.change;
|
||||||
|
|
||||||
public interface Messages extends com.google.gwt.i18n.client.Messages {
|
public interface Messages extends com.google.gwt.i18n.client.Messages {
|
||||||
String revisions(int currentlyViewedPatchSet, int currentPatchSet);
|
String patchSets(int currentlyViewedPatchSet, int currentPatchSet);
|
||||||
String changeWithNoRevisions(int changeId);
|
String changeWithNoRevisions(int changeId);
|
||||||
String relatedChanges(int count);
|
String relatedChanges(int count);
|
||||||
String relatedChanges(String count);
|
String relatedChanges(String count);
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
revisions = Revisions ({0}/{1})
|
patchSets = Patch Sets ({0}/{1})
|
||||||
changeWithNoRevisions = Cannot display change {0} because it has no revisions.
|
changeWithNoRevisions = Cannot display change {0} because it has no revisions.
|
||||||
relatedChanges = Related Changes ({0})
|
relatedChanges = Related Changes ({0})
|
||||||
conflictingChanges = Conflicts With ({0})
|
conflictingChanges = Conflicts With ({0})
|
||||||
|
@@ -18,17 +18,17 @@ import com.google.gerrit.reviewdb.client.Change;
|
|||||||
import com.google.gwt.user.client.ui.UIObject;
|
import com.google.gwt.user.client.ui.UIObject;
|
||||||
import com.google.gwt.user.client.ui.Widget;
|
import com.google.gwt.user.client.ui.Widget;
|
||||||
|
|
||||||
class RevisionsAction extends RightSidePopdownAction {
|
class PatchSetsAction extends RightSidePopdownAction {
|
||||||
private final RevisionsBox revisionBox;
|
private final PatchSetsBox revisionBox;
|
||||||
|
|
||||||
RevisionsAction(
|
PatchSetsAction(
|
||||||
Change.Id changeId,
|
Change.Id changeId,
|
||||||
String revision,
|
String revision,
|
||||||
ChangeScreen2.Style style,
|
ChangeScreen2.Style style,
|
||||||
UIObject relativeTo,
|
UIObject relativeTo,
|
||||||
Widget downloadButton) {
|
Widget downloadButton) {
|
||||||
super(style, relativeTo, downloadButton);
|
super(style, relativeTo, downloadButton);
|
||||||
this.revisionBox = new RevisionsBox(changeId, revision);
|
this.revisionBox = new PatchSetsBox(changeId, revision);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget getWidget() {
|
Widget getWidget() {
|
@@ -50,8 +50,8 @@ import com.google.gwtexpui.safehtml.client.SafeHtmlBuilder;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
class RevisionsBox extends Composite {
|
class PatchSetsBox extends Composite {
|
||||||
interface Binder extends UiBinder<HTMLPanel, RevisionsBox> {}
|
interface Binder extends UiBinder<HTMLPanel, PatchSetsBox> {}
|
||||||
private static final Binder uiBinder = GWT.create(Binder.class);
|
private static final Binder uiBinder = GWT.create(Binder.class);
|
||||||
|
|
||||||
private static final String OPEN;
|
private static final String OPEN;
|
||||||
@@ -64,13 +64,13 @@ class RevisionsBox extends Composite {
|
|||||||
|
|
||||||
private static final native void init(String o) /*-{
|
private static final native void init(String o) /*-{
|
||||||
$wnd[o] = $entry(function(e,i) {
|
$wnd[o] = $entry(function(e,i) {
|
||||||
return @com.google.gerrit.client.change.RevisionsBox::onOpen(Lcom/google/gwt/dom/client/NativeEvent;I)(e,i);
|
return @com.google.gerrit.client.change.PatchSetsBox::onOpen(Lcom/google/gwt/dom/client/NativeEvent;I)(e,i);
|
||||||
});
|
});
|
||||||
}-*/;
|
}-*/;
|
||||||
|
|
||||||
private static boolean onOpen(NativeEvent e, int idx) {
|
private static boolean onOpen(NativeEvent e, int idx) {
|
||||||
if (link.handleAsClick(e.<Event> cast())) {
|
if (link.handleAsClick(e.<Event> cast())) {
|
||||||
RevisionsBox t = getRevisionBox(e);
|
PatchSetsBox t = getRevisionBox(e);
|
||||||
if (t != null) {
|
if (t != null) {
|
||||||
t.onOpenRow(idx);
|
t.onOpenRow(idx);
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -80,12 +80,12 @@ class RevisionsBox extends Composite {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static RevisionsBox getRevisionBox(NativeEvent event) {
|
private static PatchSetsBox getRevisionBox(NativeEvent event) {
|
||||||
com.google.gwt.user.client.Element e = event.getEventTarget().cast();
|
com.google.gwt.user.client.Element e = event.getEventTarget().cast();
|
||||||
for (e = DOM.getParent(e); e != null; e = DOM.getParent(e)) {
|
for (e = DOM.getParent(e); e != null; e = DOM.getParent(e)) {
|
||||||
EventListener l = DOM.getEventListener(e);
|
EventListener l = DOM.getEventListener(e);
|
||||||
if (l instanceof RevisionsBox) {
|
if (l instanceof PatchSetsBox) {
|
||||||
return (RevisionsBox) l;
|
return (PatchSetsBox) l;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -106,7 +106,7 @@ class RevisionsBox extends Composite {
|
|||||||
@UiField FlexTable table;
|
@UiField FlexTable table;
|
||||||
@UiField Style style;
|
@UiField Style style;
|
||||||
|
|
||||||
RevisionsBox(Change.Id changeId, String revision) {
|
PatchSetsBox(Change.Id changeId, String revision) {
|
||||||
this.changeId = changeId;
|
this.changeId = changeId;
|
||||||
this.revision = revision;
|
this.revision = revision;
|
||||||
initWidget(uiBinder.createAndBindUi(this));
|
initWidget(uiBinder.createAndBindUi(this));
|
@@ -18,7 +18,7 @@ limitations under the License.
|
|||||||
xmlns:ui='urn:ui:com.google.gwt.uibinder'
|
xmlns:ui='urn:ui:com.google.gwt.uibinder'
|
||||||
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
|
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
|
||||||
<ui:with field='res' type='com.google.gerrit.client.change.Resources'/>
|
<ui:with field='res' type='com.google.gerrit.client.change.Resources'/>
|
||||||
<ui:style type='com.google.gerrit.client.change.RevisionsBox.Style'>
|
<ui:style type='com.google.gerrit.client.change.PatchSetsBox.Style'>
|
||||||
@eval selectionColor com.google.gerrit.client.Gerrit.getTheme().selectionColor;
|
@eval selectionColor com.google.gerrit.client.Gerrit.getTheme().selectionColor;
|
||||||
|
|
||||||
.revisionBox {
|
.revisionBox {
|
Reference in New Issue
Block a user