[IMP] Improved apikey wizard.

bzr revid: jra@tinyerp.com-20120622064601-oatb5npqwhh7r9j5
This commit is contained in:
Jiten (OpenERP) 2012-06-22 12:16:01 +05:30
parent b0826bf555
commit 2251aa0b78
2 changed files with 6 additions and 5 deletions

View File

@ -168,7 +168,7 @@ openerp.web_linkedin = function(instance) {
{
text: _t("Ok"),
click: function() { $(this).dialog("close"); }
}],
}]
});
this.dialog.parent().find('.ui-dialog-titlebar').append('<button class="close">No Thanks</button>').click(function(){
self.dialog.remove();
@ -176,14 +176,15 @@ openerp.web_linkedin = function(instance) {
$('.close').css({ 'margin': '10px 0 0 19px'})
$("#register").click(function() {
var key = $("#apikey").val();
var user = new instance.web.DataSet(self, "res.users");
user.call("set_linkedin_api_key", [key]);
if(key.length){
var user = new instance.web.DataSet(self, "res.users");
user.call("set_linkedin_api_key", [key]);
self.dialog.remove(),
user.__parentedParent.view.reload();
}
else {
$("#apikey").css({'background-color':'#F66 '})
self.notification.warn(_t("Linkedin Search"), _t("Please Enter Required Key."));
}
})

View File

@ -12,8 +12,8 @@
<div id="imagediv" name="search1">
<span style="display:inline;">
<a href="#">
<img id="linkedinrecord" class="linkedin_icon" src="/web_linkedin/static/src/img/Linkedin_blue.png" width="24" height="24" alt="Search on LinkedIn"/>
<img id="linkedindefault" class="linkedin_icon" src="/web_linkedin/static/src/img/Linkedin_grey.png" width="24" height="24" alt="Search on LinkedIn"/>
<img id="linkedinrecord" class="linkedin_icon" src="/web_linkedin/static/src/img/Linkedin_blue.png" width="45" alt="Search on LinkedIn"/>
<img id="linkedindefault" class="linkedin_icon" src="/web_linkedin/static/src/img/Linkedin_grey.png" width="45" alt="Search on LinkedIn"/>
</a>
<img id="loader" class="loading" src="/web_linkedin/static/src/img/loading.png" width="24" height="24"/>
</span>