Commit 268c183b29aa14cd479a960a6af711efa16a00ed
1 parent
883409b9
Exists in
spb-stable
and in
3 other branches
Replace gif animation with font icon spinner
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
23 changed files
with
44 additions
and
38 deletions
Show diff stats
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
app/views/groups/show.html.haml
app/views/layouts/_head_panel.html.haml
app/views/layouts/_public_head_panel.html.haml
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 | |
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
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
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 | |
69 | 69 | Merge is in progress. Please wait. Page will be automatically reloaded. | ... | ... |
app/views/projects/merge_requests/show/_mr_ci.html.haml
app/views/projects/network/show.html.haml
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 & repository. | |
65 | + %h2 | |
66 | + %i.icon-spinner.icon-spin | |
67 | + Creating project & repository. | |
67 | 68 | %p Please wait a moment, this page will automatically refresh when ready. | ... | ... |
app/views/projects/show.html.haml
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/_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 } | ... | ... |