Commit a971880e authored by Alfredo Sumaran's avatar Alfredo Sumaran Committed by Jacob Schatz

Fix endpoint

parent deee55f0
...@@ -148,6 +148,7 @@ class @LabelsSelect ...@@ -148,6 +148,7 @@ class @LabelsSelect
$.ajax( $.ajax(
type: 'PUT' type: 'PUT'
url: issueURL url: issueURL
dataType: 'JSON'
data: data data: data
).done (data) -> ).done (data) ->
$loading.fadeOut() $loading.fadeOut()
......
...@@ -94,6 +94,7 @@ class @UsersSelect ...@@ -94,6 +94,7 @@ class @UsersSelect
.fadeIn() .fadeIn()
$.ajax( $.ajax(
type: 'PUT' type: 'PUT'
dataType: 'json'
url: issueURL url: issueURL
data: data data: data
).done (data) -> ).done (data) ->
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
.issuable-sidebar .issuable-sidebar
.block.issuable-sidebar-header .block.issuable-sidebar-header
- if issuable.to_ability_name == 'merge_request' - if issuable.to_ability_name == 'merge_request'
- issuable_url = namespace_project_merge_request_path(@project.namespace, @project, issuable.id, :json) - issuable_url = namespace_project_merge_request_path(@project.namespace, @project, issuable.iid)
- else - else
- issuable_url = namespace_project_issue_path(@project.namespace, @project, issuable.id, :json) - issuable_url = namespace_project_issue_path(@project.namespace, @project, issuable.iid)
%span.issuable-count.hide-collapsed.pull-left %span.issuable-count.hide-collapsed.pull-left
= issuable.iid = issuable.iid
of of
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
.light None .light None
.selectbox.hide-collapsed .selectbox.hide-collapsed
- issuable.labels.each do |label| - issuable.labels.each do |label|
= hidden_field_tag "{issuable.to_ability_name}[label_names][]", label.id, id: nil = hidden_field_tag "#{issuable.to_ability_name}[label_names][]", label.id, id: nil
.dropdown .dropdown
%button.dropdown-menu-toggle.js-label-select.js-multiselect{type: "button", data: {toggle: "dropdown", field_name: "#{issuable.to_ability_name}[label_names][]", ability_name: issuable.to_ability_name, show_no: "true", show_any: "true", selected: issuable.label_names.join(","), project_id: (@project.id if @project), issue_update: issuable_url, labels: (namespace_project_labels_path(@project.namespace, @project, :json) if @project)}} %button.dropdown-menu-toggle.js-label-select.js-multiselect{type: "button", data: {toggle: "dropdown", field_name: "#{issuable.to_ability_name}[label_names][]", ability_name: issuable.to_ability_name, show_no: "true", show_any: "true", selected: issuable.label_names.join(","), project_id: (@project.id if @project), issue_update: issuable_url, labels: (namespace_project_labels_path(@project.namespace, @project, :json) if @project)}}
%span.dropdown-toggle-text %span.dropdown-toggle-text
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment