Allow task creation with parent.
The parent (shot_id in this case) is passed to the task creation end-point. Also, the task type is now passed as form parameter, rather than on the URL.
This commit is contained in:
@@ -32,13 +32,14 @@ function task_create(shot_id, project_url, task_type) {
|
||||
if (console) console.log("task_create(", shot_id, project_url, task_type, ") called.");
|
||||
return;
|
||||
}
|
||||
var base_url = '/attract/' + project_url + '/tasks/create';
|
||||
var url = '/attract/' + project_url + '/tasks/create';
|
||||
|
||||
if (task_type) {
|
||||
base_url += '/' + task_type;
|
||||
}
|
||||
data = {
|
||||
task_type: task_type,
|
||||
parent: shot_id,
|
||||
};
|
||||
|
||||
$.post(base_url, function(task_data) {
|
||||
$.post(url, data, function(task_data) {
|
||||
task_open(task_data.task_id, project_url);
|
||||
})
|
||||
.fail(function(xhr) {
|
||||
|
Reference in New Issue
Block a user