summaryrefslogtreecommitdiff
path: root/addons/auth_openid/static/src/js/auth_openid.js
diff options
context:
space:
mode:
authorAtul Patel (OpenERP) <atp@tinyerp.com>2012-08-16 10:50:21 +0530
committerAtul Patel (OpenERP) <atp@tinyerp.com>2012-08-16 10:50:21 +0530
commit22a810507cc6b4e48a067b6baaf9869d72e5a38e (patch)
tree1808e0671b83dec971ae431b6ab1f09cfbfb44e8 /addons/auth_openid/static/src/js/auth_openid.js
parent1d2168a02ebeeb7441c9171bd9dcda8226d29cdc (diff)
parentf4f7de136921528f4b465629ff756b367ee0bba7 (diff)
[MERGE]: Merged with lp:openobject-addons
bzr revid: atp@tinyerp.com-20120816052021-igdj7knaimwg9x7z
Diffstat (limited to 'addons/auth_openid/static/src/js/auth_openid.js')
-rw-r--r--addons/auth_openid/static/src/js/auth_openid.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/addons/auth_openid/static/src/js/auth_openid.js b/addons/auth_openid/static/src/js/auth_openid.js
index fd6ec01cc0f..1417bc471ce 100644
--- a/addons/auth_openid/static/src/js/auth_openid.js
+++ b/addons/auth_openid/static/src/js/auth_openid.js
@@ -8,7 +8,7 @@ instance.web.Login = instance.web.Login.extend({
this._super.apply(this, arguments);
var self = this;
- this._default_error_message = this.$element.find('.login_error_message').text();
+ this._default_error_message = this.$element.find('.oe_login_error_message').text();
this.$openid_selected_button = $();
this.$openid_selected_input = $();
@@ -40,8 +40,7 @@ instance.web.Login = instance.web.Login.extend({
}
});
- this._check_fragment();
-
+ this._check_error();
},
@@ -67,11 +66,9 @@ instance.web.Login = instance.web.Login.extend({
},
- _check_fragment: function() {
+ _check_error: function() {
var self = this;
- var fragment = jQuery.deparam.fragment();
- console.log(fragment);
- if (fragment.loginerror !== undefined) {
+ if (this.params.loginerror !== undefined) {
this.rpc('/auth_openid/login/status', {}, function(result) {
if (_.contains(['success', 'failure'], result.status) && result.message) {
self.do_warn('Invalid OpenID Login', result.message);
@@ -132,11 +129,12 @@ instance.web.Login = instance.web.Login.extend({
do_warn: function(title, msg) {
//console.warn(title, msg);
- this.$element.find('.login_error_message').text(msg).show();
+ this.$element.find('.oe_login_error_message').text(msg).show();
+ this._super(title, msg);
},
reset_error_message: function() {
- this.$element.find('.login_error_message').text(this._default_error_message);
+ this.$element.find('.oe_login_error_message').text(this._default_error_message);
}
});