Browse Source

Select Type is now static to avoid unnecessary errors.

1).  Makes better sense from a UI perspective.
devel
Jonathan Rosenbaum 9 years ago
parent
commit
b01649d369
  1. 5
      css/transactions.css
  2. 12
      js/transaction.js
  3. 10
      transaction_log.php

5
css/transactions.css

@ -6,6 +6,11 @@ td > label:not(.payment_type):not(.open_shop):not(.gnucash_csv) {
padding-right: 5px;
}
/* bold transaction type */
#trans_type_info {
font-weight: bolder;
}
/* make unimportant buttons into links */
input[value=Delete], input[name=date_fill] {
background:none!important;

12
js/transaction.js

@ -1,4 +1,4 @@
/* jQuery fun with transactions - Jonathan Rosenbaum */
/* jQuery fun with transactions - Jonathan Rosenbaum <gnuser@gmail.com> */
// currently some css is just hardwired, but that reflects the coding style of YBDB :)
@ -8,8 +8,8 @@ $(function() {
$.ajaxSetup({async:false}); // best to do this in $.ajax,
// but all ajax needs to be synchronous in this program because of the use of mysql
$("select[name='transaction_type']").attr("tabindex",1);
$("select[name='transaction_type']").focus();
$("#transaction_type").attr("tabindex",1);
$("#transaction_type").focus();
$("input[value='Create Transaction']").attr("tabindex",2);
$("#trans_date").mask("0000-00-00", {placeholder: "yyyy-mm-dd" });
@ -218,7 +218,7 @@ $(function() {
percentage_amounts = percentage_amounts + percentage;
}
// watch that percentage don't aquire too many decimal points.
// watch that percentage doesn't acquire too many decimal points.
//console.dir(range_obj);
});
@ -435,7 +435,7 @@ $(function() {
// make tabbing more predictable
$("input[name='shop_id']").attr("tabindex",1);
$("select[name='transaction_type']").attr("tabindex",2);
// $("#transaction_type").attr("tabindex",2);
$("input[name='date_startstorage']").attr("tabindex",3);
$("input[name='date']").attr("tabindex",4);
$("input[name='quantity']").attr("tabindex",5);
@ -515,7 +515,7 @@ $(function() {
}
// description error
if ( $("[name='transaction_type']").val() != "Deposit" ) { // Deposit description is implicit
if ( $("#transaction_type").val() != "Deposit" ) { // Deposit description is implicit
err5 = error_handler(description.val(), description_error, "","*Required: a detailed description",e);
}

10
transaction_log.php

@ -401,8 +401,14 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "ChangeDate")) {
<td><input name="shop_id" type="text" id="shop_id" value="<?php echo $row_Recordset2['shop_id']; ?>" size="6" /></td>
</tr>
<?php ?>
<tr><td>&nbsp;</td><td><label>Select Type:</label></td>
<td><?php list_transaction_types('transaction_type',$row_Recordset2['transaction_type'] ); ?></td>
<tr><td>&nbsp;</td><td><label for="trans_type_info">Transaction Type:</label></td>
<td><?php echo "<span id='trans_type_info'>" . $row_Recordset2['transaction_type'] . "</span>";
echo "<input type='hidden' id='transaction_type' name='transaction_type' value='" .
$row_Recordset2['transaction_type'] . "'>";
//list_transaction_types('transaction_type',$row_Recordset2['transaction_type'] );
?></td>
</tr>
<?php //date_startstorage ==============================================================
if($row_Recordset3['show_startdate']){?>

Loading…
Cancel
Save