Added project settings allowing setup + editing task types.

- Attract added to Project Settings screen
- setting up project for Attract
- editing shot/asset task types

To do: add checks that the user is allowed to use Attract in the first
place.
This commit is contained in:
2017-06-14 17:35:14 +02:00
parent 725f93175c
commit 9ea75c30e3
7 changed files with 252 additions and 14 deletions

View File

@@ -178,3 +178,23 @@ function setHeaderCellsWidth(tableHeaderRowOriginal, tableHeaderRowFixed) {
return table_header.eq(i).width();
});
}
/* Returns a more-or-less reasonable message given an error response object. */
function xhrErrorResponseMessage(err) {
if (typeof err.responseJSON == 'undefined')
return err.statusText;
if (typeof err.responseJSON._error != 'undefined' && typeof err.responseJSON._error.message != 'undefined')
return err.responseJSON._error.message;
if (typeof err.responseJSON._message != 'undefined')
return err.responseJSON._message
return err.statusText;
}
function xhrErrorResponseElement(err, prefix) {
msg = xhrErrorResponseMessage(err);
return $('<span>')
.text(prefix + msg);
}