summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home>2015-12-21 16:45:52 -0500
committerJacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home>2015-12-21 16:45:52 -0500
commit1f5b8e88f3fedc382555e89b5a6ba9be57d551c7 (patch)
tree06ad761330fe83f310b8d67e03613065cc4cf98b /app
parent3e7e7ae0aceaa8a805093841b07b9b5d9f911cb1 (diff)
downloadgitlab-ce-1f5b8e88f3fedc382555e89b5a6ba9be57d551c7.tar.gz
changes `data-url` to `href` for javascript url grabbing
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/issue.js.coffee3
-rw-r--r--app/views/projects/issues/show.html.haml4
2 files changed, 4 insertions, 3 deletions
diff --git a/app/assets/javascripts/issue.js.coffee b/app/assets/javascripts/issue.js.coffee
index 1d57c24587d..ba5205fb471 100644
--- a/app/assets/javascripts/issue.js.coffee
+++ b/app/assets/javascripts/issue.js.coffee
@@ -16,12 +16,13 @@ class @Issue
initIssueBtnEventListeners: ->
$("a.btn-close, a.btn-reopen").on "click", (e) ->
+ console.log('closing')
e.preventDefault()
e.stopImmediatePropagation()
$this = $(this)
isClose = $this.hasClass('btn-close')
$this.prop("disabled", true)
- url = $this.data('url')
+ url = $this.attr('href')
$.ajax
type: 'PUT'
url: url,
diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml
index 9444a1c1d84..4ca122ba55f 100644
--- a/app/views/projects/issues/show.html.haml
+++ b/app/views/projects/issues/show.html.haml
@@ -24,8 +24,8 @@
= icon('plus')
New Issue
- if can?(current_user, :update_issue, @issue)
- = link_to 'Reopen', '#', data: {no_turbolink: true, url: issue_path(@issue, issue: {state_event: :reopen}, status_only: true, format: 'json')}, class: "btn btn-grouped btn-reopen #{issue_button_visibility(@issue, false)}", title: 'Reopen Issue'
- = link_to 'Close', '#', data: {no_turbolink: true, url: issue_path(@issue, issue: {state_event: :close}, status_only: true, format: 'json')}, class: "btn btn-grouped btn-close #{issue_button_visibility(@issue, true)}", title: 'Close Issue'
+ = link_to 'Reopen', issue_path(@issue, issue: {state_event: :reopen}, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn btn-grouped btn-reopen #{issue_button_visibility(@issue, false)}", title: 'Reopen Issue'
+ = link_to 'Close', issue_path(@issue, issue: {state_event: :close}, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn btn-grouped btn-close #{issue_button_visibility(@issue, true)}", title: 'Close Issue'
= link_to edit_namespace_project_issue_path(@project.namespace, @project, @issue), class: 'btn btn-grouped issuable-edit' do
= icon('pencil-square-o')