From e7dca833e9d60033544ad4ff3b7ae8fcc2fe50a5 Mon Sep 17 00:00:00 2001 From: Felix Eggmann Date: Sun, 4 Mar 2018 18:52:31 +0100 Subject: [PATCH] fix(gridfield): remove unused action --- code/GridFieldPageSectionsExtension.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/code/GridFieldPageSectionsExtension.php b/code/GridFieldPageSectionsExtension.php index 922cdb8..b461aae 100644 --- a/code/GridFieldPageSectionsExtension.php +++ b/code/GridFieldPageSectionsExtension.php @@ -16,7 +16,6 @@ class GridFieldPageSectionsExtension implements "handleRemove", "handleDelete", "handleReorder", - "handleMoveToPage" ); @@ -39,7 +38,6 @@ public function getURLHandlers($grid) { "POST remove" => "handleRemove", "POST delete" => "handleDelete", "POST reorder" => "handleReorder", - "POST movetopage" => "handleMoveToPage" ); } @@ -70,12 +68,12 @@ public function augmentColumns($gridField, &$columns) { array_splice($columns, 0, 0, "Reorder"); } - if (!in_array("TreeNav", $columns)) { - array_splice($columns, 1, 0, "TreeNav"); + if (!in_array("Actions", $columns)) { + array_splice($columns, 1, 0, "Actions"); } - if (!in_array("Actions", $columns)) { - array_push($columns, "Actions"); + if (!in_array("TreeNav", $columns)) { + array_splice($columns, 2, 0, "TreeNav"); } // Insert grid state initial data @@ -101,8 +99,8 @@ public function augmentColumns($gridField, &$columns) { public function getColumnsHandled($gridField) { return array( "Reorder", - "TreeNav", "Actions", + "TreeNav", ); }