Christopher Johnson (WMDE) has submitted this change and it was merged. Change subject: removes sort functions from SprintTableView ......................................................................
removes sort functions from SprintTableView Change-Id: I3f1f4acc65b483d07da68d13ad27feb53de9ed9f --- M src/view/SprintTableView.php 1 file changed, 4 insertions(+), 46 deletions(-) Approvals: Christopher Johnson (WMDE): Verified; Looks good to me, approved diff --git a/src/view/SprintTableView.php b/src/view/SprintTableView.php index d467cc1..001ad70 100644 --- a/src/view/SprintTableView.php +++ b/src/view/SprintTableView.php @@ -86,18 +86,6 @@ return $this; } - /** - * Parse a sorting parameter: - * - * list($sort, $reverse) = AphrontTableView::parseSortParam($sort_param); - * - * @param string Sort request parameter. - * @return pair Sort value, sort direction. - */ - public static function parseSort($sort) { - return array(ltrim($sort, '-'), preg_match('/^-/', $sort)); - } - public function render() { require_celerity_resource('aphront-table-view-css'); require_celerity_resource('jquery', 'sprint'); @@ -150,31 +138,6 @@ $classes[] = 'aphront-table-view-nodevice'; } - if ($sort_values[$col_num] !== null) { - $classes[] = 'aphront-table-view-sortable'; - - $sort_value = $sort_values[$col_num]; - $sort_glyph_class = 'aphront-table-down-sort'; - if ($sort_value == $this->sortSelected) { - if ($this->sortReverse) { - $sort_glyph_class = 'aphront-table-up-sort'; - } else if (!$this->sortReverse) { - $sort_value = '-'.$sort_value; - } - $classes[] = 'aphront-table-view-sortable-selected'; - } - - $sort_glyph = phutil_tag( - 'span', - array( - 'class' => $sort_glyph_class, - ), - ''); - - $header = phutil_tag( - 'thead'); - } - if ($classes) { $class = implode(' ', $classes); } else { @@ -204,12 +167,6 @@ } foreach ($col_classes as $key => $value) { - - if (($sort_values[$key] !== null) && - ($sort_values[$key] == $this->sortSelected)) { - $value = trim($value.' sorted-column'); - } - if ($value !== null) { $col_classes[$key] = $value; } @@ -277,12 +234,13 @@ } if ($this->tableId !== null) { - $tableId = $this->tableId; + $table_id = $this->tableId; } else { - $tableId = celerity_generate_unique_node_id(); + $table_id = celerity_generate_unique_node_id(); } - $html = phutil_tag('table', array('class' => $table_class, 'id' => $tableId), $table); + $html = phutil_tag('table', array('class' => $table_class, + 'id' => $table_id,), $table); return phutil_tag_div('aphront-table-wrap', $html); } -- To view, visit https://gerrit.wikimedia.org/r/190417 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3f1f4acc65b483d07da68d13ad27feb53de9ed9f Gerrit-PatchSet: 1 Gerrit-Project: phabricator/extensions/Sprint Gerrit-Branch: master Gerrit-Owner: Christopher Johnson (WMDE) <christopher.john...@wikimedia.de> Gerrit-Reviewer: Christopher Johnson (WMDE) <christopher.john...@wikimedia.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits