This commit is contained in:
chenjing
2023-06-13 15:30:16 +08:00
parent e90c79486a
commit cfaa5301ea
78 changed files with 682 additions and 163 deletions

View File

@@ -0,0 +1,43 @@
$(document).on('turbolinks:load', function(){
if ($('body.admins-organizations-index-page').length > 0) {
var showSuccessNotify = function() {
$.notify({
message: '操作成功'
},{
type: 'success'
});
}
// organizations open cla
$('.organizations-list-container').on('click', '.open-cla-action', function(){
var $action = $(this);
var userId = $action.data('id');
$.ajax({
url: '/admins/organizations/' + userId + '/open_cla',
method: 'POST',
dataType: 'json',
success: function() {
showSuccessNotify();
}
});
});
// organizations close cla
$('.organizations-list-container').on('click', '.close-cla-action', function(){
var $action = $(this);
var userId = $action.data('id');
$.ajax({
url: '/admins/organizations/' + userId + '/close_cla',
method: 'POST',
dataType: 'json',
success: function() {
showSuccessNotify();
}
});
});
}
});