unable to attach the hook to buttons. It turn out to be a wrong call of _.each, the value would be the first parameter and key would be the second one.
--- ReviewBoard-3.0.14/reviewboard/htdocs/static/rb/js/views/reviewRequestEditorView.js.old 2019-05-16 15:06:34.432177001 +0800
+++ ReviewBoard-3.0.14/reviewboard/htdocs/static/rb/js/views/reviewRequestEditorView.js 2019-05-16 15:06:52.535691603 +0800
@@ -693,7 +693,7 @@
$uploadFile.click(this._onUploadFileClicked);
RB.ReviewRequestActionHook.each(function (hook) {
- _.each(hook.get('callbacks'), function (selector, handler) {
+ _.each(hook.get('callbacks'), function (handler, selector) {
return _this4.$(selector).click(handler);
});
});