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();