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