fix: conditionally hide sections in edit mode only
Wrapped the logic to hide sections in an edit mode check, ensuring it only runs when the page is in edit mode. This prevents unintended hiding of sections during normal view, improving the user experience.
This commit is contained in:
parent
a1185aba77
commit
8c1e8c49eb
1 changed files with 15 additions and 11 deletions
|
@ -212,6 +212,9 @@
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const editMode = $(".inplaceeditable").length > 0;
|
||||||
|
|
||||||
|
if (editMode) {
|
||||||
var sections = $('.course-section');
|
var sections = $('.course-section');
|
||||||
var found = false;
|
var found = false;
|
||||||
|
|
||||||
|
@ -224,6 +227,7 @@
|
||||||
$(this).css('visibility', 'hidden');
|
$(this).css('visibility', 'hidden');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|
Loading…
Reference in a new issue