mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-11-30 04:13:01 +00:00
Compare commits
1 Commits
8ec42bcf2b
...
83de99c28e
Author | SHA1 | Date | |
---|---|---|---|
|
83de99c28e |
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* On form submit, add a new opener
|
* On form submit, create a new friendship
|
||||||
*/
|
*/
|
||||||
function form_create_opener (e) {
|
function form_create_opener (e) {
|
||||||
// Do not submit HTML form
|
// Do not submit HTML form
|
||||||
@ -16,9 +16,9 @@ function form_create_opener (e) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add an opener between an activity and a user
|
* Create a trust between users
|
||||||
* @param activity:Integer activity id
|
* @param trusting:Integer trusting note id
|
||||||
* @param opener:Integer user note id
|
* @param trusted:Integer trusted note id
|
||||||
*/
|
*/
|
||||||
function create_opener(activity, opener) {
|
function create_opener(activity, opener) {
|
||||||
$.post('/api/activity/opener/', {
|
$.post('/api/activity/opener/', {
|
||||||
@ -28,15 +28,36 @@ function create_opener(activity, opener) {
|
|||||||
}).done(function () {
|
}).done(function () {
|
||||||
// Reload tables
|
// Reload tables
|
||||||
$('#opener_table').load(location.pathname + ' #opener_table')
|
$('#opener_table').load(location.pathname + ' #opener_table')
|
||||||
addMsg(gettext('Opener successfully added'), 'success')
|
addMsg(gettext('Friendship successfully added'), 'success')
|
||||||
}).fail(function (xhr, _textStatus, _error) {
|
}).fail(function (xhr, _textStatus, _error) {
|
||||||
errMsg(xhr.responseJSON)
|
errMsg(xhr.responseJSON)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* On click of "delete", delete the opener
|
* On form submit, create a new friendship
|
||||||
* @param button_id:Integer Opener id to remove
|
function create_opener (e) {
|
||||||
|
// Do not submit HTML form
|
||||||
|
e.preventDefault()
|
||||||
|
|
||||||
|
// Get data and send to API
|
||||||
|
const formData = new FormData(e.target)
|
||||||
|
$.post('/api/activity/opener/', {
|
||||||
|
csrfmiddlewaretoken: formData.get('csrfmiddlewaretoken'),
|
||||||
|
activity: formData.get('activity'),
|
||||||
|
opener: formData.get('opener')
|
||||||
|
}).done(function () {
|
||||||
|
// Reload table
|
||||||
|
$('#opener_table').load(location.pathname + ' #opener_table')
|
||||||
|
addMsg(gettext('Alias successfully added'), 'success')
|
||||||
|
}).fail(function (xhr, _textStatus, _error) {
|
||||||
|
errMsg(xhr.responseJSON)
|
||||||
|
})
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On click of "delete", delete the trust
|
||||||
|
* @param button_id:Integer Trust id to remove
|
||||||
*/
|
*/
|
||||||
function delete_button (button_id) {
|
function delete_button (button_id) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -44,7 +65,7 @@ function delete_button (button_id) {
|
|||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
headers: { 'X-CSRFTOKEN': CSRF_TOKEN }
|
headers: { 'X-CSRFTOKEN': CSRF_TOKEN }
|
||||||
}).done(function () {
|
}).done(function () {
|
||||||
addMsg(gettext('Opener successfully deleted'), 'success')
|
addMsg(gettext('Friendship successfully deleted'), 'success')
|
||||||
$('#opener_table').load(location.pathname + ' #opener_table')
|
$('#opener_table').load(location.pathname + ' #opener_table')
|
||||||
}).fail(function (xhr, _textStatus, _error) {
|
}).fail(function (xhr, _textStatus, _error) {
|
||||||
errMsg(xhr.responseJSON)
|
errMsg(xhr.responseJSON)
|
||||||
|
12
docs/faq.rst
12
docs/faq.rst
@ -177,13 +177,11 @@ Contributeur⋅rices
|
|||||||
|
|
||||||
Liste des contributeur⋅rices majeur⋅es, par ordre alphabétique :
|
Liste des contributeur⋅rices majeur⋅es, par ordre alphabétique :
|
||||||
|
|
||||||
* bleizi
|
* Pierre-André « PAC » COMBY
|
||||||
* erdnaxe
|
* Emmy « ÿnérant » D'ANELLO
|
||||||
* esum
|
* Benjamin « esum » GRAILLOT
|
||||||
* korenst1
|
* Alexandre « erdnaxe » IOOSS
|
||||||
* nicomarg
|
* Nicolas « nicomarg » MARGULIES
|
||||||
* PAC
|
|
||||||
* ÿnérant
|
|
||||||
|
|
||||||
|
|
||||||
Hébergement
|
Hébergement
|
||||||
|
Loading…
Reference in New Issue
Block a user