From 481c9a72bd04248f7704b88e52efa14ba49c4008 Mon Sep 17 00:00:00 2001 From: patrick Date: Tue, 17 Nov 2020 14:37:34 +1100 Subject: [PATCH] bug fix attr-value to val() --- css/bts_office.css | 9 +++++---- html/timesheet.html | 2 +- html/timesheet_canvas_v1.html | 2 +- js/xeroc.js | 30 +++++++++++++++--------------- 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/css/bts_office.css b/css/bts_office.css index 16a50bc..667c64e 100644 --- a/css/bts_office.css +++ b/css/bts_office.css @@ -25,17 +25,18 @@ body { .titlebar_gradient { /* Permalink - use to edit and share this gradient: https://colorzilla.com/gradient-editor/#f6e6b4+0,ed9017+100 */ background: rgb(246,230,180); /* Old browsers */ - background: -moz-linear-gradient(top, rgba(246,230,180,1) 0%, rgba(237,144,23,1) 100%); /* FF3.6-15 */ - background: -webkit-linear-gradient(top, rgba(246,230,180,1) 0%,rgba(237,144,23,1) 100%); /* Chrome10-25,Safari5.1-6 */ - background: linear-gradient(to bottom, rgba(246,230,180,1) 0%,rgba(237,144,23,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ + background: -moz-linear-gradient(top, rgba(246,230,180,1) 0%, rgba(249, 249, 249,1) 100%); /* FF3.6-15 */ + background: -webkit-linear-gradient(top, rgba(246,230,180,1) 0%,rgba(249, 249, 249,1) 100%); /* Chrome10-25,Safari5.1-6 */ + background: linear-gradient(to bottom, rgba(246,230,180,1) 0%,rgba(249, 249, 249,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f6e6b4', endColorstr='#ed9017',GradientType=0 ); /* IE6-9 */ + } .sheettitle h1:hover { text-decoration: underline; font-weight: bolder; cursor: pointer; - animation: blinker 1s linear infinite; + /* animation: blinker 1s linear infinite; */ } .timesheets { diff --git a/html/timesheet.html b/html/timesheet.html index a973bec..5a9f507 100644 --- a/html/timesheet.html +++ b/html/timesheet.html @@ -32,7 +32,7 @@
-

Web Office - Today: Today

+

Web Office 2019 -Today: Today (new verion 2020)

diff --git a/html/timesheet_canvas_v1.html b/html/timesheet_canvas_v1.html index b9a32bf..6b3fea8 100644 --- a/html/timesheet_canvas_v1.html +++ b/html/timesheet_canvas_v1.html @@ -32,7 +32,7 @@
-

Web Office - Today: Today     (Old Version)

+

Web Office 2020 - Today: Today (old verion 2019)

diff --git a/js/xeroc.js b/js/xeroc.js index dab0246..28fa99b 100644 --- a/js/xeroc.js +++ b/js/xeroc.js @@ -41,9 +41,9 @@ function on_download_ndis_csv (){} function set_payroll_calendar(cal) { - $('#cstart').attr('value', cal.start); - $('#cfinish').attr('value', cal.finish); - $('#paydate').attr('value', cal.paydate); + $('#cstart').val(cal.start); + $('#cfinish').val(cal.finish); + $('#paydate').val(cal.paydate); } function get_timesheet_from_xero(){ @@ -221,11 +221,11 @@ function on_download_ndis_csv (){} function get_invoice_start() { - return $('#invoice_start').attr('value'); + return $('#invoice_start').val(); } function get_invoice_finish() { - return $('#invoice_finish').attr('value'); + return $('#invoice_finish').val(); } $(document).on('click', 'td.client_nameonly', function(){ @@ -285,8 +285,8 @@ function on_download_ndis_csv (){} var lastDay = new Date(date.getFullYear(), date.getMonth(), daysInMonth(date.getMonth()+1, date.getFullYear())); - $('#invoice_start').attr('value', format_date(firstDay)); - $('#invoice_finish').attr('value', format_date(lastDay)); + $('#invoice_start').val(format_date(firstDay)); + $('#invoice_finish').val(format_date(lastDay)); } $('#invoice_start').change(function(){ @@ -330,11 +330,11 @@ function on_download_ndis_csv (){} var lastDay = new Date(date.getFullYear(), date.getMonth(), daysInMonth(date.getMonth()+1, date.getFullYear())); - $('#ndis_start').attr('value', format_date(firstDay)); - $('#ndis_finish').attr('value', format_date(lastDay)); + $('#ndis_start').val(format_date(firstDay)); + $('#ndis_finish').val(format_date(lastDay)); - $('input[name="start"]').attr('value', format_date(firstDay)); - $('input[name="finish"]').attr('value', format_date(lastDay)); + $('input[name="start"]').val( format_date(firstDay)); + $('input[name="finish"]').attr( format_date(lastDay)); } function setup_clients_pick() { @@ -455,13 +455,13 @@ function on_download_ndis_csv (){} } $('#ndis_start').change(function(e){ - var val = $(this).attr('value'); - $('input[name="start"]').attr('value', val); + var val = $(this).val(); + $('input[name="start"]').val(val); }); $('#ndis_finish').change(function(e){ - var val = $(this).attr('value'); - $('input[name="finish"]').attr('value', val); + var val = $(this).val(); + $('input[name="finish"]').val(val); }); $(document).on('click', 'input.client_check', function(e){