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
Kazuhiko Shiozaki
gitlab-ce
Commits
2aa620c2
Commit
2aa620c2
authored
May 02, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move more inline js to handle via dispatcher
parent
6473aaf8
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
46 additions
and
63 deletions
+46
-63
app/assets/javascripts/admin.js.coffee
app/assets/javascripts/admin.js.coffee
+25
-14
app/assets/javascripts/commit.js.coffee
app/assets/javascripts/commit.js.coffee
+5
-0
app/assets/javascripts/dispatcher.js.coffee
app/assets/javascripts/dispatcher.js.coffee
+7
-5
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+4
-1
app/views/admin/groups/show.html.haml
app/views/admin/groups/show.html.haml
+0
-13
app/views/admin/teams/show.html.haml
app/views/admin/teams/show.html.haml
+0
-14
app/views/commit/show.html.haml
app/views/commit/show.html.haml
+0
-7
app/views/commits/show.html.haml
app/views/commits/show.html.haml
+1
-3
app/views/repositories/stats.html.haml
app/views/repositories/stats.html.haml
+4
-6
No files found.
app/assets/javascripts/admin.js.coffee
View file @
2aa620c2
$
->
@
Admin
=
init
:
->
$
(
'input#user_force_random_password'
).
on
'change'
,
(
elem
)
->
elems
=
$
(
'#user_password, #user_password_confirmation'
)
...
...
@@ -15,3 +16,13 @@ $ ->
e
.
preventDefault
()
visible_log
=
$
(
".file_content:visible"
)
visible_log
.
animate
({
scrollTop
:
visible_log
.
find
(
'ol'
).
height
()
},
"fast"
)
modal
=
$
(
'.change-owner-holder'
)
$
(
'.change-owner-link'
).
bind
"click"
,
->
$
(
this
).
hide
()
modal
.
show
()
$
(
'.change-owner-cancel-link'
).
bind
"click"
,
->
modal
.
hide
()
$
(
'.change-owner-link'
).
show
()
app/assets/javascripts/commit.js.coffee
0 → 100644
View file @
2aa620c2
@
Commit
=
init
:
->
$
(
'.files .file'
).
each
->
new
CommitFile
(
this
)
app/assets/javascripts/dispatcher.js.coffee
View file @
2aa620c2
...
...
@@ -10,8 +10,10 @@ class Dispatcher
switch
page
when
'issues:index'
then
Issues
.
init
()
when
'dashboard:show'
then
dashboardPage
()
when
'groups:show'
then
Pager
.
init
(
20
,
true
)
when
'teams:show'
then
Pager
.
init
(
20
,
true
)
when
'projects:show'
then
Pager
.
init
(
20
,
true
)
when
'projects:new'
then
new
Projects
()
when
'projects:edit'
then
new
Projects
()
when
'commit:show'
then
Commit
.
init
()
when
'groups:show'
,
'teams:show'
,
'projects:show'
Pager
.
init
(
20
,
true
)
when
'projects:new'
,
'projects:edit'
new
Projects
()
when
'admin:teams:show'
,
'admin:groups:show'
,
'admin:logs:show'
,
'admin:users:new'
Admin
.
init
()
app/helpers/application_helper.rb
View file @
2aa620c2
...
...
@@ -191,6 +191,9 @@ module ApplicationHelper
end
def
body_data_page
controller
.
controller_name
+
":"
+
controller
.
action_name
path
=
controller
.
controller_path
.
split
(
'/'
)
namespace
=
path
.
first
if
path
.
second
[
namespace
,
controller
.
controller_name
,
controller
.
action_name
].
compact
.
join
(
":"
)
end
end
app/views/admin/groups/show.html.haml
View file @
2aa620c2
...
...
@@ -118,16 +118,3 @@
.form-actions
=
submit_tag
'Move projects'
,
class:
"btn btn-create"
:javascript
$
(
function
(){
var
modal
=
$
(
'
.change-owner-holder
'
);
$
(
'
.change-owner-link
'
).
bind
(
"
click
"
,
function
(){
$
(
this
).
hide
();
modal
.
show
();
});
$
(
'
.change-owner-cancel-link
'
).
bind
(
"
click
"
,
function
(){
modal
.
hide
();
$
(
'
.change-owner-link
'
).
show
();
})
})
app/views/admin/teams/show.html.haml
View file @
2aa620c2
...
...
@@ -91,17 +91,3 @@
=
link_to
'Edit'
,
edit_admin_team_project_path
(
@team
,
project
),
class:
"btn btn-small"
=
link_to
'Relegate'
,
admin_team_project_path
(
@team
,
project
),
confirm:
'Remove project from team. Are you sure?'
,
method: :delete
,
class:
"btn btn-remove small"
,
id:
"relegate_project_
#{
project
.
id
}
"
:javascript
$
(
function
(){
var
modal
=
$
(
'
.change-owner-holder
'
);
$
(
'
.change-owner-link
'
).
bind
(
"
click
"
,
function
(){
$
(
this
).
hide
();
modal
.
show
();
});
$
(
'
.change-owner-cancel-link
'
).
bind
(
"
click
"
,
function
(){
modal
.
hide
();
$
(
'
.change-owner-link
'
).
show
();
})
})
app/views/commit/show.html.haml
View file @
2aa620c2
...
...
@@ -9,10 +9,3 @@
=
render
"commits/diffs"
,
diffs:
@commit
.
diffs
=
render
"notes/notes_with_form"
:javascript
$
(
function
(){
$
(
'
.files .file
'
).
each
(
function
(){
new
CommitFile
(
this
);
});
});
app/views/commits/show.html.haml
View file @
2aa620c2
...
...
@@ -11,7 +11,5 @@
-
if
@commits
.
count
==
@limit
:javascript
$
(
function
(){
CommitsList
.
init
(
"
#{
@ref
}
"
,
#{
@limit
}
);
});
app/views/repositories/stats.html.haml
View file @
2aa620c2
...
...
@@ -27,9 +27,7 @@
:javascript
$
(
function
(){
var
labels
=
[
#{
@graph
.
labels
.
to_json
}
];
var
commits
=
[
#{
@graph
.
commits
.
join
(
', '
)
}
];
var
title
=
"
Commit activity for last
#{
@graph
.
weeks
}
weeks
"
;
Chart
.
init
(
labels
,
commits
,
title
);
})
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