diff options
| author | Christophe Simonis <chs@openerp.com> | 2011-11-17 13:49:26 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@openerp.com> | 2011-11-17 13:49:26 +0100 |
| commit | 4e85f0762cc69af8efdb88ec857329ac955afe0b (patch) | |
| tree | 314cb4ed6da2d7507ae053d8073bf1a433c0705b /addons/web/static/src | |
| parent | a113e971fb6ee2cf7f4d927ecb7ca3cabef7e7d7 (diff) | |
[IMP] Connection: add utility method that bind() then login()
bzr revid: chs@openerp.com-20111117124926-y3z3osoq76va0kjy
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/core.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index 8d7bed56b5b..113b83f57dc 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -385,6 +385,13 @@ openerp.web.Connection = openerp.web.CallbackEnabled.extend( /** @lends openerp. this.do_load_qweb(['/web/webclient/qweb'], continuation); }, + connect: function(server, db, login, password, continuation) { + var self = this; + this.bind(server, function() { + self.login(db, login, password, continuation); + }); + }, + get_absolute_url: function(path) { var r_has_protocol = /^https?:\/\//, r_absolute_internal = /^\/[^\/]/; // starts with / (but not //) |
