// fix JS errors on product page BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12453 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -76,6 +76,7 @@
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var toload = new Array();
|
||||
var empty_pack_msg = '{l s='Pack is empty. You need to add at least one product to the pack before you can save it.'}';
|
||||
$('#product-tab-content-wait').show();
|
||||
|
||||
$(document).ready(function()
|
||||
|
||||
@@ -161,19 +161,6 @@
|
||||
return ids;
|
||||
}
|
||||
|
||||
function handleSaveForPack()
|
||||
{
|
||||
// if no item left in the pack, disable save buttons
|
||||
$("#disablePackMessage").remove();
|
||||
if ($("#inputPackItems").val() == "")
|
||||
{
|
||||
disableSave();
|
||||
$(".leadin").append('<div id="disablePackMessage" class="warn">{l s='Pack is empty. You need to add at least one product to the pack before you can save it.'}</div>');
|
||||
}
|
||||
else
|
||||
enableSave();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<h4>{l s='Pack'}</h4>
|
||||
|
||||
@@ -322,6 +322,19 @@ function enableSave()
|
||||
$('#desc-product-save-and-stay').show();
|
||||
}
|
||||
|
||||
function handleSaveForPack()
|
||||
{
|
||||
// if no item left in the pack, disable save buttons
|
||||
$("#disablePackMessage").remove();
|
||||
if ($("#inputPackItems").val() == "")
|
||||
{
|
||||
disableSave();
|
||||
$(".leadin").append('<div id="disablePackMessage" class="warn">' + empty_pack_msg + '</div>');
|
||||
}
|
||||
else
|
||||
enableSave();
|
||||
}
|
||||
|
||||
/* function autocomplete */
|
||||
urlToCall = null;
|
||||
|
||||
|
||||
@@ -251,10 +251,12 @@ function init_elems()
|
||||
function attr_selectall()
|
||||
{
|
||||
var elem = getE('product_att_list');
|
||||
var i;
|
||||
|
||||
for (i = 0; i < elem.length; i++)
|
||||
elem.options[i].selected = true;
|
||||
if (elem)
|
||||
{
|
||||
var i;
|
||||
for (i = 0; i < elem.length; i++)
|
||||
elem.options[i].selected = true;
|
||||
}
|
||||
}
|
||||
|
||||
function del_attr_multiple()
|
||||
|
||||
Reference in New Issue
Block a user