Fix code style and PHP5.6 errors
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -59,7 +59,7 @@ return [
|
|||||||
['name' => 'card#assignUser', 'url' => '/cards/{cardId}/assign', 'verb' => 'POST'],
|
['name' => 'card#assignUser', 'url' => '/cards/{cardId}/assign', 'verb' => 'POST'],
|
||||||
['name' => 'card#unassignUser', 'url' => '/cards/{cardId}/assign/{userId}', 'verb' => 'DELETE'],
|
['name' => 'card#unassignUser', 'url' => '/cards/{cardId}/assign/{userId}', 'verb' => 'DELETE'],
|
||||||
|
|
||||||
['name' => 'attachment#list', 'url' => '/cards/{cardId}/attachments', 'verb' => 'GET'],
|
['name' => 'attachment#getAll', 'url' => '/cards/{cardId}/attachments', 'verb' => 'GET'],
|
||||||
['name' => 'attachment#display', 'url' => '/cards/{cardId}/attachment/{attachmentId}', 'verb' => 'GET'],
|
['name' => 'attachment#display', 'url' => '/cards/{cardId}/attachment/{attachmentId}', 'verb' => 'GET'],
|
||||||
['name' => 'attachment#create', 'url' => '/cards/{cardId}/attachment', 'verb' => 'POST'],
|
['name' => 'attachment#create', 'url' => '/cards/{cardId}/attachment', 'verb' => 'POST'],
|
||||||
['name' => 'attachment#update', 'url' => '/cards/{cardId}/attachment/{attachmentId}', 'verb' => 'UPDATE'],
|
['name' => 'attachment#update', 'url' => '/cards/{cardId}/attachment/{attachmentId}', 'verb' => 'UPDATE'],
|
||||||
|
|||||||
@@ -59,15 +59,16 @@ app.controller('CardController', function ($scope, $rootScope, $sce, $location,
|
|||||||
'File already exists',
|
'File already exists',
|
||||||
function(result) {
|
function(result) {
|
||||||
if (result) {
|
if (result) {
|
||||||
$scope.runUpload(fileItem)
|
$scope.runUpload(fileItem);
|
||||||
} else {
|
} else {
|
||||||
// TODO: check for proper number and append it before the file extension
|
// TODO: check for proper number and append it before the file extension
|
||||||
|
// TODO: iterate over attachments (check if matches "file.name (n)") increase n
|
||||||
fileItem.file.name = fileItem.file.name + '.1';
|
fileItem.file.name = fileItem.file.name + '.1';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$scope.runUpload(fileItem)
|
$scope.runUpload(fileItem);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
$scope.uploader.onSuccessItem = function(item, response) {
|
$scope.uploader.onSuccessItem = function(item, response) {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class AttachmentController extends Controller {
|
|||||||
$this->attachmentService = $attachmentService;
|
$this->attachmentService = $attachmentService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function list($cardId) {
|
public function getAll($cardId) {
|
||||||
return $this->attachmentService->getAll($cardId);
|
return $this->attachmentService->getAll($cardId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user