[FIX] LEAVE: Highlight issue on holidays
This commit is contained in:
@@ -48,6 +48,7 @@ function getCurrentLanguageCode(callback) {
|
||||
function tickHolidayCheckboxes() {
|
||||
var ids = JSON.parse($("#selectedHolidays").attr("data-ids") || "[]");
|
||||
uniqueIds = makeHolidayListUnique(ids);
|
||||
toggleHighlight(uniqueIds);
|
||||
click = $("#selectedHolidays").attr("data-clicked");
|
||||
if (click === "1") {
|
||||
$(".all-holidays").prop("checked", true);
|
||||
@@ -86,6 +87,7 @@ function addingHolidayIds() {
|
||||
});
|
||||
|
||||
ids = makeHolidayListUnique(ids);
|
||||
toggleHighlight(ids)
|
||||
selectedCount = ids.length;
|
||||
|
||||
getCurrentLanguageCode(function (code) {
|
||||
@@ -193,6 +195,9 @@ function unselectAllHolidays() {
|
||||
$("#" + empId).prop("checked", false);
|
||||
$(".all-holidays").prop("checked", false);
|
||||
}
|
||||
var ids = JSON.parse($("#selectedHolidays").attr("data-ids") || "[]");
|
||||
var uniqueIds = makeListUnique(ids);
|
||||
toggleHighlight(uniqueIds)
|
||||
$("#selectedHolidays").attr("data-ids", JSON.stringify([]));
|
||||
|
||||
count = [];
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
<input
|
||||
type="checkbox"
|
||||
id="{{holiday.id}}"
|
||||
onchange="highlightRow($(this))"
|
||||
class="oh-input holiday-checkbox oh-input__checkbox all-holidays-row"
|
||||
/>
|
||||
</div>
|
||||
@@ -183,9 +184,11 @@
|
||||
$(".all-holidays").change(function (e) {
|
||||
var is_checked = $(this).is(":checked");
|
||||
if (is_checked) {
|
||||
$(".all-holidays-row").prop("checked", true);
|
||||
$(".all-holidays-row").prop("checked", true).closest(".oh-sticky-table__tr")
|
||||
.addClass("highlight-selected");;
|
||||
} else {
|
||||
$(".all-holidays-row").prop("checked", false);
|
||||
$(".all-holidays-row").prop("checked", false).closest(".oh-sticky-table__tr")
|
||||
.removeClass("highlight-selected");;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user