Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
3dc94ba8
Commit
3dc94ba8
authored
Dec 13, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ajax-loader for dashboard
parent
8426846d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
2 deletions
+27
-2
app/assets/images/ajax-loader-facebook.gif
app/assets/images/ajax-loader-facebook.gif
+0
-0
app/assets/javascripts/loader.js
app/assets/javascripts/loader.js
+11
-0
app/assets/stylesheets/projects.css.scss
app/assets/stylesheets/projects.css.scss
+6
-0
app/views/dashboard/_menu.html.haml
app/views/dashboard/_menu.html.haml
+10
-2
No files found.
app/assets/images/ajax-loader-facebook.gif
0 → 100644
View file @
3dc94ba8
723 Bytes
app/assets/javascripts/loader.js
0 → 100644
View file @
3dc94ba8
var
Loader
=
{
img_src
:
"
/assets/ajax-loader.gif
"
,
html
:
function
(
width
)
{
img
=
$
(
"
<img>
"
);
img
.
attr
(
"
width
"
,
width
);
img
.
attr
(
"
src
"
,
this
.
img_src
);
return
img
;
}
}
app/assets/stylesheets/projects.css.scss
View file @
3dc94ba8
...
...
@@ -581,3 +581,9 @@ h4.middle-panel {
}
}
}
.dashboard-loader
{
float
:right
;
margin-right
:
30px
;
display
:none
;
}
app/views/dashboard/_menu.html.haml
View file @
3dc94ba8
...
...
@@ -2,12 +2,20 @@
=
link_to
"Activities"
,
dashboard_path
,
:remote
=>
true
,
:class
=>
"button-small dash-button
#{
"active"
if
current_page?
(
dashboard_path
)
||
current_page?
(
root_path
)
}
"
,
:id
=>
"activities_slide"
=
link_to
"Issues"
,
dashboard_issues_path
,
:remote
=>
true
,
:class
=>
"button-small dash-button
#{
"active"
if
current_page?
(
dashboard_issues_path
)
}
"
,
:id
=>
"issues_slide"
=
link_to
"Merge Requests"
,
dashboard_merge_requests_path
,
:remote
=>
true
,
:class
=>
"button-small dash-button
#{
"active"
if
current_page?
(
dashboard_merge_requests_path
)
}
"
,
:id
=>
"merge_requests_slide"
%img
{
:src
=>
"/assets/ajax-loader-facebook.gif"
,
:class
=>
"dashboard-loader"
}
:javascript
$
(
function
(){
$
(
"
.dash-button
"
).
live
(
"
click
"
,
function
()
{
$
(
"
.dash-button
"
).
removeClass
(
"
active
"
);
$
(
this
).
addClass
(
"
active
"
);
})
});
$
(
"
.dash-button
"
).
live
(
"
ajax:before
"
,
function
()
{
$
(
"
.dashboard-loader
"
).
show
();
});
$
(
"
.dash-button
"
).
live
(
"
ajax:complete
"
,
function
()
{
$
(
"
.dashboard-loader
"
).
hide
();
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment