mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-25 11:07:56 +08:00
#1146 finsih UI work for access mode of collaborators
Collaborators have write access as default, and can be changed via repository collaboration settings page to change between read, write and admin.
This commit is contained in:
@ -458,6 +458,20 @@ function initRepository() {
|
||||
}
|
||||
}
|
||||
|
||||
function initRepositoryCollaboration(){
|
||||
console.log('initRepositoryCollaboration');
|
||||
|
||||
// Change collaborator access mode
|
||||
$('.access-mode.menu .item').click(function(){
|
||||
var $menu = $(this).parent();
|
||||
$.post($menu.data('url'), {
|
||||
"_csrf": csrf,
|
||||
"uid": $menu.data('uid'),
|
||||
"mode": $(this).data('value')
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function initWiki() {
|
||||
if ($('.repository.wiki').length == 0) {
|
||||
return;
|
||||
@ -964,7 +978,8 @@ $(document).ready(function () {
|
||||
initAdmin();
|
||||
|
||||
var routes = {
|
||||
'div.user.settings': initUserSettings
|
||||
'div.user.settings': initUserSettings,
|
||||
'div.repository.settings.collaboration': initRepositoryCollaboration
|
||||
};
|
||||
|
||||
var selector;
|
||||
|
Reference in New Issue
Block a user