Broken ReviewRequestActionHook

7 views
Skip to first unread message

黄鑫

unread,
May 16, 2019, 3:27:01 AM5/16/19
to Review Board Community
ReviewRequestActionHook is not working in 3.0.14

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);
                 });
             });

Christian Hammond

unread,
May 16, 2019, 6:24:23 PM5/16/19
to revie...@googlegroups.com
Hi,

Thanks for the patch. We'll get this into the next release.

Christian

--
Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups "Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/a1049a2b-4ef9-42f2-872f-57b69d9dda5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Christian Hammond
President/CEO of Beanbag
Makers of Review Board
Reply all
Reply to author
Forward
0 new messages