task- and shot- specific lists are now called item-

This commit is contained in:
2016-11-09 17:04:13 +01:00
parent 40ecbe2135
commit 5bf56ffd34
12 changed files with 248 additions and 237 deletions

View File

@@ -152,9 +152,9 @@ function task_add(shot_id, task_id, task_type)
var context = ProjectUtils.context();
if (context == 'task') {
/* WARNING: This is a copy of an element of attract/tasks/for_project #task-list.col-list
/* WARNING: This is a copy of an element of attract/tasks/for_project .item-list.col-list
* If that changes, change this too. */
$('#task-list').append('\
$('.item-list.task').append('\
<a class="col-list-item task-list-item status-todo task-link active"\
href="' + url + '"\
data-task-id="' + task_id + '"\
@@ -172,7 +172,7 @@ function task_add(shot_id, task_id, task_type)
var $list_cell = $('#' + context + '-' + shot_id + ' .table-cell.task-type.' + task_type);
var url = '/attract/' + project_url + '/' + context + 's/with-task/' + task_id;
/* WARNING: This is a copy of an element of attract/shots/for_project #task-list.col-list
/* WARNING: This is a copy of an element of attract/shots/for_project .item-list.col-list
* If that changes, change this too. */
$list_cell.append('\
<a class="status-todo task-link active"\
@@ -279,7 +279,7 @@ function attract_form_save(form_id, item_id, item_save_url, options)
}
function task_save(task_id, task_url) {
return attract_form_save('task_form', 'task-' + task_id, task_url, {
return attract_form_save('item_form', 'task-' + task_id, task_url, {
done: function($task, saved_task) {
// Update the task list.
// NOTE: this is tightly linked to the HTML of the task list in for_project.jade.
@@ -309,7 +309,7 @@ function task_save(task_id, task_url) {
}
function shot_save(shot_id, shot_url) {
return attract_form_save('shot_form', 'shot-' + shot_id, shot_url, {
return attract_form_save('item_form', 'shot-' + shot_id, shot_url, {
done: function($shot, saved_shot) {
// Update the shot list.
$('.shot-name-' + saved_shot._id).text(saved_shot.name);
@@ -333,11 +333,11 @@ function shot_save(shot_id, shot_url) {
}
function asset_save(asset_id, asset_url) {
return attract_form_save('shot_form', 'asset-' + asset_id, asset_url, {
return attract_form_save('item_form', 'asset-' + asset_id, asset_url, {
done: function($asset, saved_asset) {
// Update the asset list.
// NOTE: this is tightly linked to the HTML of the asset list in for_project.jade.
$('.asset-name-' + saved_asset._id).text(saved_asset.name).flashOnce();
$('.item-name-' + saved_asset._id).text(saved_asset.name).flashOnce();
$asset.find('span.name').text(saved_asset.name);
$asset.find('span.due_date').text(moment().to(saved_asset.properties.due_date));
$asset.find('span.status').text(saved_asset.properties.status.replace('_', ' '));