aboutsummaryrefslogtreecommitdiff
path: root/public/js/gogs.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/gogs.js')
-rw-r--r--public/js/gogs.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/public/js/gogs.js b/public/js/gogs.js
index 45b11fe7..58fed2cc 100644
--- a/public/js/gogs.js
+++ b/public/js/gogs.js
@@ -341,6 +341,18 @@ function initRepository() {
});
}
+ // Branches
+ if ($('.repository.settings.branches').length > 0) {
+ initFilterSearchDropdown('.protected-branches .dropdown');
+ $('.enable-protection').change(function () {
+ if (this.checked) {
+ $($(this).data('target')).removeClass('disabled');
+ } else {
+ $($(this).data('target')).addClass('disabled');
+ }
+ });
+ }
+
// Labels
if ($('.repository.labels').length > 0) {
// Create label