diff options
Diffstat (limited to 'public/js/gogs.js')
-rw-r--r-- | public/js/gogs.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/public/js/gogs.js b/public/js/gogs.js index e971492673..53908a2eb2 100644 --- a/public/js/gogs.js +++ b/public/js/gogs.js @@ -203,6 +203,22 @@ function initRepository() { }); } + // Issues + if ($('.repository.view.issue').length > 0) { + var $status_btn = $('#status-button'); + $('#content').keyup(function () { + if ($(this).val().length == 0) { + $status_btn.text($status_btn.data('status')) + } else { + $status_btn.text($status_btn.data('status-and-comment')) + } + }); + $status_btn.click(function () { + $('#status').val($status_btn.data('status-val')); + $('#comment-form').submit(); + }) + } + // Pull request if ($('.repository.compare.pull').length > 0) { var $branch_dropdown = $('.choose.branch .dropdown') |