Commit 67edd8f2 by swdanielli

code clean

parent d9d7d9fe
......@@ -1133,8 +1133,9 @@ function RecommenderXBlock(runtime, element, init_data) {
function initializeRecommender() {
/* Set configuration variables */
FLAGGED_RESOURCE_REASONS = {};
/* the default page of resources showed to students. Should always be 1 */
CURRENT_PAGE = 1;
DISABLE_DEV_UX = init_data['DISABLE_DEV_UX'];
CURRENT_PAGE = init_data['CURRENT_PAGE'];
ENTRIES_PER_PAGE = init_data['ENTRIES_PER_PAGE'];
PAGE_SPAN = init_data['PAGE_SPAN'];
IS_USER_STAFF = init_data['IS_USER_STAFF'];
......
......@@ -8,10 +8,10 @@ function RecommenderXBlock(runtime, element) {
function bindConfigSettingEvent() {
$('.configSubmit').click(function() {
var data = {};
data['DISABLE_DEV_UX'] = $('.developedUXDisable').val();
data['ENTRIES_PER_PAGE'] = $('.entriesPerPage').val();
data['PAGE_SPAN'] = $('.pageSpan').val();
data['INTRO'] = $('.introEnable').val();
data['DISABLE_DEV_UX'] = $('.developedUXDisable').val() == 'true';
data['ENTRIES_PER_PAGE'] = parseInt($('.entriesPerPage').val());
data['PAGE_SPAN'] = parseInt($('.pageSpan').val());
data['INTRO_ENABLE'] = $('.introEnable').val() == 'true';
$.ajax({
type: "POST",
......
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