fix JavaScript in step 5
This commit is contained in:
parent
5265c5d5c8
commit
a6f94494c7
@ -312,29 +312,74 @@ if (!empty($oldValues)) {
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function checkAll(obj,cnt)
|
function checkAll(obj,cnt)
|
||||||
{
|
{
|
||||||
|
for (i = 0; i < cnt; i++)
|
||||||
|
{
|
||||||
|
if (obj.checked)
|
||||||
|
BX.removeClass('IBLOCK_EXPORT_TABLE'+(i+1),"iblock-export-table-display-none");
|
||||||
|
}
|
||||||
|
var table = BX(obj.id.replace('IBLOCK_EXPORT','IBLOCK_EXPORT_TABLE'));
|
||||||
|
if (obj.checked)
|
||||||
|
BX.removeClass(table,"iblock-export-table-display-none");
|
||||||
|
var easing = new BX.easing({
|
||||||
|
duration : 150,
|
||||||
|
start : {opacity : obj.checked ? 0 : 100 },
|
||||||
|
finish : {opacity: obj.checked ? 100 : 0 },
|
||||||
|
transition : BX.easing.transitions.linear,
|
||||||
|
step : function(state){
|
||||||
|
for (i = 0; i < cnt; i++)
|
||||||
|
{
|
||||||
|
BX('IBLOCK_EXPORT_TABLE'+(i+1)).style.opacity = state.opacity/100;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
complete : function() {
|
||||||
|
for (i = 0; i < cnt; i++)
|
||||||
|
{
|
||||||
|
if (!obj.checked)
|
||||||
|
BX.addClass('IBLOCK_EXPORT_TABLE'+(i+1),"iblock-export-table-display-none");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
easing.animate();
|
||||||
var boolCheck = obj.checked;
|
var boolCheck = obj.checked;
|
||||||
for (i = 0; i < cnt; i++)
|
for (i = 0; i < cnt; i++)
|
||||||
{
|
{
|
||||||
BX('IBLOCK_EXPORT'+i).checked = boolCheck;
|
BX('IBLOCK_EXPORT'+(i+1)).checked = boolCheck;
|
||||||
}
|
}
|
||||||
BX('count_checked').value = (boolCheck ? cnt : 0);
|
BX('count_checked').value = (boolCheck ? cnt : 0);
|
||||||
};
|
};
|
||||||
function checkOne(obj,cnt)
|
function checkOne(obj,cnt)
|
||||||
{
|
{
|
||||||
|
var table = BX(obj.id.replace('IBLOCK_EXPORT','IBLOCK_EXPORT_TABLE'));
|
||||||
|
if (obj.checked)
|
||||||
|
BX.removeClass(table,"iblock-export-table-display-none");
|
||||||
|
var easing = new BX.easing({
|
||||||
|
duration : 150,
|
||||||
|
start : {opacity : obj.checked ? 0 : 100 },
|
||||||
|
finish : {opacity: obj.checked ? 100 : 0 },
|
||||||
|
transition : BX.easing.transitions.linear,
|
||||||
|
step : function(state){
|
||||||
|
table.style.opacity = state.opacity/100;
|
||||||
|
},
|
||||||
|
complete : function() {
|
||||||
|
if (!obj.checked)
|
||||||
|
BX.addClass(table,"iblock-export-table-display-none");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
easing.animate();
|
||||||
var boolCheck = obj.checked;
|
var boolCheck = obj.checked;
|
||||||
var intCurrent = parseInt(BX('count_checked').value);
|
var intCurrent = parseInt(BX('count_checked').value);
|
||||||
intCurrent += (boolCheck ? 1 : -1);
|
intCurrent += (boolCheck ? 1 : -1);
|
||||||
BX('icml_export_all').checked = (intCurrent < cnt ? false : true);
|
BX('icml_export_all').checked = (intCurrent < cnt ? false : true);
|
||||||
BX('count_checked').value = intCurrent;
|
BX('count_checked').value = intCurrent;
|
||||||
if (!boolCheck)
|
|
||||||
BX(obj.id.replace('IBLOCK_EXPORT','IBLOCK_PROPERTY_ARTICLE')).value = 'none';
|
|
||||||
};
|
};
|
||||||
function checkProfile(obj)
|
function propertyChange(obj)
|
||||||
{
|
{
|
||||||
if (obj.value !== 'none')
|
if (BX(obj.id).value !== 'none') {
|
||||||
$('#profile-field').show();
|
if (obj.id.indexOf("SKU") !== -1)
|
||||||
|
BX(obj.id.replace('SKU','PRODUCT')).value = 'none';
|
||||||
else
|
else
|
||||||
$('#profile-field').hide();
|
BX(obj.id.replace('PRODUCT','SKU')).value = 'none';
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user