diff options
author | Dirceu Pereira Tiegs <dirceutiegs@gmail.com> | 2015-10-20 01:25:35 +0300 |
---|---|---|
committer | Dirceu Pereira Tiegs <dirceutiegs@gmail.com> | 2015-10-20 01:25:35 +0300 |
commit | 3d50b99d016af91c06a40f7a8bf4c298e241220a (patch) | |
tree | 76a081eacbdc19ac85d014b923fa78bfc3581e18 /app/assets/javascripts/blob | |
parent | 6df06ded12878fb7b5fb01626ea40344f22a5c5b (diff) |
Add option to create merge request when editing/creating a file
Diffstat (limited to 'app/assets/javascripts/blob')
-rw-r--r-- | app/assets/javascripts/blob/edit_blob.js.coffee | 7 | ||||
-rw-r--r-- | app/assets/javascripts/blob/new_blob.js.coffee | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/app/assets/javascripts/blob/edit_blob.js.coffee b/app/assets/javascripts/blob/edit_blob.js.coffee index 050888f9c15..a6f65642d78 100644 --- a/app/assets/javascripts/blob/edit_blob.js.coffee +++ b/app/assets/javascripts/blob/edit_blob.js.coffee @@ -11,6 +11,13 @@ class @EditBlob if ace_mode editor.getSession().setMode "ace/mode/" + ace_mode + $('#new_branch').keyup -> + if $(this).val() != $('#original_branch').val() + $('.form-group.destination').show() + else + $('.form-group.destination').hide() + $('#create_merge_request').prop('checked', false) + $(".js-commit-button").click -> $("#file-content").val editor.getValue() $(".file-editor form").submit() diff --git a/app/assets/javascripts/blob/new_blob.js.coffee b/app/assets/javascripts/blob/new_blob.js.coffee index 1f36a53f191..f4e06ad088b 100644 --- a/app/assets/javascripts/blob/new_blob.js.coffee +++ b/app/assets/javascripts/blob/new_blob.js.coffee @@ -11,6 +11,13 @@ class @NewBlob if ace_mode editor.getSession().setMode "ace/mode/" + ace_mode + $('#new_branch').keyup -> + if $(this).val() != $('#original_branch').val() + $('.form-group.destination').show() + else + $('.form-group.destination').hide() + $('#create_merge_request').prop('checked', false) + $(".js-commit-button").click -> $("#file-content").val editor.getValue() $(".file-editor form").submit() |