[IMP] Improved API key warning.
bzr revid: vja@tinyerp.com-20120621134458-2vq2xsalq5hn7w8q
This commit is contained in:
parent
dd0a2cc66f
commit
b0826bf555
|
@ -6,7 +6,9 @@
|
|||
background-color: rgb(255, 255, 255);
|
||||
border: 1px solid rgb(153, 153, 153);
|
||||
}
|
||||
|
||||
#apikey{
|
||||
background-color: #D2D2FF
|
||||
}
|
||||
.li-ldn-dropdown {
|
||||
margin: 0px;
|
||||
display: block;
|
||||
|
|
|
@ -159,7 +159,7 @@ openerp.web_linkedin = function(instance) {
|
|||
},
|
||||
APIKeyWarning: function(e) {
|
||||
var self = this;
|
||||
instance.web.dialog($(QWeb.render("Register.Linkedin")), {
|
||||
this.dialog = instance.web.dialog($(QWeb.render("Register.Linkedin")), {
|
||||
title: _t("Configure your Linkedin Key API"),
|
||||
modal: true,
|
||||
width : 840,
|
||||
|
@ -168,13 +168,25 @@ 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();
|
||||
})
|
||||
$('.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){
|
||||
self.dialog.remove(),
|
||||
user.__parentedParent.view.reload();
|
||||
}
|
||||
else {
|
||||
$("#apikey").css({'background-color':'#F66 '})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
setTemplate: function( URL, AccountName ) {
|
||||
if(AccountName){
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
</div>
|
||||
<div>
|
||||
<p>Copy the API Key:
|
||||
<input type="text" id="apikey" /><button id="register" class="oe_form_button_save_dirty" onclick="">Apply</button>
|
||||
<input type="text" id="apikey"/><button id="register" class="oe_form_button_save_dirty" onclick="">Apply</button>
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
|
|
Loading…
Reference in New Issue