Commit 268c183b29aa14cd479a960a6af711efa16a00ed

Authored by Dmitriy Zaporozhets
1 parent 883409b9

Replace gif animation with font icon spinner

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/assets/images/ajax_loader.gif

7.73 KB

app/assets/images/ajax_loader_gray.gif

7.6 KB

app/assets/images/ajax_loader_tree.gif

3.09 KB

app/assets/stylesheets/generic/common.scss
... ... @@ -173,12 +173,10 @@ table a code {
173 173  
174 174 .loading {
175 175 margin: 20px auto;
176   - background: url(ajax_loader.gif) no-repeat center center;
177   - width: 40px;
178 176 height: 40px;
179   - &.loading-gray {
180   - background: url(ajax_loader_gray.gif) no-repeat center center;
181   - }
  177 + color: #555;
  178 + font-size: 32px;
  179 + text-align: center;
182 180 }
183 181  
184 182 span.update-author {
... ...
app/assets/stylesheets/sections/projects.scss
... ... @@ -123,14 +123,9 @@
123 123 }
124 124  
125 125 .save-project-loader {
126   - img {
127   - margin-top: 50px;
128   - margin-bottom: 50px;
129   - }
130   - h3 {
131   - @extend .page-title;
132   - }
133   -
  126 + margin-top: 50px;
  127 + margin-bottom: 50px;
  128 + color: #555;
134 129 }
135 130  
136 131 ul.nav.nav-projects-tabs {
... ...
app/helpers/application_helper.rb
... ... @@ -236,4 +236,10 @@ module ApplicationHelper
236 236 def render_markup(file_name, file_content)
237 237 GitHub::Markup.render(file_name, file_content).html_safe
238 238 end
  239 +
  240 + def spinner(text = nil)
  241 + content_tag :div, class: 'loading hide' do
  242 + content_tag(:i, nil, class: 'icon-spinner icon-spin') + text
  243 + end
  244 + end
239 245 end
... ...
app/views/dashboard/_activities.html.haml
... ... @@ -5,4 +5,5 @@
5 5 .content_list
6 6 - else
7 7 %p.nothing_here_message Projects activity will be displayed here
8   -.loading.hide
  8 +
  9 += spinner
... ...
app/views/groups/show.html.haml
... ... @@ -11,7 +11,7 @@
11 11 .content_list
12 12 - else
13 13 %p.nothing_here_message Project activity will be displayed here
14   - .loading.hide
  14 + = spinner
15 15 .side.col-md-4
16 16 .light-well.append-bottom-20
17 17 = image_tag group_icon(@group.path), class: "avatar s90"
... ...
app/views/layouts/_head_panel.html.haml
... ... @@ -17,7 +17,7 @@
17 17 %li.hidden-sm.hidden-xs
18 18 %a
19 19 %div.hide.turbolink-spinner
20   - %i.icon-refresh.icon-spin
  20 + %i.icon-spinner.icon-spin
21 21 Loading...
22 22 %li.hidden-sm.hidden-xs
23 23 = render "layouts/search"
... ...
app/views/layouts/_public_head_panel.html.haml
... ... @@ -19,5 +19,5 @@
19 19 %li
20 20 %a
21 21 %div.hide.turbolink-spinner
22   - %i.icon-refresh.icon-spin
  22 + %i.icon-spinner.icon-spin
23 23 Loading...
... ...
app/views/profiles/accounts/show.html.haml
... ... @@ -50,7 +50,10 @@
50 50 %div
51 51 = f.text_field :username, required: true, class: 'form-control'
52 52 &nbsp;
53   - %span.loading-gif.hide= image_tag "ajax_loader.gif"
  53 + .loading-gif.hide
  54 + %p
  55 + %i.icon-spinner.icon-spin
  56 + Saving new username
54 57 %p.light
55 58 = user_url(@user)
56 59 %div
... ...
app/views/projects/commits/show.html.haml
... ... @@ -9,7 +9,7 @@
9 9 %div{id: dom_id(@project)}
10 10 #commits-list= render "commits"
11 11 .clear
12   -.loading{ style: "display:none;"}
  12 += spinner
13 13  
14 14 - if @commits.count == @limit
15 15 :javascript
... ...
app/views/projects/edit.html.haml
... ... @@ -189,6 +189,7 @@
189 189  
190 190 .save-project-loader.hide
191 191 %center
192   - = image_tag "ajax_loader.gif"
193   - %h3 Saving project.
  192 + %h2
  193 + %i.icon-spinner.icon-spin
  194 + Saving project.
194 195 %p Please wait a moment, this page will automatically refresh when ready.
... ...
app/views/projects/empty.html.haml
... ... @@ -3,8 +3,9 @@
3 3 - if @project.import? && !@project.imported
4 4 .save-project-loader
5 5 %center
6   - = image_tag "ajax_loader.gif"
7   - %h3 Importing repository.
  6 + %h2
  7 + %i.icon-spinner.icon-spin
  8 + Importing repository.
8 9 %p.monospace git clone --bare #{@project.import_url}
9 10 %p Please wait while we import the repository for you. Refresh at will.
10 11 :javascript
... ...
app/views/projects/graphs/show.html.haml
1 1 .loading-graph
2 2 %center
3   - .loading
4   - %h3.page-title Building repository graph.
  3 + %h3.page-title
  4 + %i.icon-spinner.icon-spin
  5 + Building repository graph.
5 6 %p Please wait a moment, this page will automatically refresh when ready.
6 7  
7 8 .stat-graph
... ...
app/views/projects/merge_requests/show/_mr_accept.html.haml
... ... @@ -55,7 +55,7 @@
55 55 .automerge_widget.unchecked
56 56 .bs-callout.bs-callout-warning
57 57 %strong
58   - %i.icon-refresh.icon-spin
  58 + %i.icon-spinner.icon-spin
59 59 Checking for ability to automatically merge…
60 60  
61 61 .automerge_widget.already_cannot_be_merged.hide
... ... @@ -64,6 +64,6 @@
64 64  
65 65 .merge-in-progress.hide
66 66 .bs-callout.bs-callout-success
67   - %i.icon-refresh.icon-spin
  67 + %i.icon-spinner.icon-spin
68 68 &nbsp;
69 69 Merge is in progress. Please wait. Page will be automatically reloaded. &nbsp;
... ...
app/views/projects/merge_requests/show/_mr_ci.html.haml
... ... @@ -25,7 +25,7 @@
25 25 .ci_widget
26 26 .alert.alert-warning
27 27 %strong
28   - %i.icon-refresh
  28 + %i.icon-spinner
29 29 Checking for CI status for #{@merge_request.last_commit_short_sha}
30 30  
31 31 .ci_widget.ci-error{style: "display:none"}
... ...
app/views/projects/network/show.html.haml
... ... @@ -3,7 +3,7 @@
3 3 .tip
4 4 You can move around the graph by using the arrow keys.
5 5 .network-graph
6   - .loading.loading-gray
  6 + = spinner
7 7  
8 8 :javascript
9 9 new Network({
... ...
app/views/projects/new.html.haml
... ... @@ -62,6 +62,7 @@
62 62  
63 63 .save-project-loader.hide
64 64 %center
65   - = image_tag "ajax_loader.gif"
66   - %h3 Creating project &amp; repository.
  65 + %h2
  66 + %i.icon-spinner.icon-spin
  67 + Creating project &amp; repository.
67 68 %p Please wait a moment, this page will automatically refresh when ready.
... ...
app/views/projects/show.html.haml
... ... @@ -5,7 +5,7 @@
5 5 = render "events/event_last_push", event: @last_push
6 6 = render 'shared/event_filter'
7 7 .content_list
8   - .loading.hide
  8 + = spinner
9 9 .col-md-3.project-side.hidden-sm
10 10 .clearfix
11 11 - if @project.archived?
... ...
app/views/projects/tree/_blob_item.html.haml
... ... @@ -4,7 +4,5 @@
4 4 %span.str-truncated
5 5 = link_to blob_item.name, project_blob_path(@project, tree_join(@id || @commit.id, blob_item.name))
6 6 %td.tree_time_ago.cgray
7   - %span.log_loading.hide
8   - Loading commit data...
9   - = image_tag "ajax_loader_tree.gif", width: 14
  7 + = render 'spinner'
10 8 %td.tree_commit{ colspan: 2 }
... ...
app/views/projects/tree/_spinner.html.haml 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +%span.log_loading.hide
  2 + %i.icon-spinner.icon-spin
  3 + Loading commit data...
... ...
app/views/projects/tree/_tree_item.html.haml
... ... @@ -4,7 +4,5 @@
4 4 %span.str-truncated
5 5 = link_to tree_item.name, project_tree_path(@project, tree_join(@id || @commit.id, tree_item.name))
6 6 %td.tree_time_ago.cgray
7   - %span.log_loading.hide
8   - Loading commit data...
9   - = image_tag "ajax_loader_tree.gif", width: 14
  7 + = render 'spinner'
10 8 %td.tree_commit{ colspan: 2 }
... ...