summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2012-08-22 10:27:01 +0200
committerniv-openerp <nicolas.vanhoren@openerp.com>2012-08-22 10:27:01 +0200
commitcd0b2b10e57b9510115f381d1afc3d34d7fa6c11 (patch)
treec3af30c3dd412242955f9551678fbe5dd24ee321
parent0149301e0a906be6fb108fa8ec045eddd9d9bd4b (diff)
[IMP] web_linkedin: added headline
bzr revid: nicolas.vanhoren@openerp.com-20120822082701-uohx12i2jhdao39r
-rw-r--r--addons/web_linkedin/static/src/css/linkedin.css11
-rw-r--r--addons/web_linkedin/static/src/js/linkedin.js14
-rw-r--r--addons/web_linkedin/static/src/xml/linkedin.xml1
3 files changed, 19 insertions, 7 deletions
diff --git a/addons/web_linkedin/static/src/css/linkedin.css b/addons/web_linkedin/static/src/css/linkedin.css
index 16eea9f04d5..992dc48aeb8 100644
--- a/addons/web_linkedin/static/src/css/linkedin.css
+++ b/addons/web_linkedin/static/src/css/linkedin.css
@@ -32,4 +32,13 @@
.openerp .oe_linkedin_entity img {
max-width: 70px;
max-height: 70px;
-} \ No newline at end of file
+}
+
+.openerp .oe_linkedin_entity h3 {
+ margin-bottom: 5px;
+}
+
+.openerp .oe_linkedin_entity .oe_linkedin_entity_headline {
+ color: grey;
+ margin-bottom: 10px;
+}
diff --git a/addons/web_linkedin/static/src/js/linkedin.js b/addons/web_linkedin/static/src/js/linkedin.js
index 5bcb03aab33..8fcc17ba41e 100644
--- a/addons/web_linkedin/static/src/js/linkedin.js
+++ b/addons/web_linkedin/static/src/js/linkedin.js
@@ -102,11 +102,11 @@ openerp.web_linkedin = function(instance) {
if (entity.__type === "company") {
to_change.is_company = true;
to_change.name = entity.name;
- to_change.photo = false;
+ to_change.image = false;
if (entity.logoUrl) {
defs.push(self.rpc('/web_linkedin/binary/url2binary',
{'url': entity.logoUrl}).pipe(function(data){
- to_change.photo = data;
+ to_change.image = data;
}));
}
to_change.website = entity.websiteUrl;
@@ -138,11 +138,11 @@ openerp.web_linkedin = function(instance) {
} else { // people
to_change.is_company = false;
to_change.name = entity.formattedName;
- to_change.photo = false;
+ to_change.image = false;
if (entity.pictureUrl) {
defs.push(self.rpc('/web_linkedin/binary/url2binary',
{'url': entity.pictureUrl}).pipe(function(data){
- to_change.photo = data;
+ to_change.image = data;
}));
}
to_change.mobile = false;
@@ -154,7 +154,8 @@ openerp.web_linkedin = function(instance) {
to_change.phone = el.phoneNumber;
}
});
- to_change.function = entity.headline;
+ var positions = entity.positions.values || [];
+ to_change.function = positions ? positions[0].title : false;
/* TODO
to_change.linkedinUrl = entity.publicProfileUrl;
*/
@@ -169,7 +170,7 @@ openerp.web_linkedin = function(instance) {
var commonPeopleFields = ["id", "picture-url", "public-profile-url",
"formatted-name", "location", "phone-numbers", "im-accounts",
- "main-address", "headline"];
+ "main-address", "headline", "positions"];
instance.web_linkedin.LinkedinPopup = instance.web.Dialog.extend({
template: "Linkedin.popup",
@@ -261,6 +262,7 @@ openerp.web_linkedin = function(instance) {
} else { // people
this.$("h3").text(this.data.formattedName);
self.$("img").attr("src", this.data.pictureUrl);
+ self.$(".oe_linkedin_entity_headline").text(this.data.headline);
}
},
});
diff --git a/addons/web_linkedin/static/src/xml/linkedin.xml b/addons/web_linkedin/static/src/xml/linkedin.xml
index f114fa53803..998918a174c 100644
--- a/addons/web_linkedin/static/src/xml/linkedin.xml
+++ b/addons/web_linkedin/static/src/xml/linkedin.xml
@@ -21,6 +21,7 @@
</span>
</span>
<h3/>
+ <div class="oe_linkedin_entity_headline" />
</div>
</t>
<t t-name="LinkedIn.DisabledWarning">