diff --git a/addons/base/static/openerp/js/boot.js b/addons/base/static/openerp/js/boot.js index 9c5661d27d6..92353469165 100644 --- a/addons/base/static/openerp/js/boot.js +++ b/addons/base/static/openerp/js/boot.js @@ -62,7 +62,7 @@ })(); //--------------------------------------------------------- -// OpenERP initalisation and black magic about the pool +// OpenERP initialisation and black magic about the pool //--------------------------------------------------------- (function(){ @@ -79,7 +79,7 @@ var openerp = this.openerp = function() { // Only base will be loaded, the rest will be by loaded by // openerp.base.Connection on the first connection - o._modules_loaded = false + o._modules_loaded = false; // this unique id will be replaced by hostname_databasename by // openerp.base.Connection on the first connection @@ -92,7 +92,7 @@ var openerp = this.openerp = function() { openerp.base(o); return o; -} +}; // element_ids registry linked to all controllers on the page // TODO rename to elements, or keep gtk naming? diff --git a/addons/base/static/openerp/js/controllers.js b/addons/base/static/openerp/js/controllers.js index b5312856408..99fd4be61cd 100644 --- a/addons/base/static/openerp/js/controllers.js +++ b/addons/base/static/openerp/js/controllers.js @@ -57,7 +57,7 @@ openerp.base.callback = function(obj, method) { }; callback.add({ callback: method, self:obj, args:args.slice(2) }); return callback; -} +}; openerp.base.BasicController = Class.extend({ // TODO: init and start semantics are not clearly defined yet @@ -92,7 +92,7 @@ openerp.base.BasicController = Class.extend({ console.log(arguments); }, on_ready: function() { - }, + } }); openerp.base.Console = openerp.base.BasicController.extend({ @@ -110,12 +110,12 @@ openerp.base.Console = openerp.base.BasicController.extend({ $('
').text(v.toString()).appendTo(self.$element); } }); - }, + } }); openerp.base.Database = openerp.base.BasicController.extend({ // Non Session Controller to manage databases -}) +}); openerp.base.Session = openerp.base.BasicController.extend({ init: function(element_id, server, port) { @@ -133,15 +133,13 @@ openerp.base.Session = openerp.base.BasicController.extend({ this.context = {}; }, rpc: function(url, params, success_callback, error_callback) { - var self = this; - - // Construct a JSON-RPC2 request, method is currently unsed + // Construct a JSON-RPC2 request, method is currently unused params.session_id = this.session_id; params.context = typeof(params.context) != "undefined" ? params.context : this.context; var request = { jsonrpc: "2.0", method: "call", params: params, "id":null }; // This is a violation of the JSON-RPC2 over HTTP protocol - // specification but i dont know how to parse the raw POST content from + // specification but i don't know how to parse the raw POST content from // cherrypy so i use a POST form with one variable named request var post = { request: JSON.stringify(request) }; @@ -190,7 +188,7 @@ openerp.base.Session = openerp.base.BasicController.extend({ on_rpc_response: function() { }, on_rpc_error: function(error) { - // TODO this should use the $element with focus and buttonsi displaying OPW etc... + // TODO this should use the $element with focus and button is displaying OPW etc... this.on_log(error, error.message, error.data.type, error.data.debug); }, on_session_invalid: function(contination) { @@ -203,7 +201,7 @@ openerp.base.Session = openerp.base.BasicController.extend({ this.db = db; this.login = login; this.password = password; - var params = { db: this.db, login: this.login, password: this.password } + var params = { db: this.db, login: this.login, password: this.password }; this.rpc("/base/session/login", params, function(result) { self.session_id = result.session_id; self.uid = result.uid; @@ -234,8 +232,8 @@ openerp.base.Session = openerp.base.BasicController.extend({ document.getElementsByTagName("head")[0].appendChild(s); // at this point the js should be loaded or not ? } - for(var i=0; i