//remove preactivationLink ajax and move in gamification module

This commit is contained in:
Vincent Augagneur
2013-11-14 10:54:29 +01:00
parent 63ef0b82e6
commit 9a0b308846
2 changed files with 1 additions and 33 deletions
+1 -13
View File
@@ -371,19 +371,7 @@ class AdminDashboardControllerCore extends AdminController
$return['widget_html'] = $module_obj->$hook($params);
die(Tools::jsonEncode($return));
}
public function ajaxProcessSavePreactivationRequest()
{
$isoUser = Context::getContext()->language->iso_code;
$isoCountry = Context::getContext()->country->iso_code;
$employee = new Employee((int)Context::getContext()->cookie->id_employee);
$firstname = $employee->firstname;
$lastname = $employee->lastname;
$email = $employee->email;
$return = @Tools::file_get_contents('http://api.prestashop.com/partner/premium/set_request.php?iso_country='.strtoupper($isoCountry).'&iso_lang='.strtolower($isoUser).'&host='.urlencode($_SERVER['HTTP_HOST']).'&ps_version='._PS_VERSION_.'&ps_creation='._PS_CREATION_DATE_.'&partner='.htmlentities(Tools::getValue('module')).'&shop='.urlencode(Configuration::get('PS_SHOP_NAME')).'&email='.urlencode($email).'&firstname='.urlencode($firstname).'&lastname='.urlencode($lastname).'&type=home');
die($return);
}
}
}
-20
View File
@@ -279,32 +279,12 @@ function saveDashConfig(widget_name) {
});
}
function preactivationLinkClick(module) {
$.ajax({
url : adminstats_ajax_url,
data : {
ajax : "1",
controller : "AdminDashboard",
action : "savePreactivationRequest",
module : module,
},
type: 'POST',
success : function(jsonData){
}
});
}
$(document).ready( function () {
$('#calendar_form input[type="submit"]').on('click', function(elt) {
elt.preventDefault();
setDashboardDateRange(elt.currentTarget.name);
});
$(".preactivationLink").on('click', function() {
preactivationLinkClick($(this).attr("rel"));
});
refreshDashboard(false, false);
getBlogRss();
bindSubmitDashConfig();