repo: add protect branch whitelist (#4177)

Add options to add users and teams to whitelist of a protected
branch. This is only available for organizational repositories.
This commit is contained in:
Unknwon
2017-02-23 18:25:12 -05:00
parent b78e03934d
commit 6072e9a52c
16 changed files with 290 additions and 40 deletions

View File

@@ -341,7 +341,7 @@ function initRepository() {
// Branches
if ($('.repository.settings.branches').length > 0) {
initFilterSearchDropdown('.protected-branches .dropdown');
$('.enable-protection').change(function () {
$('.enable-protection, .enable-whitelist').change(function () {
if (this.checked) {
$($(this).data('target')).removeClass('disabled');
} else {
@@ -1223,7 +1223,9 @@ $(document).ready(function () {
});
// Semantic UI modules.
$('.dropdown').dropdown();
$('.ui.dropdown').dropdown({
forceSelection: false
});
$('.jump.dropdown').dropdown({
action: 'hide',
onShow: function () {