-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* LDBR-4.12: Реализовать функционал работы с вложенями * LDBR-4.7: Внести правки в работу с аттачами Co-authored-by: DPeshkoff <[email protected]>
- Loading branch information
Showing
9 changed files
with
320 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,4 +57,5 @@ jobs: | |
source: "dist/*" | ||
target: "/home/ubuntu/01-frontend/" | ||
overwrite: true | ||
rm: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
'use strict'; | ||
|
||
// Modules | ||
import Dispatcher from '../modules/Dispatcher/Dispatcher.js'; | ||
|
||
/** | ||
* Константа, содержащая в себе типы действий для списка досок. | ||
*/ | ||
export const AttachmentsActionTypes = { | ||
UPLOAD: 'attach/upload', | ||
DELETE: 'attach/delete', | ||
DOWNLOAD: 'attach/download', | ||
}; | ||
|
||
/** | ||
* Класс, содержащий в себе действия в системе. | ||
*/ | ||
export const attachmentsActions = { | ||
/** | ||
* Загружает файл вложения | ||
* @param {File} file файл вложения | ||
*/ | ||
uploadAttachment(file) { | ||
Dispatcher.dispatch({ | ||
actionName: AttachmentsActionTypes.UPLOAD, | ||
data: {file}, | ||
}); | ||
}, | ||
|
||
/** | ||
* Удаляет файл вложения | ||
* @param {Number} atid id вложения | ||
*/ | ||
deleteAttachment(atid) { | ||
Dispatcher.dispatch({ | ||
actionName: AttachmentsActionTypes.DELETE, | ||
data: {atid}, | ||
}); | ||
}, | ||
|
||
/** | ||
* Скачивает файл вложения | ||
* @param {Number} atid id вложения | ||
*/ | ||
downloadAttachment(atid) { | ||
Dispatcher.dispatch({ | ||
actionName: AttachmentsActionTypes.DOWNLOAD, | ||
data: {atid}, | ||
}); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.