Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15409692
D11420.id27437.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D11420.id27437.diff
View Options
diff --git a/src/applications/phriction/controller/PhrictionDocumentController.php b/src/applications/phriction/controller/PhrictionDocumentController.php
--- a/src/applications/phriction/controller/PhrictionDocumentController.php
+++ b/src/applications/phriction/controller/PhrictionDocumentController.php
@@ -200,11 +200,14 @@
$prop_list = new PHUIPropertyGroupView();
$prop_list->addPropertyList($properties);
}
+ $action_id = celerity_generate_unique_node_id();
+ $actions->setID($action_id);
$page_content = id(new PHUIDocumentView())
->setOffset(true)
->setFontKit(PHUIDocumentView::FONT_SOURCE_SANS)
->setHeader($header)
+ ->setActionListID($action_id)
->appendChild(
array(
$actions,
diff --git a/src/view/phui/PHUIDocumentView.php b/src/view/phui/PHUIDocumentView.php
--- a/src/view/phui/PHUIDocumentView.php
+++ b/src/view/phui/PHUIDocumentView.php
@@ -16,6 +16,7 @@
private $bookdescription;
private $mobileview;
private $fontKit;
+ private $actionListID;
public function setOffset($offset) {
$this->offset = $offset;
@@ -57,6 +58,11 @@
return $this;
}
+ public function setActionListID($id) {
+ $this->actionListID = $id;
+ return $this;
+ }
+
protected function getTagAttributes() {
$classes = array();
@@ -150,6 +156,27 @@
$main_content = $this->renderChildren();
}
+ if ($this->actionListID) {
+ $icon_id = celerity_generate_unique_node_id();
+ $icon = id(new PHUIIconView())
+ ->setIconFont('fa-bars');
+ $meta = array(
+ 'map' => array(
+ $this->actionListID => 'phabricator-action-list-toggle',
+ $icon_id => 'phuix-dropdown-open',
+ ),);
+ $mobile_menu = id(new PHUIButtonView())
+ ->setTag('a')
+ ->setText(pht('Actions'))
+ ->setHref('#')
+ ->setIcon($icon)
+ ->addClass('phui-mobile-menu')
+ ->setID($icon_id)
+ ->addSigil('jx-toggle-class')
+ ->setMetadata($meta);
+ $this->header->addActionLink($mobile_menu);
+ }
+
$content_inner = phutil_tag(
'div',
array(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 4:53 AM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7383020
Default Alt Text
D11420.id27437.diff (2 KB)
Attached To
Mode
D11420: Fix mobile action menus in Phriction
Attached
Detach File
Event Timeline
Log In to Comment