view customize pluginを使用します。
パスのパターン:/issues/[0-9]+
挿入位置:全てのページのヘッダ
種別:JavaScript
javascript
1$(function(){
2 $('div[class="journal has-notes"]').each(function(){
3 var txt = $(this).find('p').html();
4 $(this).find('a[class="icon-only icon-comment"]').on('click', function(){
5 var oldnotes = $('#issue_notes').val();
6 var oldtxt = $('#time_entry_comments').val(); //他の入力項目を指定
7 $('#time_entry_comments').val(oldtxt + txt); //他の入力項目を指定
8
9 var flg;
10 flg = false;
11 $.when(
12 $(document).ajaxComplete(function(){
13 if (flg == false){
14 flg = true;
15 $('#issue_notes').val("");
16 }
17 })
18 ).done(function(){
19 setTimeout(function() {
20 $('#issue_notes').val(oldnotes);
21 }, 500);
22 })
23
24 })
25 })
26})
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。