From f1706ccb25b727e93347a0a354fe3a50d80faa1c Mon Sep 17 00:00:00 2001 From: patrick Date: Tue, 3 Sep 2019 04:45:23 +1000 Subject: [PATCH] ack change will cause dirty --- css/bts_office.css | 23 +++++++++++++++++++++-- html/jobv1.html | 6 +++--- js/bts_office.js | 11 ++++++----- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/css/bts_office.css b/css/bts_office.css index d09453a..a9a8649 100644 --- a/css/bts_office.css +++ b/css/bts_office.css @@ -867,7 +867,7 @@ div.workspace .brating > span:hover ~ span:before { div.bsave span.ticon-copy { display: none; } -div.bsave.saved span.ticon-copy { +div.jobTable.saved div.bsave span.ticon-copy { display: inline-block; border: 3px solid orange; padding: 5px; @@ -884,10 +884,29 @@ div.bsave span.ticon-save { cursor: pointer; } -div.bsave.saved span.ticon-save { +div.jobTable.saved div.bsave span.ticon-save { display: none; } + +div.jobTable.saved div{ + background-color: transparent; +} + +div.jobTable.dirty div.bsave{ + background-color: lightyellow; +} +div.jobTable.dirty div.bsave span{ + animation-duration: 0.3s; + animation-timing-function: linear; + animation-delay: 0s; + animation-iteration-count: 5; + animation-direction: normal; + animation-fill-mode: none; + animation-play-state: running; + animation-name: blinker; +} + div.bdelete span.ticon-trash { display: inline-block; border: 3px solid lightgrey; diff --git a/html/jobv1.html b/html/jobv1.html index 62bdc43..e651083 100644 --- a/html/jobv1.html +++ b/html/jobv1.html @@ -1,5 +1,5 @@ {{#jobs}} -
@@ -11,12 +11,12 @@
{{rate_name}}
{{staff_name}}
{{client_name}}
-
+
{{rating}}
-
+
diff --git a/js/bts_office.js b/js/bts_office.js index ab0b213..da27f67 100644 --- a/js/bts_office.js +++ b/js/bts_office.js @@ -1437,11 +1437,12 @@ return $('#p'+login).data().obj; } - $(document).on('change', '.divTableRow select, .divTableRow input', function() { - var job = $(this).closest('.divTable').data().job; - job.validate(); - job.mark_dirty(); - debounced_calculate(); + $(document).on('change', '.divTableRow input[name="ack"]', function(e) { + var el = $(this).closest('.jobTable'); + var data = el.data(); + data.ack = e.checked? 1: 0; + el.removeClass('saved'); + el.addClass('dirty'); }); function init_ts(){