Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-04-16 14:30:46 +0300
committerFilipa Lacerda <filipa@gitlab.com>2018-04-16 14:30:46 +0300
commit8f189df86f6ebd2bd4974ce180ed75e9d97cd81e (patch)
treeadb6270d1d37bbd098964208c57c2b219b9fcf62
parent96d8a5adf34f394a330684c08873a93bb791e1d3 (diff)
Use different class for try again button in collapsed diffs
-rw-r--r--app/assets/javascripts/notes.js3
-rw-r--r--app/views/discussions/_diff_with_notes.html.haml2
2 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js
index a00cf0e239a..a4669b1672a 100644
--- a/app/assets/javascripts/notes.js
+++ b/app/assets/javascripts/notes.js
@@ -197,6 +197,8 @@ export default class Notes {
);
this.$wrapperEl.on('click', '.js-toggle-lazy-diff', this.loadLazyDiff);
+ this.$wrapperEl.on('click', '.js-toggle-lazy-diff-retry-button', this.loadLazyDiff);
+
// fetch notes when tab becomes visible
this.$wrapperEl.on('visibilitychange', this.visibilityChange);
// when issue status changes, we need to refresh data
@@ -243,6 +245,7 @@ export default class Notes {
this.$wrapperEl.off('click', '.js-comment-resolve-button');
this.$wrapperEl.off('click', '.system-note-commit-list-toggler');
this.$wrapperEl.off('click', '.js-toggle-lazy-diff');
+ this.$wrapperEl.off('click', '.js-toggle-lazy-diff-retry-button');
this.$wrapperEl.off('ajax:success', '.js-main-target-form');
this.$wrapperEl.off('ajax:success', '.js-discussion-note-form');
this.$wrapperEl.off('ajax:complete', '.js-main-target-form');
diff --git a/app/views/discussions/_diff_with_notes.html.haml b/app/views/discussions/_diff_with_notes.html.haml
index c13a128835a..e026e6a83ae 100644
--- a/app/views/discussions/_diff_with_notes.html.haml
+++ b/app/views/discussions/_diff_with_notes.html.haml
@@ -31,7 +31,7 @@
%td.line_content.js-success-lazy-load
.js-code-placeholder
%td.line_content.js-error-lazy-load-diff.hidden
- - button = button_tag(_("Try again"), class: "btn-link btn-no-padding js-toggle-lazy-diff")
+ - button = button_tag(_("Try again"), class: "btn-link btn-no-padding js-toggle-lazy-diff-retry-button")
= _("Unable to load the diff. %{button_try_again}").html_safe % { button_try_again: button}
= render "discussions/diff_discussion", discussions: [discussion], expanded: true
- else