// Added addlashes for some js messages

This commit is contained in:
Damien Metzger committed 2013-06-26 15:52:40 +02:00
1 parent 19ee2c953f
commit 7427efdb6f
6 files changed
+9 -13

No files matched your search

@@ -106,10 +106,9 @@
if ($(this).attr('name') == 'category_reduction['+$('[name="id_category"]:checked').val()+']') if ($(this).attr('name') == 'category_reduction['+$('[name="id_category"]:checked').val()+']')
{ {
exist = true; exist = true;
jAlert('{l s='This category already exists for this group.'}'); jAlert('{l s='This category already exists for this group.' js='1'}');
return false; return false;
} }
}); });
if (exist) if (exist)
@@ -127,8 +126,7 @@
category_reduction: $('#category_reduction_fancybox').val() , category_reduction: $('#category_reduction_fancybox').val() ,
id_category: $('[name="id_category"]:checked').val() id_category: $('[name="id_category"]:checked').val()
}, },
success : function(jsonData) success : function(jsonData) {
{
if (jsonData.hasError) if (jsonData.hasError)
{ {
var errors = ''; var errors = '';
@@ -50,14 +50,14 @@
console.log(truncateAuthorized); console.log(truncateAuthorized);
if (truncateAuthorized) if (truncateAuthorized)
{ {
if (!confirm('{l s='Are you sure that you would like to delete this' js=1}' + ' ' + $.trim($('#entity > option:selected').text().toLowerCase()) + '{l s='?' js=1}')) if (!confirm('{l s='Are you sure that you would like to delete this' js=1}' + ' ' + $.trim($('#entity > option:selected').text().toLowerCase()) + '?'))
{ {
e.preventDefault(); e.preventDefault();
} }
} }
else else
{ {
jAlert('{l s='You do not have permission to delete here. When the multistore is enabled, only a SuperAdmin can delete all items before an import.'}'); jAlert('{l s='You do not have permission to delete here. When the multistore is enabled, only a SuperAdmin can delete all items before an import.' js='1'}');
return false; return false;
} }
} }
@@ -90,7 +90,7 @@
var table = $('#selectTables select').val(); var table = $('#selectTables select').val();
if (!table) if (!table)
jAlert("{l s='Please choose a table.'}"); jAlert("{l s='Please choose a table.' js='1'}");
else else
AddRequestSql(table); AddRequestSql(table);
}); });
@@ -24,7 +24,7 @@
*} *}
<a href="{$href}" class="delete" <a href="{$href}" class="delete"
{if in_array($id_shop, $shops_having_dependencies)} {if in_array($id_shop, $shops_having_dependencies)}
onclick="jAlert('{l s='You cannot delete this shop\'s (customer and/or order dependency)'}'); return false;" onclick="jAlert('{l s='You cannot delete this shop\'s (customer and/or order dependency)' js='1'}'); return false;"
{elseif isset($confirm)} {elseif isset($confirm)}
onclick="if (confirm('{$confirm}')){ return true; } else { event.stopPropagation(); event.preventDefault();};" onclick="if (confirm('{$confirm}')){ return true; } else { event.stopPropagation(); event.preventDefault();};"
{/if} title="{$action}"> {/if} title="{$action}">
@@ -138,7 +138,7 @@
// check if it's possible to add the product // check if it's possible to add the product
if (product_infos == null || $('#cur_product_name').val() == '') if (product_infos == null || $('#cur_product_name').val() == '')
{ {
jAlert('{l s='Please select at least one product.'}'); jAlert('{l s='Please select at least one product.' js='1'}');
return false; return false;
} }
+2 -4
View File
@@ -470,8 +470,7 @@ function init()
cache: false, cache: false,
dataType: 'json', dataType: 'json',
data : query, data : query,
success : function(data) success : function(data) {
{
if (data.result) if (data.result)
{ {
go = false; go = false;
@@ -491,8 +490,7 @@ function init()
else else
jAlert(data.error); jAlert(data.error);
}, },
error : function(XMLHttpRequest, textStatus, errorThrown) error : function(XMLHttpRequest, textStatus, errorThrown) {
{
jAlert("Impossible to add the product to the cart.\n\ntextStatus: '" + textStatus + "'\nerrorThrown: '" + errorThrown + "'\nresponseText:\n" + XMLHttpRequest.responseText); jAlert("Impossible to add the product to the cart.\n\ntextStatus: '" + textStatus + "'\nerrorThrown: '" + errorThrown + "'\nresponseText:\n" + XMLHttpRequest.responseText);
} }
}); });