// Clean ajax.php

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16081 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2012-06-19 13:20:07 +00:00
parent 8a5ee83850
commit 2efce57799
3 changed files with 46 additions and 36 deletions
+6 -6
View File
@@ -39,11 +39,11 @@ $(document).ready(function(){
});
$.ajax({
type: 'GET',
url: 'ajax.php',
url: 'index.php',
async: false,
cache: false,
dataType : "json",
data: 'ajax=true&saveImportMatchs&skip='+$('input[name=skip]').attr('value')+'&newImportMatchs='+newImportMatchs+matchFields,
data: 'ajax=1&action=saveImportMatchs&skip='+$('input[name=skip]').attr('value')+'&newImportMatchs='+newImportMatchs+matchFields+'&tab=AdminImport&token='+token,
success: function(jsonData)
{
$('#valueImportMatchs').append('<option id="'+jsonData.id+'" value="'+matchFields+'" selected="selected">'+newImportMatchs+'</option>');
@@ -64,11 +64,11 @@ $(document).ready(function(){
var idToLoad = $('select#valueImportMatchs option:selected').attr('id');
$.ajax({
type: 'GET',
url: 'ajax.php',
url: 'index.php',
async: false,
cache: false,
dataType : "json",
data: 'ajax=true&loadImportMatchs&idImportMatchs='+idToLoad,
data: 'ajax=1&action=loadImportMatchs&idImportMatchs='+idToLoad+'&tab=AdminImport&token='+token,
success: function(jsonData)
{
var matchs = jsonData.matchs.split('|')
@@ -89,11 +89,11 @@ $(document).ready(function(){
var idToDelete = $('select#valueImportMatchs option:selected').attr('id');
$.ajax({
type: 'GET',
url: 'ajax.php',
url: 'index.php',
async: false,
cache: false,
dataType : "json",
data: 'ajax=true&deleteImportMatchs&idImportMatchs='+idToDelete,
data: 'ajax=1&action=deleteImportMatchs&idImportMatchs='+idToDelete+'&tab=AdminImport&token='+token,
success: function(jsonData)
{
$('select#valueImportMatchs option[id=\''+idToDelete+'\']').remove();