[IMP] Improved api key pop up warning.

bzr revid: jra@tinyerp.com-20120619114514-2r72ppz7pwwym70h
This commit is contained in:
Jiten (OpenERP) 2012-06-19 17:15:14 +05:30
parent 45cce3533b
commit 48fe78fc28
5 changed files with 26 additions and 35 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

@ -128,9 +128,8 @@ openerp.web_linkedin = function(instance) {
}]
});
$("#register").click(function() {
var linkkey = $("#apikey").val();
var key = JSON.stringify(linkkey);
self.rpc('/web_linkedin/database/api_key',{'key': key},function(data){
var key = JSON.stringify($("#apikey").val());
self.rpc('/web_linkedin/webclient/api_key',{'key': key},function(data){
});
});
},

View File

@ -34,35 +34,27 @@
<t t-name="Register.Linkedin" style="height:300px;overflow:auto;">
<div>
<table>
<tr>
<td>
<ol>
<li>Go to...<a href="https://www.linkedin.com/secure/developer" class="oe_secondary_menu_section" target="#">https://www.linkedin.com/secure/developer</a></li>
<li>Log you in Linkedin if you did not yet</li>
<li>Add a new Application</li>
<li>Fill in the form</li>
</ol>
</td>
</tr>
<tr>
<td>
<div>
<p>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>Log you in Linkedin if you did not yet</p>
<p>Add a new Application</p>
<p>Fill in the form</p>
</div>
<div>
<img src='/web_linkedin/static/src/img/help_to_fill_form.png' height="500" width="800" border="2"/>
</td>
</tr>
<tr>
<td >
Copy the API Key <input type="text" id="apikey" /><button id="register" class="oe_form_button_save_dirty" onclick="">Apply</button>
</td>
</tr>
<tr>
<td>
</div>
<div>
<p>Copy the API Key:
<input type="text" id="apikey" /><button id="register" class="oe_form_button_save_dirty" onclick="">Apply</button>
</p>
</div>
<div>
<img src='/web_linkedin/static/src/img/apikey.png' height="300" width="500" border="2"/>
</td>
</tr>
</table>
</div>
</div>
</t>

View File

@ -70,11 +70,11 @@ class Binary(openerpweb.Controller):
bfile = urllib2.urlopen(url)
return base64.b64encode(bfile.read())
class Database(openerpweb.Controller):
_cp_path = "/web_linkedin/database"
class WebClient(openerpweb.Controller):
_cp_path = "/web_linkedin/webclient"
@openerpweb.jsonrequest
def api_key(self, req, key):
return True
def api_key(self, req, key):
return False
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: