diff options
| author | Thibault Delavallée <tde@openerp.com> | 2014-04-11 15:40:52 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2014-04-11 15:40:52 +0200 |
| commit | e51049e8edcf34bfbbdf060145acffc82dc18a62 (patch) | |
| tree | b58244aa2b6ce7804c28d8f0b5ad3eba49cccbb8 /addons/web_linkedin/static/src | |
| parent | cd4afee17e77d5d5de8dc27f7dbe56be6d8fe7a2 (diff) | |
| parent | d04ee666ccb0c35bd1c13d9814fdb52f1159e7e9 (diff) | |
[MERGE] Sync with upstream
bzr revid: tde@openerp.com-20140411134052-x74otuwuxoz20qab
Diffstat (limited to 'addons/web_linkedin/static/src')
| -rw-r--r-- | addons/web_linkedin/static/src/js/linkedin.js | 14 |
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) { |
