mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-20 17:41:55 +02:00
Move alias.js to local static
This commit is contained in:
37
apps/member/static/member/js/alias.js
Normal file
37
apps/member/static/member/js/alias.js
Normal file
@ -0,0 +1,37 @@
|
||||
|
||||
$("#alias_input").on('keypress',function(e) {
|
||||
if(e.which == 13) {
|
||||
$("#alias_submit").click();
|
||||
}
|
||||
});
|
||||
|
||||
function create_alias(note_id){
|
||||
$.post("/api/note/alias/",
|
||||
{
|
||||
"csrfmiddlewaretoken": CSRF_TOKEN,
|
||||
"name": $("#alias_input").val(),
|
||||
"note": note_id
|
||||
}
|
||||
).done(function(){
|
||||
$("#alias_table").load(location.pathname+ " #alias_table");
|
||||
addMsg("Alias ajouté","success");
|
||||
})
|
||||
.fail(function(xhr, textStatus, error){
|
||||
errMsg(xhr.responseJSON);
|
||||
});
|
||||
}
|
||||
// on click of button "delete" , call the API
|
||||
function delete_button(button_id){
|
||||
$.ajax({
|
||||
url:"/api/note/alias/"+button_id+"/",
|
||||
method:"DELETE",
|
||||
headers: {"X-CSRFTOKEN": CSRF_TOKEN}
|
||||
})
|
||||
.done(function(){
|
||||
addMsg('Alias supprimé','success');
|
||||
$("#alias_table").load(location.pathname + " #alias_table");
|
||||
})
|
||||
.fail(function(xhr,textStatus, error){
|
||||
errMsg(xhr.responseJSON);
|
||||
});
|
||||
}
|
@ -4,12 +4,12 @@ Font-Awesome attribution is already done inside SVG files
|
||||
*/
|
||||
|
||||
#login-form input[type="text"] {
|
||||
background: #fff right 1rem top 50% / 5% no-repeat url('fa-user.svg');
|
||||
background: #fff right 1rem top 50% / 5% no-repeat url('../img/fa-user.svg');
|
||||
padding-right: 3rem;
|
||||
}
|
||||
|
||||
#login-form input[type="password"] {
|
||||
background: #fff right 1rem top 50% / 5% no-repeat url('fa-lock.svg');
|
||||
background: #fff right 1rem top 50% / 5% no-repeat url('../img/fa-lock.svg');
|
||||
padding-right: 3rem;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 529 B After Width: | Height: | Size: 529 B |
Before Width: | Height: | Size: 573 B After Width: | Height: | Size: 573 B |
Reference in New Issue
Block a user