From bac869c8e2101c9e35c273d409b10876fd0f095a Mon Sep 17 00:00:00 2001 From: wpmudev-sls <30955326+wpmudev-sls@users.noreply.github.com> Date: Mon, 20 Jan 2020 11:51:13 +0200 Subject: [PATCH] JS issue in admin units page --- asset/js/coursepress-unitsbuilder.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/asset/js/coursepress-unitsbuilder.js b/asset/js/coursepress-unitsbuilder.js index fdf9830c..bca214cc 100644 --- a/asset/js/coursepress-unitsbuilder.js +++ b/asset/js/coursepress-unitsbuilder.js @@ -1453,10 +1453,11 @@ var CoursePress = CoursePress || {}; }, fetchModules: function( unit_id, page ) { + var units_builder = this; this.module_collection.url = _coursepress._ajax_url + '?action=unit_builder&task=modules&course_id=' + _coursepress.course_id + '&unit_id=' + unit_id + '&page=' + page; this.module_collection.fetch({ success: function() { - this.$('.unit-save-button').removeClass( 'disabled' ); + units_builder.$('.unit-save-button').removeClass( 'disabled' ); } }); // Get the number of pages