summaryrefslogtreecommitdiff
path: root/addons/web_linkedin/static/src
diff options
context:
space:
mode:
authorJiten (OpenERP) <jra@tinyerp.com>2012-06-27 13:22:05 +0530
committerJiten (OpenERP) <jra@tinyerp.com>2012-06-27 13:22:05 +0530
commitea46eb264517fac17720f3a9a524c766e891ac1d (patch)
treed4caefc275a15478408eb507d4271eb3c1cc2f6d /addons/web_linkedin/static/src
parent112bc2ad6a33c73a83d50d7b7f5fe5e0b8e96792 (diff)
[IMP] Improved code.
bzr revid: jra@tinyerp.com-20120627075205-g8cgoev08w6ytw7s
Diffstat (limited to 'addons/web_linkedin/static/src')
-rw-r--r--addons/web_linkedin/static/src/js/linkedin.js15
-rw-r--r--addons/web_linkedin/static/src/xml/linkedin.xml40
2 files changed, 27 insertions, 28 deletions
diff --git a/addons/web_linkedin/static/src/js/linkedin.js b/addons/web_linkedin/static/src/js/linkedin.js
index a04f0c69737..3e5f9a95c13 100644
--- a/addons/web_linkedin/static/src/js/linkedin.js
+++ b/addons/web_linkedin/static/src/js/linkedin.js
@@ -152,23 +152,24 @@ openerp.web_linkedin = function(instance) {
APIKeyWarning: function(e) {
var self = this;
this.dialog = instance.web.dialog($(QWeb.render("Register.Linkedin")), {
- title: _t("Configure your Linkedin Key API"),
+ title: _t("Connect to LinkedIn"),
modal: true,
width : 840,
height:500,
- close: function(){ self.dialog.remove();}
+ close: function(){ self.dialog.remove();},
+ buttons:[
+ {
+ text: _t("Cancel"),
+ click: function() { self.dialog.remove(); }
+ }]
});
- this.dialog.parent().find('.ui-dialog-titlebar').append('<button class="close">No Thanks</button>').click(function(){
- self.dialog.remove();
- })
- $('.close').css({ 'margin': '10px 0 0 19px'})
$("#register").click(function() {
var key = $("#apikey").val();
if(key.length){
var user = new instance.web.DataSet(self, "res.users");
user.call("set_linkedin_api_key", [key]);
self.dialog.remove(),
- self.__parentedParent.reload();
+ //self.__parentedParent.reload();
}
else {
$("#apikey").css({'background-color':'#F66 '})
diff --git a/addons/web_linkedin/static/src/xml/linkedin.xml b/addons/web_linkedin/static/src/xml/linkedin.xml
index 7f008aa2e13..6b0795049be 100644
--- a/addons/web_linkedin/static/src/xml/linkedin.xml
+++ b/addons/web_linkedin/static/src/xml/linkedin.xml
@@ -34,27 +34,25 @@
<t t-name="Register.Linkedin" style="height:300px;overflow:auto;">
<div>
- <div>
- <p>1) Go to :
- <a href="https://www.linkedin.com/secure/developer" class="oe_secondary_menu_section" target="_blank">
- https://www.linkedin.com/secure/developer
- </a>
- </p>
- <p>2) Log you in Linkedin if you did not yet</p>
- <p>3) Add a New Application</p>
- <p>4) Fill in the Form</p>
- </div>
- <div>
- <img src='/web_linkedin/static/src/img/help_to_fill_form.png' height="500" width="800" border="1" style="margin-left:15px;"/>
- </div>
- <div>
- <p>5) Copy the API Key:
- <input type="text" id="apikey"/><button id="register" style="margin-left:10px; color:white;" class="btn_api" >Apply</button>
- </p>
- </div>
- <div>
- <img src='/web_linkedin/static/src/img/apikey.png' width="800" border="1" style="margin-left:15px;"/>
- </div>
+ <p style="color:grey;"> Connect OpneERP to LinkedIn to allow synchronizing companies and people with LinkedIn contacts in order to <br/>
+ get their data automatically (photos, address, news). You just need to setup the API key once, and it will work <br/>
+ for all users of your system.
+ </p>
+ <br/>
+ <br/>
+ <p>1) Go to :
+ <a href="https://www.linkedin.com/secure/developer" class="oe_secondary_menu_section" target="_blank">
+ https://www.linkedin.com/secure/developer
+ </a>
+ </p>
+ <p>2) Log into LinkedIn if not already done</p>
+ <p>3) Click on <b>"Add a new application"</b></p>
+ <p>4) Fill in the <b>"Application Info"</b> form with the following data:</p>
+ <p> - Integration URL: <b>"https://yourcompany.my.openerp.com"</b></p>
+ <p> - Javascript API domain: <b>"yourcompany.my.openerp.com"</b></p>
+ <p>5) Copy the API key here:
+ <input type="text" id="apikey"/><button id="register" style="margin-left:10px; color:white;" class="btn_api" >Apply</button>
+ </p>
</div>
</t>