aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-02-23 18:25:12 -0500
committerUnknwon <u@gogs.io>2017-02-23 18:25:12 -0500
commit6072e9a52cf01723aea2b9a5ca7dfe22b101fbfc (patch)
tree17fe0e830584dfef2ff855bc75992df727997c08 /public
parentb78e03934d057bdb4c628fefb364dda6eb1f260a (diff)
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.
Diffstat (limited to 'public')
-rw-r--r--public/css/gogs.css6
-rw-r--r--public/js/gogs.js6
-rw-r--r--public/less/_repository.less7
3 files changed, 17 insertions, 2 deletions
diff --git a/public/css/gogs.css b/public/css/gogs.css
index ed6ef2a9..afef67ac 100644
--- a/public/css/gogs.css
+++ b/public/css/gogs.css
@@ -2310,6 +2310,12 @@ footer .ui.language .menu {
margin-left: 20px;
display: block;
}
+.repository.settings.branches .branch-protection .whitelist {
+ margin-left: 26px;
+}
+.repository.settings.branches .branch-protection .whitelist .dropdown img {
+ display: inline-block;
+}
.repository.settings.webhooks .types .menu .item {
padding: 10px !important;
}
diff --git a/public/js/gogs.js b/public/js/gogs.js
index 2cd98d3b..0bf65c13 100644
--- a/public/js/gogs.js
+++ b/public/js/gogs.js
@@ -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 () {
diff --git a/public/less/_repository.less b/public/less/_repository.less
index f80f9d56..7471d7f8 100644
--- a/public/less/_repository.less
+++ b/public/less/_repository.less
@@ -1330,6 +1330,13 @@
margin-left: 20px;
display: block;
}
+ .whitelist {
+ margin-left: 26px;
+
+ .dropdown img {
+ display: inline-block;
+ }
+ }
}
}