Пример #1
0
							<div style="overflow: auto; min-height: 300px; padding-top: 0.6em;" id="categoryList">
								<script type="text/javascript">
								$(document).ready(function() {
									$(\'div#categoryList input.categoryBox\').click(function (){
										if ($(this).is(\':not(:checked)\') && $(\'div#categoryList input.id_category_default\').val() == $(this).val())
											alert(\'' . utf8_encode(html_entity_decode($adminProducts->getL('Consider changing the default category.'))) . '\');
									});
								});
								</script>
								<table cellspacing="0" cellpadding="0" class="table">
									<tr>
										<th><input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, \'categoryBox[]\', this.checked)" /></th>
										<th>' . $adminProducts->getL('ID') . '</th>
										<th style="width: 600px">' . $adminProducts->getL('Name') . '</th>
									</tr>';
$done = array();
$index = array();
$categoryBox = Tools::getValue('categoryBox');
if ($categoryBox != '') {
    $categoryBox = @unserialize($categoryBox);
    foreach ($categoryBox as $k => $row) {
        $index[] = $row;
    }
} elseif ((int) Tools::getValue('id_product')) {
    $index = Product::getProductCategories((int) Tools::getValue('id_product'));
}
$adminProducts->recurseCategoryForInclude((int) Tools::getValue('id_product'), $index, $categories, $categories[0][1], 1, (int) Tools::getValue('id_category_default'));
echo '				</table>
								<p style="padding:0px; margin:0px 0px 10px 0px;">' . $adminProducts->getL('Mark all checkbox(es) of categories in which product is to appear') . '<sup> *</sup></p>
							</div>
					</tr>';