$u->Show(); $u = new CAdminPopupEx("mnu_SECTION_PAGE_URL", CIBlockParameters::GetPathTemplateMenuItems("SECTION", "__SetUrlVar", "mnu_SECTION_PAGE_URL", "SECTION_PAGE_URL"), array("zIndex" => 2000)); $u->Show(); $arItems = CIBlockParameters::GetPathTemplateMenuItems("DETAIL", "__SetUrlVar", "mnu_DETAIL_PAGE_URL", "DETAIL_PAGE_URL"); if ($str_CATALOG_TYPE == 'O') { $arItems[] = array("SEPARATOR" => true); $arItems[] = array("TEXT" => GetMessage("IB_E_URL_PRODUCT_ID"), "TITLE" => "#PRODUCT_URL# - " . GetMessage("IB_E_URL_PRODUCT_ID"), "ONCLICK" => "__SetUrlVar('#PRODUCT_URL#', 'mnu_DETAIL_PAGE_URL', 'DETAIL_PAGE_URL')"); } $u = new CAdminPopupEx("mnu_DETAIL_PAGE_URL", $arItems, array("zIndex" => 2000)); $u->Show(); $arItems = CIBlockParameters::GetPathTemplateMenuItems("DETAIL", "__SetUrlVar", "mnu_CANONICAL_PAGE_URL", "CANONICAL_PAGE_URL"); array_unshift($arItems, array("SEPARATOR" => true)); array_unshift($arItems, array("TEXT" => "https://", "TITLE" => "", "ONCLICK" => "__SetUrlVar('https://', 'mnu_CANONICAL_PAGE_URL', 'CANONICAL_PAGE_URL')")); array_unshift($arItems, array("TEXT" => "http://", "TITLE" => "", "ONCLICK" => "__SetUrlVar('http://', 'mnu_CANONICAL_PAGE_URL', 'CANONICAL_PAGE_URL')")); $u = new CAdminPopupEx("mnu_CANONICAL_PAGE_URL", $arItems, array("zIndex" => 2000)); $u->Show(); ?> <script> var InheritedPropertiesTemplates = new JCInheritedPropertiesTemplates( 'frm', '/bitrix/admin/iblock_templates.ajax.php?ENTITY_TYPE=B&ENTITY_ID=<?php echo intval($ID); ?> ' ); BX.ready(function(){ setTimeout(function(){ InheritedPropertiesTemplates.updateInheritedPropertiesTemplates(true); }, 1000); }); function __SetUrlVar(id, mnu_id, el_id)
function IBlockInheritedPropertyInput($iblock_id, $id, $data, $type, $checkboxLabel = "") { $inherited = $data[$id]["INHERITED"] !== "N" && $checkboxLabel !== ""; $inputId = "IPROPERTY_TEMPLATES_" . $id; $inputName = "IPROPERTY_TEMPLATES[" . $id . "][TEMPLATE]"; $menuId = "mnu_IPROPERTY_TEMPLATES_" . $id; $resultId = "result_IPROPERTY_TEMPLATES_" . $id; $checkboxId = "ck_IPROPERTY_TEMPLATES_" . $id; if ($type === "S") { $menuItems = CIBlockParameters::GetInheritedPropertyTemplateSectionMenuItems($iblock_id, "InheritedPropertiesTemplates.insertIntoInheritedPropertiesTemplate", $menuId, $inputId); } else { $menuItems = CIBlockParameters::GetInheritedPropertyTemplateElementMenuItems($iblock_id, "InheritedPropertiesTemplates.insertIntoInheritedPropertiesTemplate", $menuId, $inputId); } $u = new CAdminPopupEx($menuId, $menuItems, array("zIndex" => 2000)); $result = $u->Show(true) . '<script> window.ipropTemplates[window.ipropTemplates.length] = { "ID": "' . $id . '", "INPUT_ID": "' . $inputId . '", "RESULT_ID": "' . $resultId . '", "TEMPLATE": "" }; </script>' . '<input type="hidden" name="' . $inputName . '" value="' . htmlspecialcharsbx($data[$id]["TEMPLATE"]) . '" />' . '<textarea onclick="InheritedPropertiesTemplates.enableTextArea(\'' . $inputId . '\')" name="' . $inputName . '" id="' . $inputId . '" ' . ($inherited ? 'readonly="readonly"' : '') . ' cols="55" rows="1" style="width:90%">' . htmlspecialcharsbx($data[$id]["TEMPLATE"]) . '</textarea>' . '<input style="float:right" type="button" id="' . $menuId . '" ' . ($inherited ? 'disabled="disabled"' : '') . ' value="...">' . '<br>'; if ($checkboxLabel != "") { $result .= '<input type="hidden" name="IPROPERTY_TEMPLATES[' . $id . '][INHERITED]" value="Y">' . '<input type="checkbox" name="IPROPERTY_TEMPLATES[' . $id . '][INHERITED]" id="' . $checkboxId . '" value="N" ' . 'onclick="InheritedPropertiesTemplates.updateInheritedPropertiesTemplates()" ' . (!$inherited ? 'checked="checked"' : '') . '>' . '<label for="' . $checkboxId . '">' . $checkboxLabel . '</label><br>'; } if (preg_match("/_FILE_NAME\$/", $id)) { $result .= '<input type="hidden" name="IPROPERTY_TEMPLATES[' . $id . '][LOWER]" value="N">' . '<input type="checkbox" name="IPROPERTY_TEMPLATES[' . $id . '][LOWER]" id="lower_' . $id . '" value="Y" ' . 'onclick="InheritedPropertiesTemplates.enableTextArea(\'' . $inputId . '\');InheritedPropertiesTemplates.updateInheritedPropertiesValues(false, true)" ' . ($data[$id]["LOWER"] !== "Y" ? '' : 'checked="checked"') . '>' . '<label for="lower_' . $id . '">' . GetMessage("IBLOCK_AT_FILE_NAME_LOWER") . '</label><br>'; $result .= '<input type="hidden" name="IPROPERTY_TEMPLATES[' . $id . '][TRANSLIT]" value="N">' . '<input type="checkbox" name="IPROPERTY_TEMPLATES[' . $id . '][TRANSLIT]" id="translit_' . $id . '" value="Y" ' . 'onclick="InheritedPropertiesTemplates.enableTextArea(\'' . $inputId . '\');InheritedPropertiesTemplates.updateInheritedPropertiesValues(false, true)" ' . ($data[$id]["TRANSLIT"] !== "Y" ? '' : 'checked="checked"') . '>' . '<label for="translit_' . $id . '">' . GetMessage("IBLOCK_AT_FILE_NAME_TRANSLIT") . '</label><br>'; $result .= '<input size="2" maxlength="1" type="text" name="IPROPERTY_TEMPLATES[' . $id . '][SPACE]" id="space_' . $id . '" value="' . htmlspecialcharsbx($data[$id]["SPACE"]) . '" ' . 'onchange="InheritedPropertiesTemplates.updateInheritedPropertiesValues(false, true)">' . GetMessage("IBLOCK_AT_FILE_NAME_SPACE") . '<br>'; } $result .= '<b><div id="' . $resultId . '"></div></b>'; return $result; }