Re-enable the Cherry Pick button when cancelled
If the Cherry Pick dialog is cancelled, the Cherry Pick button
cannot be clicked again.
Change-Id: I5c2fb48ae4b01cfa122797b84a226cfb4ef6efe5
(cherry picked from commit 06810e758c
)
This commit is contained in:
parent
7794b9e5e8
commit
92b976c2f4
@ -23,10 +23,14 @@ import com.google.gerrit.client.ui.CherryPickDialog;
|
||||
import com.google.gerrit.common.PageLinks;
|
||||
import com.google.gerrit.reviewdb.client.Change;
|
||||
import com.google.gerrit.reviewdb.client.Project;
|
||||
import com.google.gwt.event.logical.shared.CloseEvent;
|
||||
import com.google.gwt.user.client.ui.Button;
|
||||
import com.google.gwt.user.client.ui.FocusWidget;
|
||||
import com.google.gwt.user.client.ui.PopupPanel;
|
||||
|
||||
|
||||
class CherryPickAction {
|
||||
static void call(Button b, final ChangeInfo info, final String revision,
|
||||
static void call(final Button b, final ChangeInfo info, final String revision,
|
||||
String project, final String commitMessage) {
|
||||
// TODO Replace CherryPickDialog with a nicer looking display.
|
||||
b.setEnabled(false);
|
||||
@ -62,6 +66,12 @@ class CherryPickAction {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClose(CloseEvent<PopupPanel> event) {
|
||||
super.onClose(event);
|
||||
b.setEnabled(true);
|
||||
}
|
||||
}.center();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user