Added wizard to fill api key

bzr revid: nicolas.vanhoren@openerp.com-20120808083859-p81dah14fy9r0rrx
This commit is contained in:
niv-openerp
2012-08-08 10:38:59 +02:00
parent ab05e368c5
commit c2ed48a942
2 changed files with 33 additions and 5 deletions
+11 -4
View File
@@ -51,10 +51,6 @@ openerp.web_linkedin = function(instance) {
},
});
/*return new instance.web.Model("ir.config_parameter").call("set_param", ["web.linkedin.apikey", "cxnr0l53n73x"]).pipe(function() {
return self.test_linkedin();
});*/
instance.web_linkedin.tester = new instance.web_linkedin.LinkedinTester();
instance.web_linkedin.Linkedin = instance.web.form.FieldChar.extend({
@@ -275,6 +271,17 @@ openerp.web_linkedin = function(instance) {
init: function(parent, text) {
this._super(parent, {title:_t("LinkedIn API Key")});
},
start: function() {
this._super();
var self = this;
this.$("button").click(function() {
var value = self.$("input").val();
debugger;
return new instance.web.Model("ir.config_parameter").call("set_param", ["web.linkedin.apikey", value]).pipe(function() {
self.destroy();
});
});
},
});
};
// vim:et fdc=0 fdl=0:
@@ -31,7 +31,28 @@
</t>
<t t-name="LinkedIn.KeyWizard">
<div>
Yoh!
<p>
Connect OpenERP with LinkedIn to synchronize partners and customers with LinkedIn contacts and
get their data automatically (photos, address, news). You just need to setup the API key once, and it will work
for all users of your system.
</p>
<ul>
<li>Go to this URL:
<a href="https://www.linkedin.com/secure/developer" target="_blank">https://www.linkedin.com/secure/developer</a>.
</li>
<li>Log into LinkedIn.</li>
<li>Add New Application and fill the form,
<ul>
<li>JavaScript API Domain is Your domain name (e.g. https://yourcompany.my.openerp.com)</li>
<li>You can give multiple domain (e.g. yourcompany.my.openerp.com)</li>
<li>programming tools is Javascript</li>
</ul>
</li>
<li>Copy the API key here:
<input type="text"/>
<button>Apply</button>
</li>
</ul>
</div>
</t>
</templates>