summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorAntony Lesuisse <al@openerp.com>2012-04-27 00:25:52 +0200
committerAntony Lesuisse <al@openerp.com>2012-04-27 00:25:52 +0200
commitfb83a403c4b47ce34a8d34552f53eed522f798f2 (patch)
tree2633da08781e6db34da584886309cc880369a280 /addons/web/static/src
parent3bf883c95e3a5e1698a0016440793ecd42d57927 (diff)
rename Connection into Session, now that we use instance
bzr revid: al@openerp.com-20120426222552-rqm974o8c9v1s4lk
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/boot.js12
-rw-r--r--addons/web/static/src/js/corelib.js4
-rw-r--r--addons/web/static/src/js/coresetup.js4
3 files changed, 10 insertions, 10 deletions
diff --git a/addons/web/static/src/js/boot.js b/addons/web/static/src/js/boot.js
index 1251975f41c..29d953aadd8 100644
--- a/addons/web/static/src/js/boot.js
+++ b/addons/web/static/src/js/boot.js
@@ -14,8 +14,8 @@
var openerp = this.openerp = {
// Per session namespace
// openerp.<module> will map to
- // openerp.sessions.sessionname.<module> using a closure
- sessions: {},
+ // openerp.instances.sessionname.<module> using a closure
+ instances: {},
/**
* OpenERP instance constructor
*
@@ -23,19 +23,19 @@
*/
init: function(modules) {
// By default only web will be loaded, the rest will be by loaded
- // by openerp.web.Connection on the first session_authenticate
+ // by openerp.web.Session on the first session_authenticate
modules = modules || ["web"];
var new_instance = {
// links to the global openerp
_openerp: openerp,
// this unique id will be replaced by hostname_databasename by
- // openerp.web.Connection on the first connection
- _session_id: "session" + session_counter++,
+ // openerp.web.Session on the first connection
+ _session_id: "instance" + session_counter++,
_modules: modules,
web: {},
web_mobile: {}
};
- openerp.sessions[new_instance._session_id] = new_instance;
+ openerp.instances[new_instance._session_id] = new_instance;
for(var i=0; i < modules.length; i++) {
openerp[modules[i]](new_instance);
}
diff --git a/addons/web/static/src/js/corelib.js b/addons/web/static/src/js/corelib.js
index ba37451700b..94aa82d6ddb 100644
--- a/addons/web/static/src/js/corelib.js
+++ b/addons/web/static/src/js/corelib.js
@@ -756,7 +756,7 @@ instance.web.Registry = instance.web.Class.extend({
* registry was created.
*
* An object path is simply a dotted name from the instance root to the
- * object pointed to (e.g. ``"instance.web.Connection"`` for an OpenERP
+ * object pointed to (e.g. ``"instance.web.Session"`` for an OpenERP
* connection object).
*
* @constructs instance.web.Registry
@@ -1341,7 +1341,7 @@ instance.web.JsonRPC = instance.web.CallbackEnabled.extend({
},
});
-instance.web.Connection = instance.web.JsonRPC.extend( /** @lends instance.web.Connection# */{
+instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Session# */{
init: function() {
this._super.apply(this, arguments);
// TODO: session store in cookie should be optional
diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js
index 86040302668..e2b06d0bbd3 100644
--- a/addons/web/static/src/js/coresetup.js
+++ b/addons/web/static/src/js/coresetup.js
@@ -98,8 +98,8 @@ $.Mutex = (function() {
return Mutex;
})();
-/** Setup default connection */
-instance.connection = new instance.web.Connection();
+/** Setup default session */
+instance.connection = new instance.web.Session();
instance.web.qweb.default_dict['__debug__'] = instance.connection.debug;
$.async_when = function() {