Commit 4c5518ac by Awais Committed by Awais Qureshi

Hide history comparison buttons if current obj and history obj are same.

ECOM-7854
parent dfe712e3
$(document).ready(function () {
// if current object and history object are same don't show the history changes buttons.
if ($('#id_history_revision').val()) {
$('.history').each(function () {
var element_id = this.id.split('_revision')[0];
var current_course_object = $('#' + element_id).val().trim();
var history_object_value = $(this).val().trim();
if (history_object_value === current_course_object) {
$(this).closest('div').find(".mce-history-changes").hide();
}
});
}
});
......@@ -631,6 +631,7 @@
<script src="{% static 'js/publisher/decode-html.js' %}"></script>
<script src="{% static 'js/publisher/modal-screen.js' %}"></script>
<script src="{% static 'js/publisher/disable-track-change-btns.js' %}"></script>
{% endblock %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment