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:
authorDouwe Maan <douwe@selenight.nl>2017-05-09 02:52:05 +0300
committerDouwe Maan <douwe@selenight.nl>2017-05-10 16:21:58 +0300
commit00fc9f260706cfd6d6f4261eea24eb3ff455b3e0 (patch)
treec09dc1e2fccd2a4b5e0cce613465ec367133a5dd /app/views/projects/blob/_viewer.html.haml
parentecc6cc8be75b5c66fdf7f5595b71aabf9366a5e1 (diff)
Load tree readme asynchronously
Diffstat (limited to 'app/views/projects/blob/_viewer.html.haml')
-rw-r--r--app/views/projects/blob/_viewer.html.haml4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/projects/blob/_viewer.html.haml b/app/views/projects/blob/_viewer.html.haml
index 5326bb3e0cf..41187d5ce66 100644
--- a/app/views/projects/blob/_viewer.html.haml
+++ b/app/views/projects/blob/_viewer.html.haml
@@ -2,8 +2,8 @@
- render_error = viewer.render_error
- load_asynchronously = local_assigns.fetch(:load_asynchronously, viewer.server_side?) && render_error.nil?
-- url = url_for(params.merge(viewer: viewer.type, format: :json)) if load_asynchronously
-.blob-viewer{ data: { type: viewer.type, url: url }, class: ('hidden' if hidden) }
+- viewer_url = local_assigns.fetch(:viewer_url) { url_for(params.merge(viewer: viewer.type, format: :json)) } if load_asynchronously
+.blob-viewer{ data: { type: viewer.type, url: viewer_url }, class: ('hidden' if hidden) }
- if load_asynchronously
.text-center.prepend-top-default.append-bottom-default
= icon('spinner spin 2x', 'aria-hidden' => 'true', 'aria-label' => 'Loading content')