files tree made better.
This commit is contained in:
parent
ffbf032480
commit
ccc91bbf19
1630 changed files with 18209 additions and 41860 deletions
22
src/Yavsc/wwwroot/js/input-lib.js
Normal file
22
src/Yavsc/wwwroot/js/input-lib.js
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
var allowCircleToBlog = function(e) {
|
||||
var allow = $(this).prop('checked');
|
||||
var circleid = $(this).data('circle-id');
|
||||
var targetid = $(this).data('target-id');
|
||||
var auth = { CircleId: circleid, BlogPostId: targetid };
|
||||
var url = '/api/blogacl';
|
||||
if (!allow) url += '/' + circleid;
|
||||
console.log(auth);
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: allow ? 'POST' : 'DELETE',
|
||||
data: JSON.stringify(auth),
|
||||
contentType: "application/json;charset=utf-8",
|
||||
success: function(data) {
|
||||
console.log('auth ' + allow ? 'POSTED' : 'DELETED' + data);
|
||||
},
|
||||
error: function() {
|
||||
console.log('Error @' + allow ? 'POSTed' : 'DELETEd');
|
||||
}
|
||||
});
|
||||
e.preventDefault();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue