Browse Source

Changes id to class for more than one row with same contact_id.

devel
Jonathan Rosenbaum 7 years ago
parent
commit
d98c033348
  1. 10
      js/shop.js
  2. 4
      shop_log.php

10
js/shop.js

@ -110,13 +110,13 @@ $(function(){
if (obj.contact_id) {
$("#volunteer_hours_" + obj.contact_id).html("Summary").
$(".volunteer_hours_" + obj.contact_id).html("Summary").
parent().css({backgroundColor: "#19a0cc", textAlign: "center", cursor: "cell"}).
prop("title",title).css({textAlign: "center"});
} else {
$("#volunteer_hours_" + id).parent().css({cursor: "not-allowed"});
$(".volunteer_hours_" + id).parent().css({cursor: "not-allowed"});
}
@ -162,12 +162,12 @@ $(function(){
// expired membership
if (d >= expiration_date) {
$("#paid_membership_" + membership_obj.contact_id).html("Expired").
$(".paid_membership_" + membership_obj.contact_id).html("Expired").
parent().css({backgroundColor: "red", textAlign: "center", cursor: "cell"}).prop("title",title);
// paid membership
} else if (d < expiration_date) {
$("#paid_membership_" + membership_obj.contact_id).html("Current").
$(".paid_membership_" + membership_obj.contact_id).html("Current").
parent().css({backgroundColor: "green", textAlign: "center", cursor: "cell"}).prop("title",title).css({textAlign: "center"});
} // paid membership
@ -175,7 +175,7 @@ $(function(){
// never been a member
} else {
$("#paid_membership_" + id).parent().css({cursor: "not-allowed"});
$(".paid_membership_" + id).parent().css({cursor: "not-allowed"});
} // never been a member

4
shop_log.php

@ -250,8 +250,8 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "FormEdit")) {
<td><?php echo list_time($row_Recordset1['time_in'],$row_Recordset1['time_out'],'time_out',0,1,'none', $shop_hours_length, $row_Recordset1['et']); ?></td>
<td><?php sign_out($row_Recordset1['time_out'], $row_Recordset1['first_name']); ?>&nbsp</td>
<td><?php if($shop_CanEdit == 1) {echo "<a href=\"{$_SERVER['PHP_SELF']}?shop_id={$shop_id}&visit_id={$row_Recordset1['shop_visit_id']}\">edit</a>";} else {echo "&nbsp";} ?></td>
<td><span id="volunteer_hours_<?php echo $row_Recordset1['contact_id']; ?>"></span></td>
<td><span id="paid_membership_<?php echo $row_Recordset1['contact_id']; ?>"></span></td>
<td><span class="volunteer_hours_<?php echo $row_Recordset1['contact_id']; ?>"></span></td>
<td><span class="paid_membership_<?php echo $row_Recordset1['contact_id']; ?>"></span></td>
</tr>
<input type="hidden" name="MM_insert" value="FormUpdate">
<input type="hidden" name="shop_visit_id" value="<?php echo $row_Recordset1['shop_visit_id']; ?>">

Loading…
Cancel
Save