Page MenuHomePhabricator

D12220.diff
No OneTemporary

D12220.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -7,7 +7,7 @@
*/
return array(
'names' => array(
- 'core.pkg.css' => '6088c5b0',
+ 'core.pkg.css' => 'e7553b99',
'core.pkg.js' => '0c88e7f6',
'darkconsole.pkg.js' => '8ab24e01',
'differential.pkg.css' => '3500921f',
@@ -130,7 +130,7 @@
'rsrc/css/phui/phui-document.css' => '0f83a7df',
'rsrc/css/phui/phui-feed-story.css' => 'c9f3a0b5',
'rsrc/css/phui/phui-fontkit.css' => '1fa79503',
- 'rsrc/css/phui/phui-form-view.css' => '78d729fe',
+ 'rsrc/css/phui/phui-form-view.css' => '5f025c27',
'rsrc/css/phui/phui-form.css' => 'f535f938',
'rsrc/css/phui/phui-header-view.css' => '083669db',
'rsrc/css/phui/phui-icon.css' => 'd35aa857',
@@ -784,7 +784,7 @@
'phui-font-icon-base-css' => '3dad2ae3',
'phui-fontkit-css' => '1fa79503',
'phui-form-css' => 'f535f938',
- 'phui-form-view-css' => '78d729fe',
+ 'phui-form-view-css' => '5f025c27',
'phui-header-view-css' => '083669db',
'phui-icon-view-css' => 'd35aa857',
'phui-image-mask-css' => '5a8b09c8',
diff --git a/src/view/form/control/AphrontFormCheckboxControl.php b/src/view/form/control/AphrontFormCheckboxControl.php
--- a/src/view/form/control/AphrontFormCheckboxControl.php
+++ b/src/view/form/control/AphrontFormCheckboxControl.php
@@ -19,7 +19,11 @@
}
protected function renderInput() {
- $rows = array();
+ $cells = array();
+ $split = false;
+ if (count($this->boxes) > 5) {
+ $split = true;
+ }
foreach ($this->boxes as $box) {
$id = celerity_generate_unique_node_id();
$checkbox = phutil_tag(
@@ -38,14 +42,34 @@
'for' => $id,
),
$box['label']);
- $rows[] = phutil_tag('tr', array(), array(
- phutil_tag('td', array(), $checkbox),
- phutil_tag('th', array(), $label),
- ));
+ $cells[] = phutil_tag(
+ 'td',
+ array(),
+ array(
+ $checkbox,
+ $label,
+ ));
}
+ $rows = array();
+ for ($i = 0; $i < count($cells); $i++) {
+ $tds = array();
+ $tds[] = $cells[$i];
+ if ($split) {
+ $i++;
+ if (isset($cells[$i])) {
+ $tds[] = $cells[$i];
+ } else {
+ $tds[] = phutil_tag('td', array());
+ }
+ }
+ $rows[] = phutil_tag('tr', array(), $tds);
+ }
+
return phutil_tag(
'table',
- array('class' => 'aphront-form-control-checkbox-layout'),
+ array(
+ 'class' => 'aphront-form-control-checkbox-layout',
+ ),
$rows);
}
diff --git a/webroot/rsrc/css/phui/phui-form-view.css b/webroot/rsrc/css/phui/phui-form-view.css
--- a/webroot/rsrc/css/phui/phui-form-view.css
+++ b/webroot/rsrc/css/phui/phui-form-view.css
@@ -218,18 +218,23 @@
color: {$darkgreytext};
}
+table.aphront-form-control-checkbox-layout td {
+ padding: 2px 8px 2px 0;
+ min-width: 160px;
+}
-table.aphront-form-control-checkbox-layout th {
- padding-top: 2px;
- padding-left: 8px;
- padding-bottom: 4px;
+table.aphront-form-control-checkbox-layout label {
+ padding: 2px 8px 4px 8px;
color: {$darkgreytext};
+ white-space: nowrap;
+ cursor: pointer;
}
.aphront-form-control-radio-layout td input,
.aphront-form-control-checkbox-layout td input {
margin-top: 4px;
width: auto;
+ cursor: pointer;
}
.aphront-form-control-radio-layout label.disabled,

File Metadata

Mime Type
text/plain
Expires
Wed, May 8, 9:28 PM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6273056
Default Alt Text
D12220.diff (3 KB)

Event Timeline