[IMP] Improved code.
bzr revid: pan@tinyerp.com-20120619101630-w1sufff8c38egvjl
This commit is contained in:
parent
79a911301c
commit
cc659ea355
|
@ -48,5 +48,10 @@ class base_config_settings(osv.osv_memory):
|
|||
company_id = company_obj._company_default_get(cr, uid, 'res.users', context=context)
|
||||
company_obj.write(cr, uid, [company_id], {'default_linkedin_api_key': data.default_linkedin_api_key}, context=context)
|
||||
|
||||
|
||||
|
||||
|
||||
base_config_settings()
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -107,11 +107,12 @@ openerp.web_linkedin = function(instance) {
|
|||
}
|
||||
},
|
||||
APIKeyWarning: function(e) {
|
||||
var self = this;
|
||||
e.message="";
|
||||
instance.web.dialog($(QWeb.render("Register.Linkedin", _t(e))), {
|
||||
title: _t("Configure your Linkedin Key API"),
|
||||
modal: true,
|
||||
width : 800,
|
||||
width : 840,
|
||||
height:500,
|
||||
buttons:[
|
||||
{
|
||||
|
@ -124,10 +125,18 @@ openerp.web_linkedin = function(instance) {
|
|||
]
|
||||
|
||||
});
|
||||
$("#register").click(function()
|
||||
{
|
||||
$("#register").click(function() {
|
||||
|
||||
var linkkey = $("#apikey").val();
|
||||
console.log("the key is ",linkkey);
|
||||
|
||||
var key = JSON.stringify(linkkey);
|
||||
|
||||
|
||||
self.rpc('/web_linkedin/database/api_key',{'key': key},function(data){
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -51,7 +51,8 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<li> Copy the API Key <input type="text" id="apikey" /><button id="register" class="oe_form_button_save_dirty">Apply</button></li>
|
||||
Copy the API Key <input type="text" id="apikey" /><button id="register" class="oe_form_button_save_dirty" onclick="">Apply</button>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -23,6 +23,7 @@ import urllib2
|
|||
import xmlrpclib
|
||||
import zlib
|
||||
|
||||
|
||||
from web import common
|
||||
openerpweb = common.http
|
||||
|
||||
|
@ -69,4 +70,11 @@ class Binary(openerpweb.Controller):
|
|||
bfile = urllib2.urlopen(url)
|
||||
return base64.b64encode(bfile.read())
|
||||
|
||||
class Database(openerpweb.Controller):
|
||||
_cp_path = "/web_linkedin/database"
|
||||
|
||||
@openerpweb.jsonrequest
|
||||
def api_key(self, req, key):
|
||||
|
||||
return True
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
Loading…
Reference in New Issue