diff options
author | Jacob Schatz <jschatz1@gmail.com> | 2017-01-21 23:09:08 -0500 |
---|---|---|
committer | Jacob Schatz <jschatz1@gmail.com> | 2017-01-21 23:09:08 -0500 |
commit | 31da4b07a6688b8037a3287a94fc7633bf2c74a0 (patch) | |
tree | 4559ab3d06c4a4e4b66d6d9ff48667e9ec343e11 | |
parent | c20934869f7dc8cfbdbafb6ecb7b1305452c9e8a (diff) | |
download | gitlab-ce-31da4b07a6688b8037a3287a94fc7633bf2c74a0.tar.gz |
Button by itself will submit forms. Button type button willn't
-rw-r--r-- | app/assets/javascripts/group_avatar.js | 4 | ||||
-rw-r--r-- | app/views/shared/_choose_group_avatar_button.html.haml | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/group_avatar.js b/app/assets/javascripts/group_avatar.js index 5247b2a08f7..10dfd05fe3c 100644 --- a/app/assets/javascripts/group_avatar.js +++ b/app/assets/javascripts/group_avatar.js @@ -2,12 +2,12 @@ (function() { this.GroupAvatar = (function() { function GroupAvatar() { - $('.js-choose-group-avatar-button').bind("click", function() { + $('.js-choose-group-avatar-button').on("click", function() { var form; form = $(this).closest("form"); return form.find(".js-group-avatar-input").click(); }); - $('.js-group-avatar-input').bind("change", function() { + $('.js-group-avatar-input').on("change", function() { var filename, form; form = $(this).closest("form"); filename = $(this).val().replace(/^.*[\\\/]/, ''); diff --git a/app/views/shared/_choose_group_avatar_button.html.haml b/app/views/shared/_choose_group_avatar_button.html.haml index ee043910548..94295970acf 100644 --- a/app/views/shared/_choose_group_avatar_button.html.haml +++ b/app/views/shared/_choose_group_avatar_button.html.haml @@ -1,4 +1,4 @@ -%button.choose-btn.btn.btn-sm.js-choose-group-avatar-button +%button.choose-btn.btn.btn-sm.js-choose-group-avatar-button{ type: 'button' } %i.fa.fa-paperclip %span Choose File ... |