1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-11 23:31:03 +01:00

Optional body class for dust background.

Summary: This adds an option dust background for certain application designs, like Macro and Pholio to help make the list views pop more.

Test Plan: Reviewed Macro and Pholio.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5209
This commit is contained in:
Chad Little 2013-03-04 10:35:50 -08:00
parent 851d02b30a
commit 3c11d9103e
6 changed files with 65 additions and 40 deletions

View file

@ -2599,7 +2599,7 @@ celerity_register_resource_map(array(
),
'phabricator-core-css' =>
array(
'uri' => '/res/2a055ecb/rsrc/css/core/core.css',
'uri' => '/res/b34e5c75/rsrc/css/core/core.css',
'type' => 'css',
'requires' =>
array(
@ -3435,7 +3435,7 @@ celerity_register_resource_map(array(
), array(
'packages' =>
array(
'f63b5397' =>
'e5fe863e' =>
array(
'name' => 'core.pkg.css',
'symbols' =>
@ -3478,7 +3478,7 @@ celerity_register_resource_map(array(
35 => 'phabricator-object-item-list-view-css',
36 => 'global-drag-and-drop-css',
),
'uri' => '/res/pkg/f63b5397/core.pkg.css',
'uri' => '/res/pkg/e5fe863e/core.pkg.css',
'type' => 'css',
),
'd29c1557' =>
@ -3666,17 +3666,17 @@ celerity_register_resource_map(array(
'reverse' =>
array(
'aphront-attached-file-view-css' => 'e30a3fa8',
'aphront-crumbs-view-css' => 'f63b5397',
'aphront-dialog-view-css' => 'f63b5397',
'aphront-error-view-css' => 'f63b5397',
'aphront-form-view-css' => 'f63b5397',
'aphront-list-filter-view-css' => 'f63b5397',
'aphront-pager-view-css' => 'f63b5397',
'aphront-panel-view-css' => 'f63b5397',
'aphront-table-view-css' => 'f63b5397',
'aphront-tokenizer-control-css' => 'f63b5397',
'aphront-tooltip-css' => 'f63b5397',
'aphront-typeahead-control-css' => 'f63b5397',
'aphront-crumbs-view-css' => 'e5fe863e',
'aphront-dialog-view-css' => 'e5fe863e',
'aphront-error-view-css' => 'e5fe863e',
'aphront-form-view-css' => 'e5fe863e',
'aphront-list-filter-view-css' => 'e5fe863e',
'aphront-pager-view-css' => 'e5fe863e',
'aphront-panel-view-css' => 'e5fe863e',
'aphront-table-view-css' => 'e5fe863e',
'aphront-tokenizer-control-css' => 'e5fe863e',
'aphront-tooltip-css' => 'e5fe863e',
'aphront-typeahead-control-css' => 'e5fe863e',
'differential-changeset-view-css' => '8aaacd1b',
'differential-core-view-css' => '8aaacd1b',
'differential-inline-comment-editor' => 'd2447f72',
@ -3690,7 +3690,7 @@ celerity_register_resource_map(array(
'differential-table-of-contents-css' => '8aaacd1b',
'diffusion-commit-view-css' => 'c8ce2d88',
'diffusion-icons-css' => 'c8ce2d88',
'global-drag-and-drop-css' => 'f63b5397',
'global-drag-and-drop-css' => 'e5fe863e',
'inline-comment-summary-css' => '8aaacd1b',
'javelin-aphlict' => 'd29c1557',
'javelin-behavior' => 'cd1d650a',
@ -3759,48 +3759,48 @@ celerity_register_resource_map(array(
'javelin-util' => 'cd1d650a',
'javelin-vector' => 'cd1d650a',
'javelin-workflow' => 'cd1d650a',
'lightbox-attachment-css' => 'f63b5397',
'lightbox-attachment-css' => 'e5fe863e',
'maniphest-task-summary-css' => 'e30a3fa8',
'maniphest-transaction-detail-css' => 'e30a3fa8',
'phabricator-busy' => 'd29c1557',
'phabricator-content-source-view-css' => '8aaacd1b',
'phabricator-core-buttons-css' => 'f63b5397',
'phabricator-core-css' => 'f63b5397',
'phabricator-crumbs-view-css' => 'f63b5397',
'phabricator-directory-css' => 'f63b5397',
'phabricator-core-buttons-css' => 'e5fe863e',
'phabricator-core-css' => 'e5fe863e',
'phabricator-crumbs-view-css' => 'e5fe863e',
'phabricator-directory-css' => 'e5fe863e',
'phabricator-drag-and-drop-file-upload' => 'd2447f72',
'phabricator-dropdown-menu' => 'd29c1557',
'phabricator-file-upload' => 'd29c1557',
'phabricator-filetree-view-css' => 'f63b5397',
'phabricator-flag-css' => 'f63b5397',
'phabricator-form-view-css' => 'f63b5397',
'phabricator-header-view-css' => 'f63b5397',
'phabricator-jump-nav' => 'f63b5397',
'phabricator-filetree-view-css' => 'e5fe863e',
'phabricator-flag-css' => 'e5fe863e',
'phabricator-form-view-css' => 'e5fe863e',
'phabricator-header-view-css' => 'e5fe863e',
'phabricator-jump-nav' => 'e5fe863e',
'phabricator-keyboard-shortcut' => 'd29c1557',
'phabricator-keyboard-shortcut-manager' => 'd29c1557',
'phabricator-main-menu-view' => 'f63b5397',
'phabricator-main-menu-view' => 'e5fe863e',
'phabricator-menu-item' => 'd29c1557',
'phabricator-nav-view-css' => 'f63b5397',
'phabricator-nav-view-css' => 'e5fe863e',
'phabricator-notification' => 'd29c1557',
'phabricator-notification-css' => 'f63b5397',
'phabricator-notification-menu-css' => 'f63b5397',
'phabricator-object-item-list-view-css' => 'f63b5397',
'phabricator-notification-css' => 'e5fe863e',
'phabricator-notification-menu-css' => 'e5fe863e',
'phabricator-object-item-list-view-css' => 'e5fe863e',
'phabricator-object-selector-css' => '8aaacd1b',
'phabricator-paste-file-upload' => 'd29c1557',
'phabricator-prefab' => 'd29c1557',
'phabricator-project-tag-css' => 'e30a3fa8',
'phabricator-remarkup-css' => 'f63b5397',
'phabricator-remarkup-css' => 'e5fe863e',
'phabricator-shaped-request' => 'd2447f72',
'phabricator-side-menu-view-css' => 'f63b5397',
'phabricator-standard-page-view' => 'f63b5397',
'phabricator-side-menu-view-css' => 'e5fe863e',
'phabricator-standard-page-view' => 'e5fe863e',
'phabricator-textareautils' => 'd29c1557',
'phabricator-tooltip' => 'd29c1557',
'phabricator-transaction-view-css' => 'f63b5397',
'phabricator-zindex-css' => 'f63b5397',
'sprite-apps-large-css' => 'f63b5397',
'sprite-gradient-css' => 'f63b5397',
'sprite-icon-css' => 'f63b5397',
'sprite-menu-css' => 'f63b5397',
'syntax-highlighting-css' => 'f63b5397',
'phabricator-transaction-view-css' => 'e5fe863e',
'phabricator-zindex-css' => 'e5fe863e',
'sprite-apps-large-css' => 'e5fe863e',
'sprite-gradient-css' => 'e5fe863e',
'sprite-icon-css' => 'e5fe863e',
'sprite-menu-css' => 'e5fe863e',
'syntax-highlighting-css' => 'e5fe863e',
),
));

View file

@ -171,6 +171,7 @@ abstract class PhabricatorController extends AphrontController {
}
$page->setShowChrome(idx($options, 'chrome', true));
$page->setDust(idx($options, 'dust', false));
$application_menu = $this->buildApplicationMenu();
if ($application_menu) {

View file

@ -160,6 +160,7 @@ final class PhabricatorMacroListController
array(
'device' => true,
'title' => pht('Image Macros'),
'dust' => true,
));
}
}

View file

@ -68,6 +68,7 @@ final class PholioMockListController extends PholioController {
array(
'title' => $title,
'device' => true,
'dust' => true,
));
}

View file

@ -12,6 +12,7 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView {
private $glyph;
private $menuContent;
private $showChrome = true;
private $layDownSomeDust = false;
private $disableConsole;
private $searchDefaultScope;
private $pageObjects = array();
@ -54,10 +55,19 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView {
return $this;
}
public function setDust($is_dusty) {
$this->layDownSomeDust = $is_dusty;
return $this;
}
public function getShowChrome() {
return $this->showChrome;
}
public function getDust() {
return $this->layDownSomeDust;
}
public function setSearchDefaultScope($search_default_scope) {
$this->searchDefaultScope = $search_default_scope;
return $this;
@ -366,6 +376,10 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView {
$classes[] = 'phabricator-chromeless-page';
}
if ($this->getDust()) {
$classes[] = 'make-me-sneeze';
}
$agent = AphrontRequest::getHTTPHeader('User-Agent');
// Try to guess the device resolution based on UA strings to avoid a flash

View file

@ -29,6 +29,14 @@ p, blockquote, th, td, button {
border: 0;
}
body.make-me-sneeze {
background: url('/rsrc/image/texture/dust_background.jpg');
}
.make-me-sneeze .phabricator-standard-page {
background: transparent;
}
table {
border-collapse: collapse;
border-spacing: 0;