add hours changelog in ticket_change table.
@@ -127,6 +127,11 @@ | ||
127 | 127 | (ticket,time,author,field, oldvalue, newvalue) |
128 | 128 | VALUES(%s, %s, '%s', '%s', '%s', '%s')""" % (ticket_id, change_time, req.authname, 'totalhours', totalhours, new_totalhours) |
129 | 129 | cursor.execute(SQL) |
130 | + SQL="""INSERT INTO ticket_change | |
131 | + (ticket,time,author,field, oldvalue, newvalue) | |
132 | + VALUES(%s, %s, '%s', '%s', '%s', '%s')""" % (ticket_id, change_time, req.authname, 'hours', 0, float(props['hours'])) | |
133 | + cursor.execute(SQL) | |
134 | + | |
130 | 135 | db.commit() |
131 | 136 | elif field=='remainedhours': |
132 | 137 | cursor.execute("""SELECT te.value, tt.value FROM ticket t""" |
@@ -14,6 +14,31 @@ | ||
14 | 14 | $(document).ready(function() { |
15 | 15 | $("div.description").find("h1,h2,h3,h4,h5,h6").addAnchor("Link to this section"); |
16 | 16 | }); |
17 | +function moveFocus(e){ | |
18 | + id = e.target.id; | |
19 | + fname = id.substring(0,id.indexOf('_')+1); | |
20 | + fid = parseInt(id.substring(id.indexOf('_')+1,id.length)); | |
21 | + | |
22 | + if(navigator.appName.charAt(0)=="N") | |
23 | + kc=e.which; | |
24 | + if(navigator.appName.charAt(0)=="M") | |
25 | + kc=event.keyCode; | |
26 | + | |
27 | + // up | |
28 | + if(kc==38) { | |
29 | + f = document.getElementById(fname+(fid-1)); | |
30 | + if (f==undefined) return ; | |
31 | + f.focus(); | |
32 | + } | |
33 | + // down | |
34 | + if(kc==40) { | |
35 | + f = document.getElementById(fname+(fid+1)); | |
36 | + if (f==undefined) return ; | |
37 | + f.focus(); | |
38 | + } | |
39 | +} | |
40 | +document.onkeydown=moveFocus | |
41 | + | |
17 | 42 | </script> |
18 | 43 | </head> |
19 | 44 |
@@ -24,7 +49,7 @@ | ||
24 | 49 | <h1>作業時間入力</h1> |
25 | 50 | 作業時間とタスクの残り時間を入力します。最低でも1日一回入力を行ってください。<br /> |
26 | 51 | 一度入力を行った時間はこの画面からは次の日まで入力できません。追加で稼働時間を入力したい場合は、各チケットの画面から入力してください。 |
27 | -<form method="post" action="${req.href('worktime')}" > | |
52 | +<form method="post" action="${req.href('worktime')}" autocomplete="off" > | |
28 | 53 | <table border="0" cellspacing="0" cellpadding="0" class="listing tickets"> |
29 | 54 | <thead> |
30 | 55 | <tr> |