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
316dd9c8
Commit
316dd9c8
authored
Nov 10, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9819 from huacnlee/do-not-use-coffeescript-in-view
Replace CoffeeScript block into JavaScript in Views.
parents
7199e9ef
18cb430f
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
157 additions
and
138 deletions
+157
-138
app/views/admin/labels/_form.html.haml
app/views/admin/labels/_form.html.haml
+2
-2
app/views/ci/lints/show.html.haml
app/views/ci/lints/show.html.haml
+9
-7
app/views/groups/group_members/index.html.haml
app/views/groups/group_members/index.html.haml
+5
-4
app/views/help/_shortcuts.html.haml
app/views/help/_shortcuts.html.haml
+4
-4
app/views/import/bitbucket/status.html.haml
app/views/import/bitbucket/status.html.haml
+2
-2
app/views/import/fogbugz/new_user_map.html.haml
app/views/import/fogbugz/new_user_map.html.haml
+3
-3
app/views/import/fogbugz/status.html.haml
app/views/import/fogbugz/status.html.haml
+2
-2
app/views/import/github/status.html.haml
app/views/import/github/status.html.haml
+2
-2
app/views/import/gitlab/status.html.haml
app/views/import/gitlab/status.html.haml
+2
-2
app/views/import/gitorious/status.html.haml
app/views/import/gitorious/status.html.haml
+2
-2
app/views/import/google_code/status.html.haml
app/views/import/google_code/status.html.haml
+2
-2
app/views/layouts/_search.html.haml
app/views/layouts/_search.html.haml
+2
-2
app/views/projects/_activity.html.haml
app/views/projects/_activity.html.haml
+2
-2
app/views/projects/blob/_new_dir.html.haml
app/views/projects/blob/_new_dir.html.haml
+1
-1
app/views/projects/blob/_upload.html.haml
app/views/projects/blob/_upload.html.haml
+3
-3
app/views/projects/buttons/_star.html.haml
app/views/projects/buttons/_star.html.haml
+7
-5
app/views/projects/commit/_commit_box.html.haml
app/views/projects/commit/_commit_box.html.haml
+2
-2
app/views/projects/graphs/commits.html.haml
app/views/projects/graphs/commits.html.haml
+26
-26
app/views/projects/graphs/show.html.haml
app/views/projects/graphs/show.html.haml
+12
-9
app/views/projects/merge_requests/_new_compare.html.haml
app/views/projects/merge_requests/_new_compare.html.haml
+9
-8
app/views/projects/merge_requests/widget/_heading.html.haml
app/views/projects/merge_requests/widget/_heading.html.haml
+4
-3
app/views/projects/merge_requests/widget/_merged.html.haml
app/views/projects/merge_requests/widget/_merged.html.haml
+17
-14
app/views/projects/merge_requests/widget/open/_accept.html.haml
...ews/projects/merge_requests/widget/open/_accept.html.haml
+6
-5
app/views/projects/merge_requests/widget/open/_check.html.haml
...iews/projects/merge_requests/widget/open/_check.html.haml
+5
-3
app/views/projects/new.html.haml
app/views/projects/new.html.haml
+8
-6
app/views/projects/project_members/index.html.haml
app/views/projects/project_members/index.html.haml
+5
-4
app/views/shared/issuable/_context.html.haml
app/views/shared/issuable/_context.html.haml
+3
-3
app/views/shared/issuable/_filter.html.haml
app/views/shared/issuable/_filter.html.haml
+6
-6
app/views/shared/projects/_list.html.haml
app/views/shared/projects/_list.html.haml
+2
-2
app/views/users/show.html.haml
app/views/users/show.html.haml
+2
-2
No files found.
app/views/admin/labels/_form.html.haml
View file @
316dd9c8
...
...
@@ -31,5 +31,5 @@
=
f
.
submit
'Save'
,
class:
'btn btn-save js-save-button'
=
link_to
"Cancel"
,
admin_labels_path
,
class:
'btn btn-cancel'
:
coffee
script
new Labels
:
java
script
new
Labels
();
app/views/ci/lints/show.html.haml
View file @
316dd9c8
...
...
@@ -11,15 +11,17 @@
.controls.pull-left.prepend-top-10
=
submit_tag
"Validate"
,
class:
'btn btn-success submit-yml'
%p
.text-center.loading
%i
.fa.fa-refresh.fa-spin
.results.prepend-top-20
:coffeescript
$(".loading").hide()
$('form').bind 'ajax:beforeSend', ->
$(".loading").show()
$('form').bind 'ajax:complete', ->
$(".loading").hide()
:javascript
$
(
"
.loading
"
).
hide
();
$
(
'
form
'
).
bind
(
'
ajax:beforeSend
'
,
function
()
{
$
(
"
.loading
"
).
show
();
});
$
(
'
form
'
).
bind
(
'
ajax:complete
'
,
function
()
{
$
(
"
.loading
"
).
hide
();
});
app/views/groups/group_members/index.html.haml
View file @
316dd9c8
...
...
@@ -36,7 +36,8 @@
=
paginate
@members
,
theme:
'gitlab'
:coffeescript
$('form.member-search-form').on 'submit', (event) ->
event.preventDefault()
Turbolinks.visit @.action + '?' + $(@).serialize()
:javascript
$
(
'
form.member-search-form
'
).
on
(
'
submit
'
,
function
(
event
)
{
event
.
preventDefault
();
Turbolinks
.
visit
(
this
.
action
+
'
?
'
+
$
(
this
).
serialize
());
});
app/views/help/_shortcuts.html.haml
View file @
316dd9c8
...
...
@@ -222,8 +222,8 @@
:javascript
$
(
'
.js-more-help-button
'
).
click
(
function
(
e
)
{
$
(
this
).
remove
()
$
(
'
.hidden-shortcut
'
).
show
()
e
.
preventDefault
()
$
(
'
.js-more-help-button
'
).
click
(
function
(
e
)
{
$
(
this
).
remove
()
l
$
(
'
.hidden-shortcut
'
).
show
();
e
.
preventDefault
();
});
app/views/import/bitbucket/status.html.haml
View file @
316dd9c8
...
...
@@ -66,5 +66,5 @@
again.
:
coffee
script
new ImporterStatus("
#{
jobs_import_bitbucket_path
}
", "
#{
import_bitbucket_path
}
")
:
java
script
new
ImporterStatus
(
"
#{
jobs_import_bitbucket_path
}
"
,
"
#{
import_bitbucket_path
}
"
)
;
app/views/import/fogbugz/new_user_map.html.haml
View file @
316dd9c8
...
...
@@ -22,7 +22,7 @@
%strong
Map a FogBugz account ID to a GitLab user
%p
Selecting a GitLab user will add a link to the GitLab user in the descriptions
of issues and comments (e.g. "By
<a
href=
"#"
>
@johnsmith
</a>
"). It will also
of issues and comments (e.g. "By
<a
href=
"#"
>
@johnsmith
</a>
"). It will also
associate and/or assign these issues and comments with the selected user.
.table-holder
...
...
@@ -46,5 +46,5 @@
.form-actions
=
submit_tag
'Continue to the next step'
,
class:
'btn btn-create'
:
coffee
script
new UsersSelect()
:
java
script
new
UsersSelect
()
;
app/views/import/fogbugz/status.html.haml
View file @
316dd9c8
...
...
@@ -48,5 +48,5 @@
%td
.import-actions.job-status
=
button_tag
"Import"
,
class:
"btn js-add-to-import"
:
coffee
script
new ImporterStatus("
#{
jobs_import_fogbugz_path
}
", "
#{
import_fogbugz_path
}
")
:
java
script
new
ImporterStatus
(
"
#{
jobs_import_fogbugz_path
}
"
,
"
#{
import_fogbugz_path
}
"
)
;
app/views/import/github/status.html.haml
View file @
316dd9c8
...
...
@@ -43,5 +43,5 @@
%td
.import-actions.job-status
=
button_tag
"Import"
,
class:
"btn js-add-to-import"
:
coffee
script
new ImporterStatus("
#{
jobs_import_github_path
}
", "
#{
import_github_path
}
")
:
java
script
new
ImporterStatus
(
"
#{
jobs_import_github_path
}
"
,
"
#{
import_github_path
}
"
)
;
app/views/import/gitlab/status.html.haml
View file @
316dd9c8
...
...
@@ -43,5 +43,5 @@
%td
.import-actions.job-status
=
button_tag
"Import"
,
class:
"btn js-add-to-import"
:
coffee
script
new ImporterStatus("
#{
jobs_import_gitlab_path
}
", "
#{
import_gitlab_path
}
")
:
java
script
new
ImporterStatus
(
"
#{
jobs_import_gitlab_path
}
"
,
"
#{
import_gitlab_path
}
"
)
;
app/views/import/gitorious/status.html.haml
View file @
316dd9c8
...
...
@@ -43,5 +43,5 @@
%td
.import-actions.job-status
=
button_tag
"Import"
,
class:
"btn js-add-to-import"
:
coffee
script
new ImporterStatus("
#{
jobs_import_gitorious_path
}
", "
#{
import_gitorious_path
}
")
:
java
script
new
ImporterStatus
(
"
#{
jobs_import_gitorious_path
}
"
,
"
#{
import_gitorious_path
}
"
)
;
app/views/import/google_code/status.html.haml
View file @
316dd9c8
...
...
@@ -67,5 +67,5 @@
=
link_to
"import flow"
,
new_import_google_code_path
again.
:
coffee
script
new ImporterStatus("
#{
jobs_import_google_code_path
}
", "
#{
import_google_code_path
}
")
:
java
script
new
ImporterStatus
(
"
#{
jobs_import_google_code_path
}
"
,
"
#{
import_google_code_path
}
"
)
;
app/views/layouts/_search.html.haml
View file @
316dd9c8
...
...
@@ -25,6 +25,6 @@
:javascript
$
(
'
.search-input
'
).
on
(
'
keyup
'
,
function
(
e
)
{
if
(
e
.
keyCode
==
27
)
{
$
(
'
.search-input
'
).
blur
()
$
(
'
.search-input
'
).
blur
()
;
}
})
})
;
app/views/projects/_activity.html.haml
View file @
316dd9c8
...
...
@@ -8,5 +8,5 @@
.content_list
{
:"data-href"
=>
activity_project_path
(
@project
)}
=
spinner
:
coffee
script
new Activities()
:
java
script
new
Activities
()
;
app/views/projects/blob/_new_dir.html.haml
View file @
316dd9c8
...
...
@@ -21,5 +21,5 @@
=
submit_tag
"Create directory"
,
class:
'btn btn-primary btn-create'
=
link_to
"Cancel"
,
'#'
,
class:
"btn btn-cancel"
,
"data-dismiss"
=>
"modal"
:
coffee
script
:
java
script
disableButtonIfAnyEmptyField
(
$
(
"
#dir-create-form
"
),
"
.form-control
"
,
"
.btn-create
"
);
app/views/projects/blob/_upload.html.haml
View file @
316dd9c8
...
...
@@ -26,6 +26,6 @@
=
button_tag
button_title
,
class:
'btn btn-small btn-primary btn-upload-file'
,
id:
'submit-all'
=
link_to
"Cancel"
,
'#'
,
class:
"btn btn-cancel"
,
"data-dismiss"
=>
"modal"
:
coffee
script
disableButtonIfEmptyField
$('.blob-file-upload-form-js').find('#commit_message'), '.btn-upload-file'
new BlobFileDropzone($('.blob-file-upload-form-js'), '
#{
method
}
')
:
java
script
disableButtonIfEmptyField
(
$
(
'
.blob-file-upload-form-js
'
).
find
(
'
#commit_message
'
),
'
.btn-upload-file
'
);
new
BlobFileDropzone
(
$
(
'
.blob-file-upload-form-js
'
),
'
#{
method
}
'
)
;
app/views/projects/buttons/_star.html.haml
View file @
316dd9c8
...
...
@@ -4,11 +4,13 @@
%span
.count
=
@project
.
star_count
:coffeescript
$('.project-home-panel .toggle-star').on 'ajax:success', (e, data, status, xhr) ->
$(@).replaceWith(data.html)
.on 'ajax:error', (e, xhr, status, error) ->
new Flash('Star toggle failed. Try again later.', 'alert')
:javascript
$
(
'
.project-home-panel .toggle-star
'
).
on
(
'
ajax:success
'
,
function
(
e
,
data
,
status
,
xhr
)
{
$
(
this
).
replaceWith
(
data
.
html
);
})
.
on
(
'
ajax:error
'
,
function
(
e
,
xhr
,
status
,
error
)
{
new
Flash
(
'
Star toggle failed. Try again later.
'
,
'
alert
'
);
});
-
else
=
link_to
new_user_session_path
,
class:
'btn has_tooltip star-btn'
,
title:
'You must sign in to star a project'
do
...
...
app/views/projects/commit/_commit_box.html.haml
View file @
316dd9c8
...
...
@@ -55,5 +55,5 @@
%pre
.commit-description
=
preserve
(
gfm
(
escape_once
(
@commit
.
description
)))
:
coffee
script
$(".commit-info-row.branches").load("
#{
branches_namespace_project_commit_path
(
@project
.
namespace
,
@project
,
@commit
.
id
)
}
")
:
java
script
$
(
"
.commit-info-row.branches
"
).
load
(
"
#{
branches_namespace_project_commit_path
(
@project
.
namespace
,
@project
,
@commit
.
id
)
}
"
)
;
app/views/projects/graphs/commits.html.haml
View file @
316dd9c8
...
...
@@ -49,26 +49,24 @@
Commits per weekday
%canvas
#weekday-chart
:coffeescript
responsiveChart = (selector, data) ->
options = { "scaleOverlay": true, responsive: true, pointHitDetectionRadius: 2, maintainAspectRatio: false }
:javascript
var
responsiveChart
=
function
(
selector
,
data
)
{
var
options
=
{
"
scaleOverlay
"
:
true
,
responsive
:
true
,
pointHitDetectionRadius
:
2
,
maintainAspectRatio
:
false
};
// get selector by context
var
ctx
=
selector
.
get
(
0
).
getContext
(
"
2d
"
);
// pointing parent container to make chart.js inherit its width
var
container
=
$
(
selector
).
parent
();
var
generateChart
=
function
()
{
selector
.
attr
(
'
width
'
,
$
(
container
).
width
());
return
new
Chart
(
ctx
).
Bar
(
data
,
options
);
};
// enabling auto-resizing
$
(
window
).
resize
(
generateChart
);
return
generateChart
();
};
# get selector by context
ctx = selector.get(0).getContext("2d")
# pointing parent container to make chart.js inherit its width
container = $(selector).parent()
generateChart = ->
selector.attr('width', $(container).width())
new Chart(ctx).Bar(data, options)
# enabling auto-resizing
$(window).resize( generateChart )
generateChart()
chartData = (keys, values) ->
data = {
var
chartData
=
function
(
keys
,
values
)
{
var
data
=
{
labels
:
keys
,
datasets
:
[{
fillColor
:
"
rgba(220,220,220,0.5)
"
,
...
...
@@ -78,13 +76,15 @@
barDatasetSpacing
:
1
,
data
:
values
}]
}
};
return
data
;
};
hourData = chartData(
#{
@commits_per_time
.
keys
.
to_json
}
,
#{
@commits_per_time
.
values
.
to_json
}
)
responsiveChart($('#hour-chart'), hourData)
var
hourData
=
chartData
(
#{
@commits_per_time
.
keys
.
to_json
}
,
#{
@commits_per_time
.
values
.
to_json
}
);
responsiveChart
(
$
(
'
#hour-chart
'
),
hourData
)
;
dayData = chartData(
#{
@commits_per_week_days
.
keys
.
to_json
}
,
#{
@commits_per_week_days
.
values
.
to_json
}
)
responsiveChart($('#weekday-chart'), dayData)
var
dayData
=
chartData
(
#{
@commits_per_week_days
.
keys
.
to_json
}
,
#{
@commits_per_week_days
.
values
.
to_json
}
);
responsiveChart
(
$
(
'
#weekday-chart
'
),
dayData
)
;
monthData = chartData(
#{
@commits_per_month
.
keys
.
to_json
}
,
#{
@commits_per_month
.
values
.
to_json
}
)
responsiveChart($('#month-chart'), monthData)
var
monthData
=
chartData
(
#{
@commits_per_month
.
keys
.
to_json
}
,
#{
@commits_per_month
.
values
.
to_json
}
);
responsiveChart
(
$
(
'
#month-chart
'
),
monthData
)
;
app/views/projects/graphs/show.html.haml
View file @
316dd9c8
...
...
@@ -28,18 +28,21 @@
:
coffee
script
$.ajax
:
java
script
$
.
ajax
({
type
:
"
GET
"
,
url
:
location
.
href
,
success: (data) ->
graph = new ContributorsStatGraph()
graph.init(data)
dataType
:
"
json
"
,
success
:
function
(
data
)
{
var
graph
=
new
ContributorsStatGraph
();
graph
.
init
(
data
);
$("#brush_change").change ->
graph.change_date_header()
graph.redraw_authors()
$
(
"
#brush_change
"
).
change
(
function
(){
graph
.
change_date_header
();
graph
.
redraw_authors
();
});
$
(
"
.stat-graph
"
).
fadeIn
();
$
(
"
.loading-graph
"
).
hide
();
dataType: "json"
}
});
app/views/projects/merge_requests/_new_compare.html.haml
View file @
316dd9c8
...
...
@@ -77,12 +77,13 @@
});
:coffeescript
$(".merge-request-form").on 'submit', ->
if $("#merge_request_source_branch").val() is "" or $('#merge_request_target_branch').val() is ""
$(".mr-compare-errors").html("You must select source and target branch to proceed")
$(".mr-compare-errors").fadeIn()
event.preventDefault()
return
:javascript
$
(
"
.merge-request-form
"
).
on
(
'
submit
'
,
function
()
{
if
(
$
(
"
#merge_request_source_branch
"
).
val
()
===
""
||
$
(
'
#merge_request_target_branch
'
).
val
()
===
""
)
{
$
(
"
.mr-compare-errors
"
).
html
(
"
You must select source and target branch to proceed
"
);
$
(
"
.mr-compare-errors
"
).
fadeIn
();
event
.
preventDefault
();
return
;
}
});
app/views/projects/merge_requests/widget/_heading.html.haml
View file @
316dd9c8
...
...
@@ -38,6 +38,7 @@
=
icon
(
"times-circle"
)
Could not connect to the CI server. Please check your settings and try again.
:coffeescript
$ ->
merge_request_widget.getCiStatus()
:javascript
$
(
function
()
{
merge_request_widget
.
getCiStatus
();
});
app/views/projects/merge_requests/widget/_merged.html.haml
View file @
316dd9c8
...
...
@@ -15,7 +15,7 @@
-
elsif
can_remove_branch?
(
@merge_request
.
source_project
,
@merge_request
.
source_branch
)
.remove_source_branch_widget
%p
%p
=
succeed
'.'
do
The changes were merged into
%span
.label-branch
=
@merge_request
.
target_branch
...
...
@@ -25,7 +25,7 @@
Remove Source Branch
.remove_source_branch_widget.failed.hide
%p
%p
Failed to remove source branch '
#{
@merge_request
.
source_branch
}
'.
.remove_source_branch_in_progress.hide
...
...
@@ -33,17 +33,20 @@
=
icon
(
'spinner spin'
)
Removing source branch '
#{
@merge_request
.
source_branch
}
'. Please wait. This page will be automatically reload.
:coffeescript
$('.remove_source_branch').on 'click', ->
$('.remove_source_branch_widget').hide()
$('.remove_source_branch_in_progress').show()
$(".remove_source_branch").on "ajax:success", (e, data, status, xhr) ->
location.reload()
$(".remove_source_branch").on "ajax:error", (e, data, status, xhr) ->
$('.remove_source_branch_widget').hide()
$('.remove_source_branch_in_progress').hide()
$('.remove_source_branch_widget.failed').show()
:javascript
$
(
'
.remove_source_branch
'
).
on
(
'
click
'
,
function
()
{
$
(
'
.remove_source_branch_widget
'
).
hide
();
$
(
'
.remove_source_branch_in_progress
'
).
show
();
});
$
(
"
.remove_source_branch
"
).
on
(
"
ajax:success
"
,
function
(
e
,
data
,
status
,
xhr
)
{
location
.
reload
();
});
$
(
"
.remove_source_branch
"
).
on
(
"
ajax:error
"
,
function
(
e
,
data
,
status
,
xhr
)
{
$
(
'
.remove_source_branch_widget
'
).
hide
();
$
(
'
.remove_source_branch_in_progress
'
).
hide
();
$
(
'
.remove_source_branch_widget.failed
'
).
show
();
});
app/views/projects/merge_requests/widget/open/_accept.html.haml
View file @
316dd9c8
...
...
@@ -20,8 +20,9 @@
text:
@merge_request
.
merge_commit_message
,
rows:
14
,
hint:
true
:coffeescript
$('.accept-mr-form').on 'ajax:before', ->
btn = $('.accept_merge_request')
btn.disable()
btn.html("<i class='fa fa-spinner fa-spin'></i> Merge in progress")
:javascript
$
(
'
.accept-mr-form
'
).
on
(
'
ajax:before
'
,
function
()
{
var
btn
=
$
(
'
.accept_merge_request
'
);
btn
.
disable
();
btn
.
html
(
"
<i class='fa fa-spinner fa-spin'></i> Merge in progress
"
);
});
app/views/projects/merge_requests/widget/open/_check.html.haml
View file @
316dd9c8
...
...
@@ -2,6 +2,8 @@
=
icon
(
"spinner spin"
)
Checking ability to merge automatically
…
:coffeescript
$ ->
merge_request_widget.getMergeStatus()
:javascript
$
(
function
()
{
merge_request_widget
.
getMergeStatus
();
});
app/views/projects/new.html.haml
View file @
316dd9c8
...
...
@@ -124,9 +124,11 @@
Creating project
&
repository.
%p
Please wait a moment, this page will automatically refresh when ready.
:coffeescript
$('.how_to_import_link').bind 'click', (e) ->
e.preventDefault()
import_modal = $(this).next(".modal").show()
$('.modal-header .close').bind 'click', ->
$(".modal").hide()
:javascript
$
(
'
.how_to_import_link
'
).
bind
(
'
click
'
,
function
(
e
)
{
e
.
preventDefault
();
var
import_modal
=
$
(
this
).
next
(
"
.modal
"
).
show
();
});
$
(
'
.modal-header .close
'
).
bind
(
'
click
'
,
function
()
{
$
(
"
.modal
"
).
hide
();
});
app/views/projects/project_members/index.html.haml
View file @
316dd9c8
...
...
@@ -29,7 +29,8 @@
-
if
@group
=
render
"group_members"
,
members:
@group_members
:coffeescript
$('form.member-search-form').on 'submit', (event) ->
event.preventDefault()
Turbolinks.visit @.action + '?' + $(@).serialize()
:javascript
$
(
'
form.member-search-form
'
).
on
(
'
submit
'
,
function
(
event
)
{
event
.
preventDefault
();
Turbolinks
.
visit
(
this
.
action
+
'
?
'
+
$
(
this
).
serialize
());
});
app/views/shared/issuable/_context.html.haml
View file @
316dd9c8
...
...
@@ -45,6 +45,6 @@
.description-block.subscribed
{
class:
(
'hidden'
unless
subscribed
)}
You're receiving notifications because you're subscribed to this thread.
:
coffee
script
new Subscription("
#{
toggle_subscription_path
(
issuable
)
}
")
new IssuableContext()
:
java
script
new
Subscription
(
"
#{
toggle_subscription_path
(
issuable
)
}
"
)
;
new
IssuableContext
()
;
app/views/shared/issuable/_filter.html.haml
View file @
316dd9c8
...
...
@@ -60,9 +60,9 @@
=
hidden_field_tag
:state_event
,
params
[
:state_event
]
=
button_tag
"Update issues"
,
class:
"btn update_selected_issues btn-save"
:
coffee
script
new UsersSelect()
$('form.filter-form').on 'submit', (event) ->
event.preventDefault()
Turbolinks.visit @.action + '&' + $(@).serialize()
:
java
script
new
UsersSelect
()
;
$
(
'
form.filter-form
'
).
on
(
'
submit
'
,
function
(
event
)
{
event
.
preventDefault
();
Turbolinks
.
visit
(
this
.
action
+
'
&
'
+
$
(
this
).
serialize
());
});
app/views/shared/projects/_list.html.haml
View file @
316dd9c8
...
...
@@ -17,5 +17,5 @@
=
link_to
'#'
,
class:
'js-expand'
do
Show all
:
coffee
script
new ProjectsList()
:
java
script
new
ProjectsList
()
;
app/views/users/show.html.haml
View file @
316dd9c8
...
...
@@ -115,5 +115,5 @@
projects:
@projects
.
sort_by
(
&
:star_count
).
reverse
,
projects_limit:
10
,
stars:
true
,
avatar:
true
:
coffee
script
$(".user-calendar").load("
#{
user_calendar_path
}
")
:
java
script
$
(
"
.user-calendar
"
).
load
(
"
#{
user_calendar_path
}
"
)
;
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