MozReview: Add mr:diff-context-loaded event (Bug 1248008) r=smacleod
authorPiotr Zalewa <pzalewa@mozilla.com>
Tue, 17 Jan 2017 16:06:09 +0100
changeset 71 bc491b5efdb738ca352ae0e15cd012492568621b
parent 70 dfbc927623b7aa5a99b6a90681f762d4b43e8e66
child 72 12009690bcc28bf1012ce3ca26362d086deafe59
push id39
push usersmacleod@mozilla.com
push dateThu, 16 Feb 2017 15:15:51 +0000
reviewerssmacleod
bugs1248008
MozReview: Add mr:diff-context-loaded event (Bug 1248008) r=smacleod ReviewBoard responds to a `diff-context` with a list of files including a commit message filediff with a unique filename i.e. 'commit-message-frbzc'. We listen to this event to change the filename to 'commit-message'. MozReview-Commit-ID: Dlrj0JtxTEd
reviewboard/reviewboard/static/rb/js/pages/views/diffViewerPageView_mozreview.js
--- a/reviewboard/reviewboard/static/rb/js/pages/views/diffViewerPageView_mozreview.js
+++ b/reviewboard/reviewboard/static/rb/js/pages/views/diffViewerPageView_mozreview.js
@@ -736,12 +736,13 @@ RB.DiffViewerPageView = RB.ReviewablePag
 
         $.ajax(contextURL).done(_.bind(function(rsp) {
             _.each(this._diffReviewableViews, function(diffReviewableView) {
                 diffReviewableView.remove();
             });
             this._diffReviewableViews = [];
 
             this.model.set(this.model.parse(rsp.diff_context));
+            $(document).trigger('mr:diff-context-loaded');
         }, this));
     }
 });
 _.extend(RB.DiffViewerPageView.prototype, RB.KeyBindingsMixin);