summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal/web
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/BugModal/web')
-rw-r--r--extensions/BugModal/web/bug_modal.css6
-rw-r--r--extensions/BugModal/web/bug_modal.js13
2 files changed, 19 insertions, 0 deletions
diff --git a/extensions/BugModal/web/bug_modal.css b/extensions/BugModal/web/bug_modal.css
index 0a589b050..88ffadc9e 100644
--- a/extensions/BugModal/web/bug_modal.css
+++ b/extensions/BugModal/web/bug_modal.css
@@ -109,6 +109,9 @@ a.activity-ref {
background: #eee;
padding: 2px 5px;
cursor: pointer;
+ -webkit-box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
+ -moz-box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
+ box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
}
.module-header:hover {
@@ -158,6 +161,9 @@ a.activity-ref {
.module-content {
padding: 2px 5px;
background: #fff;
+ -webkit-box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
+ -moz-box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
+ box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
}
.module .field {
diff --git a/extensions/BugModal/web/bug_modal.js b/extensions/BugModal/web/bug_modal.js
index 6c10c6fb0..6c72eb249 100644
--- a/extensions/BugModal/web/bug_modal.js
+++ b/extensions/BugModal/web/bug_modal.js
@@ -949,6 +949,19 @@ $(function() {
$('#' + id).datetimepicker('show');
});
+ // timetracking
+ $('#work_time').change(function() {
+ // subtracts time spent from remaining time
+ // prevent negative values if work_time > fRemainingTime
+ var new_time = Math.max(BUGZILLA.remaining_time - $('#work_time').val(), 0.0);
+ // get upto 2 decimal places
+ $('#remaining_time').val(Math.round((new_time * 100)/100).toFixed(1));
+ });
+ $('#remaining_time').change(function() {
+ // if the remaining time is changed manually, update BUGZILLA.remaining_time
+ BUGZILLA.remaining_time = $('#remaining_time').val();
+ });
+
// new bug button
$.contextMenu({
selector: '#new-bug-btn',