[IMP] web_linkedin: url with linkedin image on bottom of website
bzr revid: chm@openerp.com-20130205105915-zikvtunnjv8ao4s2
This commit is contained in:
commit
e3c9860e48
|
@ -360,7 +360,7 @@ Andrew</field>
|
||||||
<field name="type_id" ref="type_lead5"/>
|
<field name="type_id" ref="type_lead5"/>
|
||||||
<field name="categ_ids" eval="[(6, 0, [categ_oppor5])]"/>
|
<field name="categ_ids" eval="[(6, 0, [categ_oppor5])]"/>
|
||||||
<field name="priority">2</field>
|
<field name="priority">2</field>
|
||||||
<field eval="time.strftime('%Y-%m-30')" name="date_deadline"/>
|
<field eval="time.strftime('%Y-%m-28')" name="date_deadline"/>
|
||||||
<field eval="time.strftime('%Y-%m-1')" name="date_action"/>
|
<field eval="time.strftime('%Y-%m-1')" name="date_action"/>
|
||||||
<field name="title_action">Convert to quote</field>
|
<field name="title_action">Convert to quote</field>
|
||||||
<field name="section_id" ref="crm_case_section_1"/>
|
<field name="section_id" ref="crm_case_section_1"/>
|
||||||
|
|
|
@ -1,18 +1,12 @@
|
||||||
|
|
||||||
|
|
||||||
.openerp .oe_linkedin_form_img {
|
.openerp .oe_linkedin_img {
|
||||||
float: right;
|
float: right;
|
||||||
width: 1.5em;
|
width: 1.5em;
|
||||||
margin-top: -1px;
|
margin-top: -1px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openerp .oe_linkedin_img {
|
|
||||||
width: 1em;
|
|
||||||
margin-top: -2px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.openerp .oe_linkedin_input {
|
.openerp .oe_linkedin_input {
|
||||||
margin-right:1.5em;
|
margin-right:1.5em;
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
|
@ -148,24 +148,13 @@ openerp.web_linkedin = function(instance) {
|
||||||
this.display_dm = new instance.web.DropMisordered(true);
|
this.display_dm = new instance.web.DropMisordered(true);
|
||||||
},
|
},
|
||||||
initialize_content: function() {
|
initialize_content: function() {
|
||||||
var $ht = $(QWeb.render("FieldChar.linkedin.form"));
|
var $ht = $(QWeb.render("FieldChar.linkedin"));
|
||||||
var $in = this.$("input");
|
var $in = this.$("input");
|
||||||
$in.replaceWith($ht);
|
$in.replaceWith($ht);
|
||||||
this.$(".oe_linkedin_input").append($in);
|
this.$(".oe_linkedin_input").append($in);
|
||||||
this.$(".oe_linkedin_form_img").click(_.bind(this.search_linkedin, this));
|
this.$(".oe_linkedin_form_img").click(_.bind(this.search_linkedin, this));
|
||||||
|
|
||||||
var $ht = $(QWeb.render("FieldChar.linkedin"));
|
|
||||||
var $span = this.$("span");
|
|
||||||
$span.replaceWith($ht);
|
|
||||||
this.$(".oe_linkedin_span").replaceWith($span);
|
|
||||||
|
|
||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
render_value: function() {
|
|
||||||
var result = this._super();
|
|
||||||
this.$(".oe_linkedin_url").attr("href", this.field_manager.datarecord.linkedin_url || "#").toggle(!!this.field_manager.datarecord.linkedin_url);
|
|
||||||
return result;
|
|
||||||
},
|
|
||||||
search_linkedin: function() {
|
search_linkedin: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.display_dm.add(instance.web_linkedin.tester.test_linkedin()).done(function() {
|
this.display_dm.add(instance.web_linkedin.tester.test_linkedin()).done(function() {
|
||||||
|
@ -342,9 +331,21 @@ openerp.web_linkedin = function(instance) {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
instance.web.form.widgets.add('linkedin', 'instance.web_linkedin.Linkedin');
|
instance.web.form.widgets.add('linkedin', 'instance.web_linkedin.Linkedin');
|
||||||
|
|
||||||
|
instance.web_linkedin.Linkedin_url = instance.web.form.FieldChar.extend({
|
||||||
|
initialize_content: function() {
|
||||||
|
this.$("input,span").replaceWith($(QWeb.render("FieldChar.linkedin_url")));
|
||||||
|
this._super();
|
||||||
|
},
|
||||||
|
render_value: function() {
|
||||||
|
this._super();
|
||||||
|
this.$(".oe_linkedin_url").attr("href", this.field_manager.datarecord.linkedin_url || "#").toggle(!!this.field_manager.datarecord.linkedin_url);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
instance.web.form.widgets.add('linkedin_url', 'instance.web_linkedin.Linkedin_url');
|
||||||
|
|
||||||
|
|
||||||
var commonPeopleFields = ["id", "picture-url", "public-profile-url", "first-name", "last-name",
|
var commonPeopleFields = ["id", "picture-url", "public-profile-url", "first-name", "last-name",
|
||||||
"formatted-name", "location", "phone-numbers", "im-accounts",
|
"formatted-name", "location", "phone-numbers", "im-accounts",
|
||||||
"main-address", "headline", "positions", "summary", "specialties"];
|
"main-address", "headline", "positions", "summary", "specialties"];
|
||||||
|
|
|
@ -2,13 +2,12 @@
|
||||||
<!-- vim:fdl=1:
|
<!-- vim:fdl=1:
|
||||||
-->
|
-->
|
||||||
<templates xml:space="preserve">
|
<templates xml:space="preserve">
|
||||||
<t t-name="FieldChar.linkedin.form">
|
<t t-name="FieldChar.linkedin">
|
||||||
<img class="oe_linkedin_form_img" t-att-src='_s + "/web_linkedin/static/src/img/Linkedin_blue.png"'/>
|
<img class="oe_linkedin_img" t-att-src='_s + "/web_linkedin/static/src/img/Linkedin_blue.png"'/>
|
||||||
<div class="oe_linkedin_input"/>
|
<div class="oe_linkedin_input"/>
|
||||||
</t>
|
</t>
|
||||||
<t t-name="FieldChar.linkedin">
|
<t t-name="FieldChar.linkedin_url">
|
||||||
<div class="oe_linkedin_span"/>
|
<a class="oe_linkedin_url" href="#" target="_blank"><img t-att-src='_s + "/web_linkedin/static/src/img/linkedin-profile.jpeg"'/></a>
|
||||||
<a class="oe_linkedin_url" href="#" target="_blank"><img class="oe_linkedin_img" t-att-src='_s + "/web_linkedin/static/src/img/Linkedin_blue.png"'/></a>
|
|
||||||
</t>
|
</t>
|
||||||
<t t-name="Linkedin.popup">
|
<t t-name="Linkedin.popup">
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -11,6 +11,10 @@
|
||||||
<field name="linkedin_url" invisible="1"/>
|
<field name="linkedin_url" invisible="1"/>
|
||||||
<field name="name" default_focus="1" nolabel="1" widget="linkedin" />
|
<field name="name" default_focus="1" nolabel="1" widget="linkedin" />
|
||||||
</field>
|
</field>
|
||||||
|
<field name="website" position="after">
|
||||||
|
<field name="linkedin_id" invisible="1"/>
|
||||||
|
<field name="linkedin_url" nolabel="1" widget="linkedin_url"/>
|
||||||
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue