summaryrefslogtreecommitdiff
path: root/addons/web_linkedin/static/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_linkedin/static/src/js')
-rw-r--r--addons/web_linkedin/static/src/js/linkedin.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/addons/web_linkedin/static/src/js/linkedin.js b/addons/web_linkedin/static/src/js/linkedin.js
index 863e51e913f..ec58c3736f4 100644
--- a/addons/web_linkedin/static/src/js/linkedin.js
+++ b/addons/web_linkedin/static/src/js/linkedin.js
@@ -14,7 +14,7 @@ openerp.web_linkedin = function(instance) {
},
test_linkedin: function() {
var self = this;
- return this.test_api_key().pipe(function() {
+ return this.test_api_key().then(function() {
if (self.linkedin_added)
return self.linkedin_def.promise();
var tag = document.createElement('script');
@@ -37,7 +37,7 @@ openerp.web_linkedin = function(instance) {
if (this.api_key) {
return $.when();
}
- return new instance.web.Model("ir.config_parameter").call("get_param", ["web.linkedin.apikey"]).pipe(function(a) {
+ return new instance.web.Model("ir.config_parameter").call("get_param", ["web.linkedin.apikey"]).then(function(a) {
if (!!a) {
self.api_key = a;
return true;
@@ -69,13 +69,13 @@ openerp.web_linkedin = function(instance) {
},
search_linkedin: function() {
var self = this;
- this.display_dm.add(instance.web_linkedin.tester.test_linkedin()).then(function() {
+ this.display_dm.add(instance.web_linkedin.tester.test_linkedin()).done(function() {
var pop = new instance.web_linkedin.LinkedinPopup(self, self.get("value"));
pop.open();
pop.on("selected", this, function(entity) {
self.selected_entity(entity);
});
- }, _.bind(this.linkedin_disabled, this));
+ }).fail(_.bind(this.linkedin_disabled, this));
},
linkedin_disabled: function() {
instance.web.dialog($(QWeb.render("LinkedIn.DisabledWarning")), {
@@ -87,7 +87,7 @@ openerp.web_linkedin = function(instance) {
},
selected_entity: function(entity) {
var self = this;
- this.create_on_change(entity).then(function(to_change) {
+ this.create_on_change(entity).done(function(to_change) {
self.view.set_values(to_change);
});
},
@@ -101,7 +101,7 @@ openerp.web_linkedin = function(instance) {
to_change.image = false;
if (entity.logoUrl) {
defs.push(self.rpc('/web_linkedin/binary/url2binary',
- {'url': entity.logoUrl}).pipe(function(data){
+ {'url': entity.logoUrl}).then(function(data){
to_change.image = data;
}));
}
@@ -120,7 +120,7 @@ openerp.web_linkedin = function(instance) {
}).error(function() {
children_def.reject();
});
- defs.push(children_def.pipe(function(result) {
+ defs.push(children_def.then(function(result) {
result = _.reject(result.people.values || [], function(el) {
return ! el.formattedName;
});
@@ -128,7 +128,7 @@ openerp.web_linkedin = function(instance) {
el.__type = "people";
return self.create_on_change(el);
});
- return $.when.apply($, defs).pipe(function() {
+ return $.when.apply($, defs).then(function() {
var p_to_change = _.toArray(arguments);
to_change.child_ids = p_to_change;
});
@@ -144,7 +144,7 @@ openerp.web_linkedin = function(instance) {
to_change.image = false;
if (entity.pictureUrl) {
defs.push(self.rpc('/web_linkedin/binary/url2binary',
- {'url': entity.pictureUrl}).pipe(function(data){
+ {'url': entity.pictureUrl}).then(function(data){
to_change.image = data;
}));
}
@@ -163,7 +163,7 @@ openerp.web_linkedin = function(instance) {
to_change.linkedinUrl = entity.publicProfileUrl;
*/
}
- return $.when.apply($, defs).pipe(function() {
+ return $.when.apply($, defs).then(function() {
return to_change;
});
},
@@ -186,7 +186,7 @@ openerp.web_linkedin = function(instance) {
this._super();
var self = this;
this.on("authentified", this, this.authentified);
- instance.web_linkedin.tester.test_authentication().then(function() {
+ instance.web_linkedin.tester.test_authentication().done(function() {
self.trigger("authentified");
});
},
@@ -200,7 +200,7 @@ openerp.web_linkedin = function(instance) {
encodeURI(this.text), this.limit)).result(function (result) {
cdef.resolve(result);
});
- var def = cdef.pipe(function(companies) {
+ var def = cdef.then(function(companies) {
var lst = companies.companies.values || [];
lst = _.first(lst, self.limit);
lst = _.map(lst, function(el) {
@@ -214,7 +214,7 @@ openerp.web_linkedin = function(instance) {
params({"keywords": this.text, "count": this.limit}).result(function(result) {
pdef.resolve(result);
});
- var def2 = pdef.pipe(function(people) {
+ var def2 = pdef.then(function(people) {
var plst = people.people.values || [];
plst = _.first(plst, self.limit);
plst = _.map(plst, function(el) {