[-] BO : AdminModule shows when connected to Addons and have a logout button
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13731 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
var dirNameCurrentIndex = '{$dirNameCurrentIndex}';
|
||||
var ajaxCurrentIndex = '{$ajaxCurrentIndex}';
|
||||
var by = '{l s='by'}';
|
||||
var errorLogin = '{l s='Could not login to Addons'}';
|
||||
var errorLogin = '{l s='Could not login to Addons, please check your credentials and your internet connection.'}';
|
||||
var confirmPreferencesSaved = '{l s='Preferences saved'}';
|
||||
{if isset($smarty.get.anchor)}var anchor = '{$smarty.get.anchor|htmlentities|replace:'(':''|replace:')':''|replace:'{':''|replace:'}':''|replace:'\'':''|replace:'/':''}';{else}var anchor = '';{/if}
|
||||
|
||||
@@ -233,6 +233,47 @@
|
||||
});
|
||||
|
||||
|
||||
// Method to log out PrestaShop Addons WebServices
|
||||
$('#addons_logout_button').click(function()
|
||||
{
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url : ajaxCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "logOutAddonsWebservices"
|
||||
},
|
||||
beforeSend: function(xhr)
|
||||
{
|
||||
$('#addons_loading').html('<img src="../img/loader.gif" border="0">');
|
||||
},
|
||||
success : function(data)
|
||||
{
|
||||
// res.status = cache or refresh
|
||||
if (data == 'OK')
|
||||
{
|
||||
$('#addons_loading').html('');
|
||||
$('#addons_login_div').fadeOut();
|
||||
window.location.href = window.location.href;
|
||||
}
|
||||
else
|
||||
$('#addons_loading').html(errorLogin);
|
||||
},
|
||||
error: function(res,textStatus,jqXHR)
|
||||
{
|
||||
//jAlert("TECHNICAL ERROR"+res);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e){}
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
// Method to set filter on modules
|
||||
function setFilter()
|
||||
|
||||
Reference in New Issue
Block a user