From 914481f12bafe4dce90741e9b59e55d177333f2a Mon Sep 17 00:00:00 2001 From: Daryl Hedley Date: Fri, 10 Apr 2015 16:24:52 +0100 Subject: [PATCH 1/2] Removes sidebar update class Also stringifies options object so it can work with nodejs v0.12 fixes #630 --- frontend/src/core/sidebar/views/sidebarItemView.js | 2 +- plugins/content/course/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/core/sidebar/views/sidebarItemView.js b/frontend/src/core/sidebar/views/sidebarItemView.js index cca36c6942..a745ac4bcf 100644 --- a/frontend/src/core/sidebar/views/sidebarItemView.js +++ b/frontend/src/core/sidebar/views/sidebarItemView.js @@ -88,7 +88,7 @@ define(function(require) { resetButtons: function() { - var $buttonsSpans = this.$('.sidebar-updating').attr('disabled', false).find('span'); + var $buttonsSpans = this.$('.sidebar-updating').removeClass('sidebar-updating').attr('disabled', false).find('span'); $buttonsSpans.eq(0).removeClass('display-none'); $buttonsSpans.eq(1).remove(); }, diff --git a/plugins/content/course/index.js b/plugins/content/course/index.js index 9e47c7d5dd..5ce08c38ed 100644 --- a/plugins/content/course/index.js +++ b/plugins/content/course/index.js @@ -47,6 +47,7 @@ function initialize () { var options = _.keys(req.body).length ? req.body : req.query; + var options = JSON.stringify(options); var search = options.search || {}; var self = this; var orList = []; @@ -77,7 +78,6 @@ function initialize () { // force search to use only courses created by current user var user = usermanager.getCurrentUser(); query.$and.push({ createdBy : user._id }); - options.jsonOnly = true; options.fields = DASHBOARD_COURSE_FIELDS.join(' '); From 4abbdfe2fbfe42879368a6c5931ef9373e9adc04 Mon Sep 17 00:00:00 2001 From: Daryl Hedley Date: Thu, 16 Apr 2015 15:58:54 +0100 Subject: [PATCH 2/2] Removed fix for node v0.12 --- plugins/content/course/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/content/course/index.js b/plugins/content/course/index.js index 5ce08c38ed..4024ca86d9 100644 --- a/plugins/content/course/index.js +++ b/plugins/content/course/index.js @@ -47,7 +47,6 @@ function initialize () { var options = _.keys(req.body).length ? req.body : req.query; - var options = JSON.stringify(options); var search = options.search || {}; var self = this; var orList = [];