Skip to content

Commit

Permalink
fix(gridfield): remove unused action
Browse files Browse the repository at this point in the history
  • Loading branch information
flxqr2 committed Mar 4, 2018
1 parent 7d100cb commit e7dca83
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions code/GridFieldPageSectionsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class GridFieldPageSectionsExtension implements
"handleRemove",
"handleDelete",
"handleReorder",
"handleMoveToPage"
);


Expand All @@ -39,7 +38,6 @@ public function getURLHandlers($grid) {
"POST remove" => "handleRemove",
"POST delete" => "handleDelete",
"POST reorder" => "handleReorder",
"POST movetopage" => "handleMoveToPage"
);
}

Expand Down Expand Up @@ -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
Expand All @@ -101,8 +99,8 @@ public function augmentColumns($gridField, &$columns) {
public function getColumnsHandled($gridField) {
return array(
"Reorder",
"TreeNav",
"Actions",
"TreeNav",
);
}

Expand Down

0 comments on commit e7dca83

Please sign in to comment.