diff options
author | Unknwon <u@gogs.io> | 2016-08-28 01:41:44 -0700 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-08-28 01:41:44 -0700 |
commit | 0114fdcba40270731d59fe24e8fa6c6147d69e01 (patch) | |
tree | 3cd62e41ad1ed6172e2ba1c16a5e06df39be147d /public | |
parent | dad5c155202a79514e60e73ac019191218167d35 (diff) | |
download | gitea-0114fdcba40270731d59fe24e8fa6c6147d69e01.tar.gz gitea-0114fdcba40270731d59fe24e8fa6c6147d69e01.zip |
Web editor: improve delete file process
Diffstat (limited to 'public')
-rw-r--r-- | public/js/gogs.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/public/js/gogs.js b/public/js/gogs.js index 25a1dc1336..c9f621745b 100644 --- a/public/js/gogs.js +++ b/public/js/gogs.js @@ -737,6 +737,16 @@ function setCodeMirror($editArea) { } function initEditor() { + $('.js-quick-pull-choice-option').change(function () { + if ($(this).val() == 'commit-to-new-branch') { + $('.quick-pull-branch-name').show(); + $('.quick-pull-branch-name input').prop('required',true); + } else { + $('.quick-pull-branch-name').hide(); + $('.quick-pull-branch-name input').prop('required',false); + } + }); + var $editFilename = $("#file-name"); $editFilename.keyup(function (e) { var $section = $('.breadcrumb span.section'); @@ -841,16 +851,6 @@ function initEditor() { codeMirrorEditor.setOption("lineWrapping", false); } }).trigger('keyup'); - - - $('.js-quick-pull-choice-option').change(function () { - if ($(this).val() == 'commit-to-new-branch') { - $('.quick-pull-branch-name').show(); - } else { - $('.quick-pull-branch-name').hide(); - } - }); - } function initOrganization() { |