From 89b3edad09c7ab1aa292612543aaa2234fe5a51c Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Tue, 20 Aug 2013 17:12:41 +0200 Subject: [PATCH] Solved style problems identified by jshint bzr revid: nicolas.vanhoren@openerp.com-20130820151241-1oi29vxm8iq34v8x --- addons/im/Gruntfile.js | 2 +- addons/im/static/src/js/im.js | 9 +++++++-- addons/im/static/src/js/im_common.js | 4 +--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/addons/im/Gruntfile.js b/addons/im/Gruntfile.js index 3d4a7f5aa50..e8c88bbec9a 100644 --- a/addons/im/Gruntfile.js +++ b/addons/im/Gruntfile.js @@ -2,7 +2,7 @@ module.exports = function(grunt) { grunt.initConfig({ jshint: { - src: ['static/js/*.js'], + src: ['static/src/js/*.js'], options: { sub: true, //[] instead of . evil: true, //eval diff --git a/addons/im/static/src/js/im.js b/addons/im/static/src/js/im.js index 8e21167cc9a..9af04bf4f43 100644 --- a/addons/im/static/src/js/im.js +++ b/addons/im/static/src/js/im.js @@ -1,5 +1,10 @@ -openerp.im = function(instance) { +(function() { + "use strict"; + + var instance = openerp; + + openerp.im = {}; var USERS_LIMIT = 20; @@ -151,4 +156,4 @@ openerp.im = function(instance) { }, }); -} \ No newline at end of file +})(); \ No newline at end of file diff --git a/addons/im/static/src/js/im_common.js b/addons/im/static/src/js/im_common.js index d1a67d26d59..a6314a978e2 100644 --- a/addons/im/static/src/js/im_common.js +++ b/addons/im/static/src/js/im_common.js @@ -26,8 +26,6 @@ function declare($, _, openerp) { }); var _t = openerp._t; - - var im_common = {}; var ERROR_DELAY = 5000; @@ -283,7 +281,7 @@ function declare($, _, openerp) { }, init: function(parent, user, me, options) { this._super(parent); - this.options = options + this.options = options; this.me = me; this.user = user; this.user.add_watcher();