diff --git a/include_header.html b/include_header.html index 4951632..e097838 100644 --- a/include_header.html +++ b/include_header.html @@ -24,6 +24,7 @@ function resetTimer() YBDB + diff --git a/js/transaction.js b/js/transaction.js new file mode 100644 index 0000000..19485bf --- /dev/null +++ b/js/transaction.js @@ -0,0 +1,20 @@ +/* jQuery fun with transactions - Jonathan Rosenbaum */ + +// currently css is just hardwired, but that reflects the coding style of YBDB :) + +$(function() { + + $(".paid").click(function() { + if ($(this).prop("checked")) { + //console.log("turn color on"); + $(this).closest("tr").css("background-color","#99CC33"); + $.post("json/transaction.php",{ paid: 1, transaction_id: this.name } ); + } + else { + //console.log("turn color off"); + $(this).closest("tr").css("background-color","transparent"); + $.post("json/transaction.php",{ paid: 0, transaction_id: this.name } ); + } + }); + +}); \ No newline at end of file diff --git a/json/transaction.php b/json/transaction.php new file mode 100644 index 0000000..bb23dc5 --- /dev/null +++ b/json/transaction.php @@ -0,0 +1,21 @@ + \ No newline at end of file diff --git a/transaction_log.php b/transaction_log.php index 1fbdfeb..17f11cd 100644 --- a/transaction_log.php +++ b/transaction_log.php @@ -385,7 +385,10 @@ FROM transaction_log WHERE transaction_id = $trans_id; ";
- > + > @@ -393,7 +396,11 @@ FROM transaction_log WHERE transaction_id = $trans_id; ";   edit"; ?> - + + > +