diff options
Diffstat (limited to 'public/js/index.js')
-rw-r--r-- | public/js/index.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/public/js/index.js b/public/js/index.js index 6c710f18f6..a4702a4138 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1655,6 +1655,23 @@ function u2fRegisterRequest() { }); } +function initWipTitle() { + $(".title_wip_desc > a").click(function (e) { + e.preventDefault(); + + var $issueTitle = $("#issue_title"); + var value = $issueTitle.val().trim().toUpperCase(); + + for (var i in wipPrefixes) { + if (value.startsWith(wipPrefixes[i].toUpperCase())) { + return; + } + } + + $issueTitle.val(wipPrefixes[0] + " " + $issueTitle.val()); + }); +} + $(document).ready(function () { csrf = $('meta[name=_csrf]').attr("content"); suburl = $('meta[name=_suburl]').attr("content"); @@ -1869,6 +1886,7 @@ $(document).ready(function () { initU2FAuth(); initU2FRegister(); initIssueList(); + initWipTitle(); initPullRequestReview(); // Repo clone url. |