InlineEdit: Don't offer edit icon on binary files
Currently there is no way to retrieve patch type info in side by side screen. Extend GET changes/<id>/revisions/<rev>/files/<path>/diff to return binary flag. Suppress change edit icon on patch set select panel when binary file is opened. Bug: Issue 3162 Change-Id: I92daf8fde462a0c9977821a60fb19538e4bfae45
This commit is contained in:
@@ -82,7 +82,7 @@ class PatchSetSelectBox extends Composite {
|
||||
}
|
||||
|
||||
void setUpPatchSetNav(JsArray<RevisionInfo> list, DiffInfo.FileMeta meta,
|
||||
boolean editExists, int currentPatchSet, boolean open) {
|
||||
boolean editExists, int currentPatchSet, boolean open, boolean binary) {
|
||||
InlineHyperlink baseLink = null;
|
||||
InlineHyperlink selectedLink = null;
|
||||
if (sideA) {
|
||||
@@ -110,7 +110,7 @@ class PatchSetSelectBox extends Composite {
|
||||
if (!Patch.COMMIT_MSG.equals(path)) {
|
||||
linkPanel.add(createDownloadLink());
|
||||
}
|
||||
if (open && idActive != null && Gerrit.isSignedIn()) {
|
||||
if (!binary && open && idActive != null && Gerrit.isSignedIn()) {
|
||||
if ((editExists && idActive.get() == 0)
|
||||
|| (!editExists && idActive.get() == currentPatchSet)) {
|
||||
linkPanel.add(createEditIcon());
|
||||
|
||||
Reference in New Issue
Block a user