diff --git a/resources/celerity/packages.php b/resources/celerity/packages.php index 7a7fc2a1bd..1f4afe5b1b 100644 --- a/resources/celerity/packages.php +++ b/resources/celerity/packages.php @@ -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', diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 9c78687fda..65c3aa6e16 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -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', diff --git a/src/applications/differential/view/DifferentialResultsTableView.php b/src/applications/differential/view/DifferentialResultsTableView.php deleted file mode 100644 index f05b24216b..0000000000 --- a/src/applications/differential/view/DifferentialResultsTableView.php +++ /dev/null @@ -1,115 +0,0 @@ -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); - } - - -} diff --git a/webroot/rsrc/css/application/differential/results-table.css b/webroot/rsrc/css/application/differential/results-table.css deleted file mode 100644 index 80d8ad1756..0000000000 --- a/webroot/rsrc/css/application/differential/results-table.css +++ /dev/null @@ -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}; -} diff --git a/webroot/rsrc/js/application/differential/behavior-show-field-details.js b/webroot/rsrc/js/application/differential/behavior-show-field-details.js deleted file mode 100644 index a50d322595..0000000000 --- a/webroot/rsrc/js/application/differential/behavior-show-field-details.js +++ /dev/null @@ -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')); - } - -});