mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 16:52:41 +01:00
Add a 7th column to AphrontMultiColumnView
Summary: Adds a 7th column, useful for fluid calendars. Test Plan: UIExamples Reviewers: epriestley, btrahan Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T2898 Differential Revision: https://secure.phabricator.com/D5597
This commit is contained in:
parent
482963bca3
commit
a138641795
4 changed files with 38 additions and 5 deletions
|
@ -804,7 +804,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'aphront-multi-column-view-css' =>
|
||||
array(
|
||||
'uri' => '/res/ee1159c3/rsrc/css/aphront/multi-column.css',
|
||||
'uri' => '/res/4e5ae0f3/rsrc/css/aphront/multi-column.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
|
|
|
@ -7,7 +7,7 @@ final class PhabricatorMultiColumnExample extends PhabricatorUIExample {
|
|||
}
|
||||
|
||||
public function getDescription() {
|
||||
return 'A container good for 1-6 equally spaced columns. '.
|
||||
return 'A container good for 1-7 equally spaced columns. '.
|
||||
'Fixed and Fluid layouts.';
|
||||
}
|
||||
|
||||
|
@ -63,6 +63,18 @@ final class PhabricatorMultiColumnExample extends PhabricatorUIExample {
|
|||
->setFluidLayout(true)
|
||||
->setGutter(AphrontMultiColumnView::GUTTER_SMALL);
|
||||
|
||||
$head5 = id(new PhabricatorHeaderView())
|
||||
->setHeader(pht('7 Column Fluid'));
|
||||
$layout5 = id(new AphrontMultiColumnView())
|
||||
->addColumn('Sunday')
|
||||
->addColumn('Monday')
|
||||
->addColumn('Tuesday')
|
||||
->addColumn('Wednesday')
|
||||
->addColumn('Thursday')
|
||||
->addColumn('Friday')
|
||||
->addColumn('Saturday')
|
||||
->setFluidLayout(true);
|
||||
|
||||
$wrap1 = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
|
@ -91,6 +103,13 @@ final class PhabricatorMultiColumnExample extends PhabricatorUIExample {
|
|||
),
|
||||
$layout4);
|
||||
|
||||
$wrap5 = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'ml'
|
||||
),
|
||||
$layout5);
|
||||
|
||||
return phutil_tag(
|
||||
'div',
|
||||
array(),
|
||||
|
@ -102,7 +121,9 @@ final class PhabricatorMultiColumnExample extends PhabricatorUIExample {
|
|||
$head3,
|
||||
$wrap3,
|
||||
$head4,
|
||||
$wrap4
|
||||
$wrap4,
|
||||
$head5,
|
||||
$wrap5
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,8 +32,8 @@ final class AphrontMultiColumnView extends AphrontView {
|
|||
$classes[] = 'aphront-multi-column-inner';
|
||||
$classes[] = 'grouped';
|
||||
|
||||
if (count($this->columns) > 6) {
|
||||
throw new Exception("No more than 6 columns per view.");
|
||||
if (count($this->columns) > 7) {
|
||||
throw new Exception("No more than 7 columns per view.");
|
||||
}
|
||||
|
||||
$classes[] = 'aphront-multi-column-'.count($this->columns).'-up';
|
||||
|
|
|
@ -58,6 +58,11 @@
|
|||
width: 1500px;
|
||||
}
|
||||
|
||||
.aphront-multi-column-fixed
|
||||
.aphront-multi-column-inner.aphront-multi-column-7-up {
|
||||
width: 1750px;
|
||||
}
|
||||
|
||||
.device-phone .aphront-multi-column-fixed .aphront-multi-column-inner {
|
||||
width: 100%;
|
||||
}
|
||||
|
@ -77,6 +82,8 @@
|
|||
.aphront-multi-column-fixed .aphront-multi-column-5-up
|
||||
.aphront-multi-column-column-outer,
|
||||
.aphront-multi-column-fixed .aphront-multi-column-6-up
|
||||
.aphront-multi-column-column-outer,
|
||||
.aphront-multi-column-fixed .aphront-multi-column-7-up
|
||||
.aphront-multi-column-column-outer {
|
||||
width: 240px;
|
||||
}
|
||||
|
@ -111,3 +118,8 @@
|
|||
.aphront-multi-column-column-outer {
|
||||
width: 16.6666%;
|
||||
}
|
||||
|
||||
.aphront-multi-column-fluid .aphront-multi-column-7-up
|
||||
.aphront-multi-column-column-outer {
|
||||
width: 14.2857%;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue