summaryrefslogtreecommitdiff
path: root/addons/web_linkedin/static/src/js
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2014-04-11 15:38:13 +0200
committerThibault Delavallée <tde@openerp.com>2014-04-11 15:38:13 +0200
commitd04ee666ccb0c35bd1c13d9814fdb52f1159e7e9 (patch)
treefbb09260a719fc158b6f4087ac16fed36e332ae4 /addons/web_linkedin/static/src/js
parente53f66dcea9ff012682dcece8e29d179ebe7d339 (diff)
parent6b84615627dca50a3c07cf80d8da0ea9b2d28934 (diff)
[MERGE] Sync with trunk
bzr revid: tde@openerp.com-20140411133813-4rj4de6dlzna5g5s
Diffstat (limited to 'addons/web_linkedin/static/src/js')
-rw-r--r--addons/web_linkedin/static/src/js/linkedin.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/addons/web_linkedin/static/src/js/linkedin.js b/addons/web_linkedin/static/src/js/linkedin.js
index 5d8d7a29b1d..0d4ab7157fa 100644
--- a/addons/web_linkedin/static/src/js/linkedin.js
+++ b/addons/web_linkedin/static/src/js/linkedin.js
@@ -56,12 +56,12 @@ openerp.web_linkedin = function(instance) {
this.linkedin_def.reject();
this.auth_def.reject();
IN = false;
- instance.web.dialog($(QWeb.render("LinkedIn.DisabledWarning", {'error': error})), {
+ var dialog = new instance.web.Dialog(this, {
title: _t("LinkedIn is not enabled"),
buttons: [
- {text: _t("Ok"), click: function() { $(this).dialog("close"); }}
- ]
- });
+ {text: _t("Ok"), click: function() { this.parents('.modal').modal('hide'); }}
+ ],
+ }, QWeb.render('LinkedIn.DisabledWarning', {error: error})).open();
},
test_linkedin: function() {
var self = this;
@@ -369,11 +369,11 @@ openerp.web_linkedin = function(instance) {
},
bind_event: function() {
var self = this;
- this.$el.parent().on("click", ".oe_linkedin_logout", function () {
+ this.$el.parents('.modal').on("click", ".oe_linkedin_logout", function () {
IN.User.logout();
self.destroy();
});
- this.$search = this.$el.parent().find(".oe_linkedin_advanced_search" );
+ this.$search = this.$el.parents('.modal').find(".oe_linkedin_advanced_search" );
this.$url = this.$search.find("input[name='search']" );
this.$button = this.$search.find("button");
@@ -396,7 +396,7 @@ openerp.web_linkedin = function(instance) {
IN.API.Profile("me")
.fields(["firstName", "lastName"])
.result(function (result) {
- $(QWeb.render('LinkedIn.loginInformation', result.values[0])).appendTo(self.$el.parent().find(".ui-dialog-buttonpane"));
+ $(QWeb.render('LinkedIn.loginInformation', result.values[0])).appendTo(self.$el.parents('.modal').find(".oe_dialog_custom_buttons"));
})
},
do_search: function(url) {