Browse Source

This cleans up things a bit for spinner.

devel
Jonathan Rosenbaum 7 years ago
parent
commit
1202c4909a
  1. 15
      css/transactions.css
  2. 22
      js/transaction.js
  3. 1
      transaction_log.php

15
css/transactions.css

@ -114,8 +114,23 @@ input[value=Save]:focus, input[value=Close]:focus {
margin-left: 10px;
}
/* spinner for volunteer hour redemption */
#redeemable_hours {
display: none;
margin-left: 10px;
font-size: .9em;
width: 82px;
height: 23px;
}
.ui-spinner {
display: none;
margin-left: 10px;
width: 85px;
height: 26px;
}
}
.ui-widget input {
font-size: .9em;
}

22
js/transaction.js

@ -721,16 +721,29 @@ $(function() {
if (volunteer_hours && volunteer_hours.length) {
$("#volunteer_hours").prop("title",title).html("Volunteer Hours");
$(".ui-spinner").show();
$( "#redeemable_hours" ).spinner({
step: 0.10,
numberFormat: "n"
}).show();
numberFormat: "n",
spin: function( event, ui ) {
if ( ui.value > obj.current_year_volunteer_hours ) {
$( this ).spinner( "value", obj.current_year_volunteer_hours );
return false;
} else if (ui.value < 0) {
$( this ).spinner( "value", 0 );
return false;
}
}
}).show();
//$("#redeemable_hours").html(obj.redeemable_hours);
} else {
$("#volunteer_hours").prop("title","").empty();
$("#redeemable_hours").hide();
$("#redeemable_hours").hide();
$(".ui-spinner").hide();
}
}
@ -748,7 +761,8 @@ $(function() {
$("#stand_time_total").text(obj.hours + " hours " + obj.minutes + " minutes");
} else {
amount.val(data);
$("#stand_time_total").empty();
$("#stand_time_total").empty();
$(".ui-spinner").hide();
}
}); // stand time pos
}

1
transaction_log.php

@ -561,6 +561,7 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "ChangeDate")) {
echo "<span id='anonymous_error'></span>";
echo "<span id='paid_member'></span>";
echo "<span id='volunteer_hours'></span>";
echo "<input id='redeemable_hours'>";
echo "</td>";
} elseif($row_Recordset3['show_soldto_not_signed_in']) {

Loading…
Cancel
Save