summaryrefslogtreecommitdiff
path: root/addons/web_linkedin/static
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2012-08-08 10:38:59 +0200
committerniv-openerp <nicolas.vanhoren@openerp.com>2012-08-08 10:38:59 +0200
commitc2ed48a942dba9510405372ae558bc832e08b0ac (patch)
tree726b9489ab98d5ad573a9c89c0e40516f86d7ef9 /addons/web_linkedin/static
parentab05e368c5dac1974bcc73473bafafddcefa3c37 (diff)
Added wizard to fill api key
bzr revid: nicolas.vanhoren@openerp.com-20120808083859-p81dah14fy9r0rrx
Diffstat (limited to 'addons/web_linkedin/static')
-rw-r--r--addons/web_linkedin/static/src/js/linkedin.js15
-rw-r--r--addons/web_linkedin/static/src/xml/linkedin.xml23
2 files changed, 33 insertions, 5 deletions
diff --git a/addons/web_linkedin/static/src/js/linkedin.js b/addons/web_linkedin/static/src/js/linkedin.js
index 8e196434992..e199ae90841 100644
--- a/addons/web_linkedin/static/src/js/linkedin.js
+++ b/addons/web_linkedin/static/src/js/linkedin.js
@@ -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:
diff --git a/addons/web_linkedin/static/src/xml/linkedin.xml b/addons/web_linkedin/static/src/xml/linkedin.xml
index 3fa5509adfe..fbd95cb1e08 100644
--- a/addons/web_linkedin/static/src/xml/linkedin.xml
+++ b/addons/web_linkedin/static/src/xml/linkedin.xml
@@ -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> \ No newline at end of file