[*] BO : HelpAccess helper

This commit is contained in:
fBrignoli
2012-01-05 10:54:42 +00:00
parent 103ff99fc7
commit f5716531fe
12 changed files with 179 additions and 132 deletions
+23 -25
View File
@@ -1,25 +1,23 @@
$(document).ready(function(){
if($('.help-context'))
{
$.ajax({
type: 'POST',
url: 'index.php',
data: {
'ajax' : '1',
'action' : 'helpAccess',
'item' : class_name,
'isoUser' : iso_user,
'country' : country_iso_code,
'version' : _PS_VERSION_
},
async : true,
success: function(msg) {
if(msg.status == 'ok' && msg.content != 'none')
{
$(".help-context").html(msg.content);
$(".help-context").fadeIn("slow").show();
}
}
});
}
});
function getHelpButton(label){
var button = '';
$.ajax({
type: 'POST',
url: 'index.php',
data: {
'ajax' : 1,
'action' : 'helpAccess',
'item' : label,
'isoUser' : iso_user,
'country' : country_iso_code,
'version' : _PS_VERSION_
},
dataType: "json",
async : false,
success: function(msg) {
if(msg.content != 'none' && msg.content != '')
button = msg.content;
}
});
return button;
}