[IMP] Connection: add utility method that bind() then login()
bzr revid: chs@openerp.com-20111117124926-y3z3osoq76va0kjy
This commit is contained in:
parent
a113e971fb
commit
4e85f0762c
|
@ -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 //)
|
||||
|
|
Loading…
Reference in New Issue