1
0
mirror of https://github.com/fspc/Yellow-Bike-Database.git synced 2025-02-22 17:03:22 -05:00

This cleans up things a bit for spinner.

This commit is contained in:
Jonathan Rosenbaum 2017-07-27 18:47:16 +00:00
parent e663006698
commit 1202c4909a
3 changed files with 34 additions and 4 deletions

View File

@ -114,8 +114,23 @@ input[value=Save]:focus, input[value=Close]:focus {
margin-left: 10px; margin-left: 10px;
} }
/* spinner for volunteer hour redemption */
#redeemable_hours { #redeemable_hours {
display: none; display: none;
margin-left: 10px; 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;
}

View File

@ -721,16 +721,29 @@ $(function() {
if (volunteer_hours && volunteer_hours.length) { if (volunteer_hours && volunteer_hours.length) {
$("#volunteer_hours").prop("title",title).html("Volunteer Hours"); $("#volunteer_hours").prop("title",title).html("Volunteer Hours");
$(".ui-spinner").show();
$( "#redeemable_hours" ).spinner({ $( "#redeemable_hours" ).spinner({
step: 0.10, step: 0.10,
numberFormat: "n" numberFormat: "n",
}).show(); 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); //$("#redeemable_hours").html(obj.redeemable_hours);
} else { } else {
$("#volunteer_hours").prop("title","").empty(); $("#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"); $("#stand_time_total").text(obj.hours + " hours " + obj.minutes + " minutes");
} else { } else {
amount.val(data); amount.val(data);
$("#stand_time_total").empty(); $("#stand_time_total").empty();
$(".ui-spinner").hide();
} }
}); // stand time pos }); // stand time pos
} }

View File

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