Many goodies for a better user experience.

1. New NONSHOP constant. 0=no function =>1 is function
2. Moved individual_hours_log back to /
3. Added better view/business logic for storage transactions,
   and new documentation.
4. New users logging in can immediately add a project/comments
5. Added more documentation to populate and a new show_payment field.
This commit is contained in:
Jonathan Rosenbaum
2014-12-30 08:34:49 +00:00
parent f72f022811
commit 2370ccee7b
7 changed files with 142 additions and 48 deletions
+35
View File
@@ -42,6 +42,41 @@ $(function() {
$.post("json/transaction.php",{ payment_type: this.value, transaction_id: $transaction_id } );
}
});
/* When the transaction is storage based, only show price and payment_type
when a full date (yyyy-mm-dd) is entered. */
if ( $("#date_startstorage").length ) {
var date_value = $("#date").val();
var date_test = /^\d{4}-((0\d)|(1[012]))-(([012]\d)|3[01])$/.test(date_value);
if ( date_test && date_value != "0000-00-00" ) {
$("#price").show();
$("#payment_type").show();
} else {
$("#price").hide();
$("#payment_type").hide();
}
$("#date_fill").click(function(){
$("#price").show();
$("#payment_type").show();
})
$("#date").on("input", function(){
date_test = /^\d{4}-((0\d)|(1[012]))-(([012]\d)|3[01])$/.test(this.value);
if ( date_test && this.value != "0000-00-00" ) {
$("#price").show();
$("#payment_type").show();
} else {
$("#price").hide();
$("#payment_type").hide();
}
});
} // end testing for storage presentation
} // editing a transaction