mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
cla init
This commit is contained in:
43
app/assets/javascripts/admins/organizations/index.js
Normal file
43
app/assets/javascripts/admins/organizations/index.js
Normal 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();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
2
app/assets/javascripts/organizations/clas.js
Normal file
2
app/assets/javascripts/organizations/clas.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// Place all the behaviors and hooks related to the matching controller here.
|
||||
// All this logic will automatically be available in application.js.
|
||||
2
app/assets/javascripts/users/clas.js
Normal file
2
app/assets/javascripts/users/clas.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// Place all the behaviors and hooks related to the matching controller here.
|
||||
// All this logic will automatically be available in application.js.
|
||||
3
app/assets/stylesheets/organizations/clas.scss
Normal file
3
app/assets/stylesheets/organizations/clas.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
// Place all the styles related to the organizations/clas controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||
3
app/assets/stylesheets/users/clas.scss
Normal file
3
app/assets/stylesheets/users/clas.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
// Place all the styles related to the users/clas controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||
Reference in New Issue
Block a user