diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-09-20 13:24:24 -0500 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-09-20 14:11:45 -0500 |
commit | f68b3aaaadac6658f8c2b5c330873582e44b87f8 (patch) | |
tree | 9a066ce109a9c4073dc6660bb9e4574f588b4466 /app/assets/javascripts/gl_dropdown.js | |
parent | d15109dc5e6185b512785611cd3d146010e1eacc (diff) | |
download | gitlab-ce-f68b3aaaadac6658f8c2b5c330873582e44b87f8.tar.gz |
Added defaults for the protected branches dropdowns for the repository settings
Diffstat (limited to 'app/assets/javascripts/gl_dropdown.js')
-rw-r--r-- | app/assets/javascripts/gl_dropdown.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/gl_dropdown.js b/app/assets/javascripts/gl_dropdown.js index 50d822eba5a..b643a38e401 100644 --- a/app/assets/javascripts/gl_dropdown.js +++ b/app/assets/javascripts/gl_dropdown.js @@ -737,7 +737,7 @@ GitLabDropdown = (function() { : selectedObject.id; if (isInput) { field = $(this.el); - } else if (value) { + } else if (value != null) { field = this.dropdown.parent().find("input[name='" + fieldName + "'][value='" + value.toString().replace(/'/g, '\\\'') + "']"); } @@ -745,7 +745,7 @@ GitLabDropdown = (function() { return; } - if (el.hasClass(ACTIVE_CLASS)) { + if (el.hasClass(ACTIVE_CLASS) && value !== 0) { isMarking = false; el.removeClass(ACTIVE_CLASS); if (field && field.length) { @@ -851,7 +851,7 @@ GitLabDropdown = (function() { if (href && href !== '#') { gl.utils.visitUrl(href); } else { - $el.first().trigger('click'); + $el.trigger('click'); } } }; |