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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
5133fe8e
Commit
5133fe8e
authored
Jan 09, 2013
by
Alex Denisov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard js -> coffee
parent
3cc04583
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
40 deletions
+29
-40
app/assets/javascripts/dashboard.js
app/assets/javascripts/dashboard.js
+0
-40
app/assets/javascripts/dashboard.js.coffee
app/assets/javascripts/dashboard.js.coffee
+29
-0
No files found.
app/assets/javascripts/dashboard.js
deleted
100644 → 0
View file @
3cc04583
/**
* Init dashboard page
*
*/
$
(
function
(){
Pager
.
init
(
20
,
true
);
dashboardPage
();
});
function
dashboardPage
(){
$
(
"
.event_filter_link
"
).
bind
(
'
click
'
,(
function
(){
toggleFilter
(
$
(
this
));
reloadActivities
();
}));
}
function
reloadActivities
(){
$
(
'
.content_list
'
).
html
(
''
);
Pager
.
init
(
20
,
true
);
}
function
toggleFilter
(
sender
){
sender
.
parent
().
toggleClass
(
'
inactive
'
);
var
event_filters
=
$
.
cookie
(
'
event_filter
'
);
var
filter
=
sender
.
attr
(
'
id
'
).
split
(
'
_
'
)[
0
];
if
(
!
event_filters
)
{
event_filters
=
new
Array
();
}
else
{
event_filters
=
event_filters
.
split
(
'
,
'
);
}
var
index
=
event_filters
.
indexOf
(
filter
);
if
(
index
==
-
1
)
{
event_filters
.
push
(
filter
);
}
else
{
event_filters
.
splice
(
index
,
1
);
}
$
.
cookie
(
'
event_filter
'
,
event_filters
.
join
(
'
,
'
));
};
app/assets/javascripts/dashboard.js.coffee
0 → 100644
View file @
5133fe8e
$
->
dashboardPage
()
dashboardPage
=
->
Pager
.
init
20
,
true
$
(
".event_filter_link"
).
bind
"click"
,
->
toggleFilter
$
(
this
)
reloadActivities
()
reloadActivities
=
->
$
(
".content_list"
).
html
''
Pager
.
init
20
,
true
toggleFilter
=
(
sender
)
->
sender
.
parent
().
toggleClass
"inactive"
event_filters
=
$
.
cookie
(
"event_filter"
)
filter
=
sender
.
attr
(
"id"
).
split
(
"_"
)[
0
]
if
event_filters
event_filters
=
event_filters
.
split
(
","
)
else
event_filters
=
new
Array
()
index
=
event_filters
.
indexOf
(
filter
)
if
index
is
-
1
event_filters
.
push
filter
else
event_filters
.
splice
index
,
1
$
.
cookie
"event_filter"
,
event_filters
.
join
(
","
)
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