kopia lustrzana https://github.com/magicbug/Cloudlog
Contesting Dupe Check Improvement
rodzic
9273c2c610
commit
f03b96968e
|
@ -202,6 +202,8 @@ class Contesting extends CI_Controller {
|
|||
$custom_date_format = $this->session->userdata('user_date_format');
|
||||
$abstimeb4=date($custom_date_format, strtotime($result->row()->COL_TIME_OFF)).' '.date('H:i',strtotime($result->row()->COL_TIME_OFF));
|
||||
echo json_encode(array('message' => 'Worked at '.$abstimeb4.' ('.$timeb4.' ago) before'));
|
||||
} else {
|
||||
echo json_encode(array('message' => 'OKAY'));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -103,6 +103,11 @@ $(function () {
|
|||
});
|
||||
});
|
||||
|
||||
// checked if worked before after blur
|
||||
$("#callsign").blur(function () {
|
||||
checkIfWorkedBefore();
|
||||
});
|
||||
|
||||
// Here we capture keystrokes to execute functions
|
||||
document.onkeyup = function (e) {
|
||||
// ALT-W wipe
|
||||
|
@ -217,8 +222,8 @@ $("#callsign").keyup(function () {
|
|||
highlight(call.toUpperCase());
|
||||
}
|
||||
});
|
||||
|
||||
checkIfWorkedBefore();
|
||||
// moved to blur
|
||||
// checkIfWorkedBefore();
|
||||
var qTable = $('.qsotable').DataTable();
|
||||
qTable.search(call).draw();
|
||||
}
|
||||
|
@ -242,10 +247,23 @@ function checkIfWorkedBefore() {
|
|||
},
|
||||
success: function (result) {
|
||||
if (result.message.substr(0, 6) == 'Worked') {
|
||||
$('#callsign_info').removeClass('text-bg-success');
|
||||
$('#callsign_info').removeClass('text-bg-info');
|
||||
$('#callsign_info').addClass('text-bg-danger');
|
||||
$('#callsign_info').text(result.message);
|
||||
}
|
||||
else if (result.message == "OKAY") {
|
||||
$('#callsign_info').removeClass('text-bg-danger');
|
||||
$('#callsign_info').removeClass('text-bg-info');
|
||||
$('#callsign_info').addClass('text-bg-success');
|
||||
$('#callsign_info').text("Go Work Them!");
|
||||
} else {
|
||||
$('#callsign_info').text("");
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('#callsign_info').text("");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue