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
Tatuya Kamada
gitlab-ce
Commits
ca225d92
Commit
ca225d92
authored
May 02, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace inline document.ready with dispatcher
parent
4f5aae1d
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
27 additions
and
28 deletions
+27
-28
app/assets/javascripts/dispatcher.js.coffee
app/assets/javascripts/dispatcher.js.coffee
+17
-0
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+4
-0
app/views/dashboard/show.html.haml
app/views/dashboard/show.html.haml
+0
-3
app/views/groups/show.html.haml
app/views/groups/show.html.haml
+0
-3
app/views/issues/index.html.haml
app/views/issues/index.html.haml
+0
-5
app/views/layouts/admin.html.haml
app/views/layouts/admin.html.haml
+1
-1
app/views/layouts/application.html.haml
app/views/layouts/application.html.haml
+1
-1
app/views/layouts/group.html.haml
app/views/layouts/group.html.haml
+1
-1
app/views/layouts/profile.html.haml
app/views/layouts/profile.html.haml
+1
-1
app/views/layouts/project_resource.html.haml
app/views/layouts/project_resource.html.haml
+1
-1
app/views/layouts/user_team.html.haml
app/views/layouts/user_team.html.haml
+1
-1
app/views/projects/edit.html.haml
app/views/projects/edit.html.haml
+0
-3
app/views/projects/new.html.haml
app/views/projects/new.html.haml
+0
-3
app/views/projects/show.html.haml
app/views/projects/show.html.haml
+0
-2
app/views/teams/show.html.haml
app/views/teams/show.html.haml
+0
-3
No files found.
app/assets/javascripts/dispatcher.js.coffee
0 → 100644
View file @
ca225d92
$
->
new
Dispatcher
()
class
Dispatcher
constructor
:
()
->
page
=
$
(
'body'
).
attr
(
'data-page'
)
console
.
log
(
page
)
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
()
app/helpers/application_helper.rb
View file @
ca225d92
...
...
@@ -189,4 +189,8 @@ module ApplicationHelper
css_class
<<
" multiselect"
if
opts
[
:multiple
]
hidden_field_tag
(
id
,
''
,
class:
css_class
)
end
def
body_data_page
controller
.
controller_name
+
":"
+
controller
.
action_name
end
end
app/views/dashboard/show.html.haml
View file @
ca225d92
...
...
@@ -7,6 +7,3 @@
-
else
=
render
"zero_authorized_projects"
:javascript
dashboardPage
();
app/views/groups/show.html.haml
View file @
ca225d92
...
...
@@ -24,6 +24,3 @@
%hr
=
render
'shared/promo'
:javascript
$
(
function
(){
Pager
.
init
(
20
,
true
);
});
app/views/issues/index.html.haml
View file @
ca225d92
...
...
@@ -23,8 +23,3 @@
=
render
'filter'
,
entity:
'issue'
.span9.issues-holder
=
render
"issues"
:javascript
$
(
function
(){
Issues
.
init
();
})
app/views/layouts/admin.html.haml
View file @
ca225d92
!!! 5
%html
{
lang:
"en"
}
=
render
"layouts/head"
,
title:
"Admin area"
%body
{
class:
"#{app_theme} admin"
}
%body
{
class:
"#{app_theme} admin"
,
:'data-page'
=>
body_data_page
}
=
render
"layouts/head_panel"
,
title:
"Admin area"
=
render
"layouts/flash"
%nav
.main-nav
...
...
app/views/layouts/application.html.haml
View file @
ca225d92
!!! 5
%html
{
lang:
"en"
}
=
render
"layouts/head"
,
title:
"Dashboard"
%body
{
class:
"#{app_theme} application"
}
%body
{
class:
"#{app_theme} application"
,
:'data-page'
=>
body_data_page
}
=
render
"layouts/head_panel"
,
title:
"Dashboard"
=
render
"layouts/flash"
%nav
.main-nav
...
...
app/views/layouts/group.html.haml
View file @
ca225d92
!!! 5
%html
{
lang:
"en"
}
=
render
"layouts/head"
,
title:
"
#{
@group
.
name
}
"
%body
{
class:
"#{app_theme} application"
}
%body
{
class:
"#{app_theme} application"
,
:'data-page'
=>
body_data_page
}
=
render
"layouts/head_panel"
,
title:
"group:
#{
@group
.
name
}
"
=
render
"layouts/flash"
%nav
.main-nav
...
...
app/views/layouts/profile.html.haml
View file @
ca225d92
!!! 5
%html
{
lang:
"en"
}
=
render
"layouts/head"
,
title:
"Profile"
%body
{
class:
"#{app_theme} profile"
}
%body
{
class:
"#{app_theme} profile"
,
:'data-page'
=>
body_data_page
}
=
render
"layouts/head_panel"
,
title:
"Profile"
=
render
"layouts/flash"
%nav
.main-nav
...
...
app/views/layouts/project_resource.html.haml
View file @
ca225d92
!!! 5
%html
{
lang:
"en"
}
=
render
"layouts/head"
,
title:
@project
.
name_with_namespace
%body
{
class:
"#{app_theme} project"
}
%body
{
class:
"#{app_theme} project"
,
:'data-page'
=>
body_data_page
}
=
render
"layouts/head_panel"
,
title:
project_title
(
@project
)
=
render
"layouts/flash"
-
if
can?
(
current_user
,
:download_code
,
@project
)
...
...
app/views/layouts/user_team.html.haml
View file @
ca225d92
!!! 5
%html
{
lang:
"en"
}
=
render
"layouts/head"
,
title:
"
#{
@team
.
name
}
"
%body
{
class:
"#{app_theme} application"
}
%body
{
class:
"#{app_theme} application"
,
:'data-page'
=>
body_data_page
}
=
render
"layouts/head_panel"
,
title:
"team:
#{
@team
.
name
}
"
=
render
"layouts/flash"
%nav
.main-nav
...
...
app/views/projects/edit.html.haml
View file @
ca225d92
...
...
@@ -8,6 +8,3 @@
%center
=
image_tag
"ajax_loader.gif"
%h3
Saving project. Please wait a moment, this page will automatically refresh when ready.
:javascript
$
(
function
(){
new
Projects
();
});
app/views/projects/new.html.haml
View file @
ca225d92
...
...
@@ -7,6 +7,3 @@
%center
=
image_tag
"ajax_loader.gif"
%h3
Creating project
&
repository. Please wait a moment, this page will automatically refresh when ready.
:javascript
$
(
function
(){
new
Projects
();
});
app/views/projects/show.html.haml
View file @
ca225d92
...
...
@@ -17,5 +17,3 @@
%p
Repo Size:
#{
@project
.
repository
.
size
}
MB
%p
Created at:
#{
@project
.
created_at
.
stamp
(
'Aug 22, 2013'
)
}
%p
Owner:
#{
link_to
@project
.
owner_name
,
@project
.
owner
}
:javascript
$
(
function
(){
Pager
.
init
(
20
);
});
app/views/teams/show.html.haml
View file @
ca225d92
...
...
@@ -23,6 +23,3 @@
%hr
=
render
'shared/promo'
:javascript
$
(
function
(){
Pager
.
init
(
20
,
true
);
});
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