/* * 2007-2011 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@prestashop.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA * @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ function addVariation(id_variation) { var idRow = $('#variation_table tr').length + 1; var newRow = ''; newRow += ''+writeName+''; newRow += ''; newRow += ''; newRow += ''+compafrom+''; newRow += ''; newRow += ''+compato+''; newRow += ''; if ($('#variation_table tr').length > 0) $('#variation_table tr:last').after(newRow); else $('#variation_table').html(newRow); $('#myvar_'+idRow).after(' delete'); } function removeVariation(id) { $('#myvar_'+id).val(-1); $('#myvar_tr_'+id).hide(); } /* ** -------------------------------------------- */ function addDocumentation(id_variation) { var idRow = $('#documentation_table tr').length + 1; var newRow = ''; newRow += ''+writeName+''; newRow += ''; newRow += ''+path+''; newRow += ''; if ($('#documentation_table tr').length > 0) $('#documentation_table tr:last').after(newRow); else $('#documentation_table').html(newRow); $('#mydoc_'+idRow).after(' delete'); } function removeDocumentation(id) { $('#mydoc_'+id).parent().html(''); $('#mydoc_tr_'+id).hide(); } $('document').ready(function() { if (themes.length > 0) { var count = 0; while (themes_id[count] != null && count < 10) addVariation(themes_id[count++]); } else addVariation(0); addDocumentation(0); });