1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 12:52:42 +01:00

Remove weird "Differential Results Table" view

Summary: Ref T8095. This weird grey table has no remaining callsites and can be removed.

Test Plan: Grepped for symbols.

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8095

Differential Revision: https://secure.phabricator.com/D13379
This commit is contained in:
epriestley 2015-06-21 10:41:32 -07:00
parent b72deb332c
commit 831c18e6be
5 changed files with 0 additions and 236 deletions

View file

@ -145,7 +145,6 @@ return array(
'differential.pkg.css' => array(
'differential-core-view-css',
'differential-changeset-view-css',
'differential-results-table-css',
'differential-revision-history-css',
'differential-revision-list-css',
'differential-table-of-contents-css',

View file

@ -416,7 +416,6 @@ phutil_register_library_map(array(
'DifferentialRepositoryField' => 'applications/differential/customfield/DifferentialRepositoryField.php',
'DifferentialRepositoryLookup' => 'applications/differential/query/DifferentialRepositoryLookup.php',
'DifferentialRequiredSignaturesField' => 'applications/differential/customfield/DifferentialRequiredSignaturesField.php',
'DifferentialResultsTableView' => 'applications/differential/view/DifferentialResultsTableView.php',
'DifferentialRevertPlanField' => 'applications/differential/customfield/DifferentialRevertPlanField.php',
'DifferentialReviewedByField' => 'applications/differential/customfield/DifferentialReviewedByField.php',
'DifferentialReviewer' => 'applications/differential/storage/DifferentialReviewer.php',
@ -3786,7 +3785,6 @@ phutil_register_library_map(array(
'DifferentialRepositoryField' => 'DifferentialCoreCustomField',
'DifferentialRepositoryLookup' => 'Phobject',
'DifferentialRequiredSignaturesField' => 'DifferentialCoreCustomField',
'DifferentialResultsTableView' => 'AphrontView',
'DifferentialRevertPlanField' => 'DifferentialStoredCustomField',
'DifferentialReviewedByField' => 'DifferentialCoreCustomField',
'DifferentialReviewer' => 'Phobject',

View file

@ -1,115 +0,0 @@
<?php
final class DifferentialResultsTableView extends AphrontView {
private $rows;
private $showMoreString;
public function setRows(array $rows) {
$this->rows = $rows;
return $this;
}
public function setShowMoreString($show_more_string) {
$this->showMoreString = $show_more_string;
return $this;
}
public function render() {
$rows = array();
$any_hidden = false;
foreach ($this->rows as $row) {
$style = idx($row, 'style');
switch ($style) {
case 'section':
$cells = phutil_tag(
'th',
array(
'colspan' => 2,
),
idx($row, 'name'));
break;
default:
$name = phutil_tag(
'th',
array(
),
idx($row, 'name'));
$value = phutil_tag(
'td',
array(
),
idx($row, 'value'));
$cells = array($name, $value);
break;
}
$show = idx($row, 'show');
$rows[] = javelin_tag(
'tr',
array(
'style' => $show ? null : 'display: none',
'sigil' => $show ? null : 'differential-results-row-toggle',
'class' => 'differential-results-row-'.$style,
),
$cells);
if (!$show) {
$any_hidden = true;
}
}
if ($any_hidden) {
$show_more = javelin_tag(
'a',
array(
'href' => '#',
'mustcapture' => true,
),
$this->showMoreString);
$hide_more = javelin_tag(
'a',
array(
'href' => '#',
'mustcapture' => true,
),
pht('Hide'));
$rows[] = javelin_tag(
'tr',
array(
'class' => 'differential-results-row-show',
'sigil' => 'differential-results-row-show',
),
phutil_tag('th', array('colspan' => 2), $show_more));
$rows[] = javelin_tag(
'tr',
array(
'class' => 'differential-results-row-show',
'sigil' => 'differential-results-row-hide',
'style' => 'display: none',
),
phutil_tag('th', array('colspan' => 2), $hide_more));
$this->initBehavior('differential-show-field-details');
}
$this->requireResource('differential-results-table-css');
return javelin_tag(
'table',
array(
'class' => 'differential-results-table',
'sigil' => 'differential-results-table',
),
$rows);
}
}

View file

@ -1,78 +0,0 @@
/**
* @provides differential-results-table-css
*/
table.differential-results-table {
border-collapse: separate;
width: 96%;
font-size: 11px;
}
.differential-results-table th {
text-align: center;
white-space: nowrap;
vertical-align: middle;
padding: 2px 4px;
width: 50px;
border-right: 1px solid #fff;
background: #f7f7f7;
}
.device .differential-results-table th {
white-space: normal;
}
.differential-results-table td {
padding: 0 8px;
margin: 0;
vertical-align: middle;
background: #f7f7f7;
}
.differential-results-table tr.differential-results-row-star th,
.differential-results-table tr.differential-results-row-star td {
background: {$greybackground};
}
.differential-results-table tr.differential-results-row-section th {
padding-top: 4px;
text-align: left;
}
.differential-results-table tr.differential-results-row-excuse th {
background: #3399ff;
}
.differential-results-table tr.differential-results-row-excuse td {
padding-top: 8px;
padding-right: 8px;
padding-bottom: 8px;
}
.differential-results-table tr.differential-results-row-red th {
background: #ff4422;
}
.differential-results-table tr.differential-results-row-yellow th {
background: #ffdd66;
}
.differential-results-table tr.differential-results-row-green th {
background: #22dd44;
}
.differential-results-table tr.differential-results-row-blue th {
background: #88bbff;
}
.differential-results-table tr.differential-results-row-details td {
color: {$lightgreytext};
}
.differential-results-table tr.differential-results-row-show th {
border-top: 1px solid #fff;
border-right: none;
padding: 2px;
color: {$bluetext};
background: {$greybackground};
}

View file

@ -1,40 +0,0 @@
/**
* @provides javelin-behavior-differential-show-field-details
* @requires javelin-behavior
* javelin-stratcom
* javelin-dom
*/
JX.behavior('differential-show-field-details', function() {
JX.Stratcom.listen(
'click',
['differential-results-row-show', 'tag:a'],
function(e) {
toggle(e, true);
});
JX.Stratcom.listen(
'click',
['differential-results-row-hide', 'tag:a'],
function(e) {
toggle(e, false);
});
function toggle(e, show) {
e.kill();
var f = show ? JX.DOM.show : JX.DOM.hide;
var g = show ? JX.DOM.hide : JX.DOM.show;
var table = e.getNode('differential-results-table');
var rows = JX.DOM.scry(table, 'tr', 'differential-results-row-toggle');
for (var ii = 0; ii < rows.length; ii++) {
f(rows[ii]);
}
g(JX.DOM.find(table, 'tr', 'differential-results-row-show'));
f(JX.DOM.find(table, 'tr', 'differential-results-row-hide'));
}
});