Exemple #1
0
					pr.value = esum;
				}
			}
		}

		top.SubChangeBaseCurrency = function(id)
		{
			var currency = top.document.getElementById("CATALOG_CURRENCY["+id+"]["+top.SubBaseIndex+"]");
			for (var i = 0, cnt = top.arSubCatalogShowedGroups.length; i < cnt; i++)
			{
				var pr = top.document.getElementById("CATALOG_CURRENCY["+id+"]["+top.arSubCatalogShowedGroups[i]+"]");
				if (pr.disabled)
				{
					pr.selectedIndex = currency.selectedIndex;
				}
			}
		}
	</script>
	<?php 
    }
    $aContext = array();
    if ($boolIBlockElementAdd) {
        $aContext[] = array("ICON" => "btn_sub_new", "TEXT" => htmlspecialcharsex('' != trim($arSubIBlock["ELEMENT_ADD"]) ? $arSubIBlock["ELEMENT_ADD"] : GetMessage('IB_SE_L_ADD_NEW_ELEMENT')), "LINK" => "javascript:ShowNewOffer('btn_sub_new')", "TITLE" => GetMessage("IB_SE_L_ADD_NEW_ELEMENT_DESCR"));
    }
    $aContext[] = array("ICON" => "btn_sub_refresh", "TEXT" => htmlspecialcharsex(GetMessage('IB_SE_L_REFRESH_ELEMENTS')), "LINK" => "javascript:" . $lAdmin->ActionAjaxReload($lAdmin->GetListUrl(true)), "TITLE" => GetMessage("IB_SE_L_REFRESH_ELEMENTS_DESCR"));
    $lAdmin->AddAdminContextMenu($aContext);
    $lAdmin->CheckListMode();
    $lAdmin->DisplayList(B_ADMIN_SUBELEMENTS_LIST);
} else {
    ShowMessage(GetMessage('IB_SE_L_SHOW_PRICES_AFTER_COPY'));
}
',
			DISCOUNT_ID: id,
			MULTI: multi,
			ID: 0,
			bxpublic: 'Y',
			sessid: BX.bitrix_sessid()
		};
		(new BX.CAdminDialog({
			'content_url': '/bitrix/admin/sale_discount_coupon_edit.php',
			'content_post': PostParams,
			'draggable': true,
			'resizable': true,
			'buttons': [BX.CAdminDialog.btnSave, BX.CAdminDialog.btnCancel]
		})).Show();
	}
	</script><?php 
    $aContext = array();
    if (!$couponsReadOnly) {
        $addSubMenu = array();
        $addSubMenu[] = array('TEXT' => Loc::getMessage('BX_SALE_DISCOUNT_COUPON_LIST_ADD_ONE_COUPON'), 'TITLE' => Loc::getMessage('BX_SALE_DISCOUNT_COUPON_LIST_ADD_ONE_COUPON_TITLE'), 'LINK' => "javascript:ShowNewCoupons(" . $discountID . ", 'N')", 'SHOW_TITLE' => true);
        $addSubMenu[] = array('TEXT' => Loc::getMessage('BX_SALE_DISCOUNT_COUPON_LIST_ADD_MULTI_COUPON'), 'TITLE' => Loc::getMessage('BX_SALE_DISCOUNT_COUPON_LIST_ADD_MULTI_COUPON_TITLE'), 'LINK' => "javascript:ShowNewCoupons(" . $discountID . ", 'Y')", 'SHOW_TITLE' => true);
        $aContext[] = array('TEXT' => Loc::getMessage('BT_SALE_DISCOUNT_COUPONT_LIST_MESS_NEW_COUPON'), 'TITLE' => Loc::getMessage('BT_SALE_DISCOUNT_COUPON_LIST_MESS_NEW_COUPON_TITLE'), 'ICON' => 'btn_new', 'MENU' => $addSubMenu);
    }
    $aContext[] = array('TEXT' => htmlspecialcharsex(Loc::getMessage('BX_SALE_DISCOUNT_COUPON_LIST_REFRESH')), 'TITLE' => Loc::getMessage('BX_SALE_DISCOUNT_COUPON_LIST_REFRESH_TITLE'), 'ICON' => 'btn_sub_refresh', 'LINK' => "javascript:" . $adminList->ActionAjaxReload($adminList->GetListUrl(true)));
    $adminList->AddAdminContextMenu($aContext);
}
$adminList->CheckListMode();
$adminList->DisplayList(B_ADMIN_SUBCOUPONS_LIST);
if ($prologAbsent) {
    require $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/epilog_popup_admin.php';
}
		'bxpublic': 'Y',
		'sessid': BX.bitrix_sessid()
	};
	(new BX.CAdminDialog({
		'content_url': '/bitrix/admin/cat_subcoupon_edit.php',
		'content_post': PostParams,
		'draggable': true,
		'resizable': false,
		'buttons': [BX.CAdminDialog.btnSave, BX.CAdminDialog.btnCancel]
	})).Show();
}
</script><?php 
    $aContext = array();
    if (!$boolCouponsReadOnly) {
        if (0 < $intDiscountID) {
            $arAddMenu = array();
            $arAddMenu[] = array("TEXT" => GetMessage("BT_CAT_DISC_COUPON_LIST_ADD_ONE_COUPON"), "LINK" => "javascript:ShowNewCoupon(" . $intDiscountID . ")", "TITLE" => GetMessage("BT_CAT_DISC_COUPON_LIST_ADD_ONE_COUPON_TITLE"));
            $arAddMenu[] = array("TEXT" => GetMessage("BT_CAT_DISC_COUPON_LIST_ADD_MULTI_COUPON"), "LINK" => "javascript:ShowNewMultiCoupons(" . $intDiscountID . ")", "TITLE" => GetMessage("BT_CAT_DISC_COUPON_LIST_ADD_MULTI_COUPON_TITLE"));
            $aContext[] = array("TEXT" => GetMessage("DSC_CPN_ADD"), "ICON" => "btn_new", "MENU" => $arAddMenu);
        }
    }
    $aContext[] = array("ICON" => "btn_sub_refresh", "TEXT" => htmlspecialcharsex(GetMessage('BT_CAT_DISC_COUPON_LIST_REFRESH')), "LINK" => "javascript:" . $lAdmin->ActionAjaxReload($lAdmin->GetListUrl(true)), "TITLE" => GetMessage("BT_CAT_DISC_COUPON_LIST_REFRESH_TITLE"));
    $lAdmin->AddAdminContextMenu($aContext);
    $lAdmin->CheckListMode();
    if (true == B_ADMIN_SUBCOUPONS_LIST) {
        echo $CAdminCalendar_ShowScript;
    }
    $lAdmin->DisplayList(B_ADMIN_SUBCOUPONS_LIST);
} else {
    ShowMessage(GetMessage('BT_CAT_DISC_COUPON_LIST_SHOW_AFTER_COPY'));
}