Author: smaisonneuve Date: 2015-05-22 14:14:54 +0000 (Fri, 22 May 2015) New Revision: 1442 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1442 Log: [EsLint] - Fixing syntax Modified: wit/js/services/UserActivityService.js Modified: wit/js/services/UserActivityService.js =================================================================== --- wit/js/services/UserActivityService.js 2015-05-22 14:11:44 UTC (rev 1441) +++ wit/js/services/UserActivityService.js 2015-05-22 14:14:54 UTC (rev 1442) @@ -79,7 +79,7 @@ } else { - xprop({prop:'_NET_WM_NAME', id:windowId}, function(err, properties) { + xprop({prop: "_NET_WM_NAME", id: windowId}, function(err, properties) { if (err) { log.warn("Couldn't retrieve window name for id :", windowId); @@ -103,7 +103,7 @@ }; var setupActivityDetection = function(session) { - if (disableActivityDetection || !session || !timer.getTime()) { + if (disableActivityDetection || !session || !scope.timer.getTime()) { clearTimeout(activityChangeTimer); // stop activity detection @@ -207,7 +207,7 @@ * If withEmptySession parameter equals true, then if there is a gap between 2 sessions in the results, * it will be filled with a fake session */ -exports.getSessions = function (startDate, endDate, withEmptySession) { +exports.getSessions = function(startDate, endDate, withEmptySession) { var rst; if (!startDate || !endDate) { @@ -217,13 +217,13 @@ var d1 = moment(startDate), d2 = moment(endDate); rst = db.getSessions(d1.toDate(), d2.toDate()) - .then(function (sessions) { + .then(function(sessions) { // Append the current active session to the sessions list return crtSession ? sessions.concat([crtSession]) : sessions; }) - .then(function (sessions) { + .then(function(sessions) { var result = JSON.parse(JSON.stringify(sessions)); // Convert results @@ -262,19 +262,19 @@ * Offers an api for services interesting in activity change detection */ exports.subscribeActivityChange = function(callback) { - eventEmitter.on('onActivityChange', callback); + eventEmitter.on("onActivityChange", callback); }; -exports.getActivityChangeDetectedDate = function () { +exports.getActivityChangeDetectedDate = function() { return activityChangeTimer && activityChangeTimer.changeDetectedDate; }; -exports.suspendActivityDetection = function () { +exports.suspendActivityDetection = function() { disableActivityDetection = true; clearTimeout(activityChangeTimer); }; -exports.resumeActivityDetection = function () { +exports.resumeActivityDetection = function() { disableActivityDetection = false; };