示例#1
0
}
$arResult["ELEMENTS_HEADERS"][] = array("id" => "IBLOCK_SECTION_ID", "name" => GetMessage("CC_BLL_COLUMN_SECTION"), "default" => true, "sort" => false);
if (count($arDocumentTemplates) > 0) {
    $arSelect[] = "CREATED_BY";
    $arResult["ELEMENTS_HEADERS"][] = array("id" => "BIZPROC", "name" => GetMessage("CC_BLL_COLUMN_BIZPROC"), "default" => true, "sort" => false);
}
if ($arResult["PROCESSES"] && $arResult["USE_COMMENTS"]) {
    $arResult["ELEMENTS_HEADERS"][] = array("id" => "COMMENTS", "name" => GetMessage("CC_BLL_COMMENTS"), "default" => true, "sort" => false, 'hideName' => true, 'iconCls' => 'bp-comments-icon');
}
if (empty($grid_columns)) {
    foreach ($arResult["ELEMENTS_HEADERS"] as $elementHeader) {
        $columnGrid[] = $elementHeader["id"];
    }
    $columns = implode(',', $columnGrid);
    $grid_options->SetColumns($columns);
    $grid_options->Save();
}
/* FILTER */
$sections = array('' => GetMessage("CC_BLL_ANY"));
foreach ($arResult["~LIST_SECTIONS"] as $id => $name) {
    $sections[$id] = $name;
}
$arResult["FILTER"] = array(array("id" => "list_section_id", "name" => GetMessage("CC_BLL_SECTION"), "type" => "list", "items" => $sections, "filtered" => $arResult["SECTION_ID"] !== false, "filter_value" => $arResult["SECTION_ID"], "value" => $arResult["SECTION_ID"]));
$i = 1;
$arFilterable = array();
$arCustomFilter = array();
$arDateFilter = array();
foreach ($arListFields as $FIELD_ID => $arField) {
    if ($arField["TYPE"] == "ACTIVE_FROM" || $arField["TYPE"] == "ACTIVE_TO") {
        $arResult["FILTER"][$i] = array("id" => "DATE_" . $FIELD_ID, "name" => htmlspecialcharsex($arField["NAME"]), "type" => "date");
        $arFilterable["DATE_" . $FIELD_ID] = "";
示例#2
0
    $gridOptions = new CGridOptions($_REQUEST["GRID_ID"]);
    if ($_REQUEST["action"] == "showcolumns") {
        $gridOptions->SetColumns($_REQUEST["columns"]);
    } elseif ($_REQUEST["action"] == "settheme") {
        $gridOptions->SetTheme($_REQUEST["theme"]);
    } elseif ($_REQUEST["action"] == "savesettings") {
        CUtil::decodeURIComponent($_POST);
        $gridOptions->SetViewSettings($_POST['view_id'], $_POST);
        if ($_REQUEST["set_default_settings"] == "Y" && $USER->CanDoOperation('edit_other_settings')) {
            $gridOptions->SetDefaultView($_POST);
            if ($_REQUEST["delete_users_settings"] == "Y") {
                $gridOptions->ResetDefaultView();
            }
        }
    } elseif ($_REQUEST["action"] == "delview") {
        $gridOptions->DeleteView($_REQUEST['view_id']);
    } elseif ($_REQUEST["action"] == "setview") {
        $gridOptions->SetView($_REQUEST["view_id"]);
    } elseif ($_REQUEST["action"] == "filterrows") {
        $gridOptions->SetFilterRows($_REQUEST["rows"], $_REQUEST['filter_id']);
    } elseif ($_REQUEST["action"] == "savefilter") {
        CUtil::decodeURIComponent($_POST);
        $gridOptions->SetFilterSettings($_POST['filter_id'], $_POST);
    } elseif ($_REQUEST["action"] == "delfilter") {
        $gridOptions->DeleteFilter($_REQUEST['filter_id']);
    } elseif ($_REQUEST["action"] == "filterswitch") {
        $gridOptions->SetFilterSwitch($_REQUEST["show"]);
    }
    $gridOptions->Save();
}
echo "OK";