mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-28 00:10:57 +01:00
[Redesign] Persisent an open form when actively running queries
Summary: Ref T8099, Adds ability to set hidden form open, which leaves form open on searches and moves anchor point. Test Plan: Run saved searches, advanced searches, and searches from main search ui. Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T8099 Differential Revision: https://secure.phabricator.com/D13308
This commit is contained in:
parent
3846a00916
commit
13e959286c
4 changed files with 13 additions and 10 deletions
|
@ -193,7 +193,8 @@ final class PhabricatorApplicationSearchController
|
|||
pht('Edit Query'),
|
||||
pht('Hide Query'),
|
||||
$form,
|
||||
$this->getApplicationURI('query/advanced/?query='.$query_key));
|
||||
$this->getApplicationURI('query/advanced/?query='.$query_key),
|
||||
(!$named_query ? true : false));
|
||||
} else {
|
||||
$box->setForm($form);
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ final class PHUIObjectBoxView extends AphrontView {
|
|||
private $hideAction;
|
||||
private $showHideHref;
|
||||
private $showHideContent;
|
||||
private $showHideOpen;
|
||||
|
||||
private $tabs = array();
|
||||
private $propertyLists = array();
|
||||
|
@ -173,11 +174,12 @@ final class PHUIObjectBoxView extends AphrontView {
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function setShowHide($show, $hide, $content, $href) {
|
||||
public function setShowHide($show, $hide, $content, $href, $open = false) {
|
||||
$this->showAction = $show;
|
||||
$this->hideAction = $hide;
|
||||
$this->showHideContent = $content;
|
||||
$this->showHideHref = $href;
|
||||
$this->showHideOpen = $open;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -205,10 +207,13 @@ final class PHUIObjectBoxView extends AphrontView {
|
|||
$show_action_id = celerity_generate_unique_node_id();
|
||||
$content_id = celerity_generate_unique_node_id();
|
||||
|
||||
$hide_style = ($this->showHideOpen ? 'display: none;': null);
|
||||
$show_style = ($this->showHideOpen ? null : 'display: none;');
|
||||
$hide_action = id(new PHUIButtonView())
|
||||
->setTag('a')
|
||||
->addSigil('reveal-content')
|
||||
->setID($hide_action_id)
|
||||
->setStyle($hide_style)
|
||||
->setHref($this->showHideHref)
|
||||
->setMetaData(
|
||||
array(
|
||||
|
@ -220,7 +225,7 @@ final class PHUIObjectBoxView extends AphrontView {
|
|||
$show_action = id(new PHUIButtonView())
|
||||
->setTag('a')
|
||||
->addSigil('reveal-content')
|
||||
->setStyle('display: none;')
|
||||
->setStyle($show_style)
|
||||
->setHref('#')
|
||||
->setID($show_action_id)
|
||||
->setMetaData(
|
||||
|
@ -239,7 +244,7 @@ final class PHUIObjectBoxView extends AphrontView {
|
|||
array(
|
||||
'class' => 'phui-object-box-hidden-content',
|
||||
'id' => $content_id,
|
||||
'style' => 'display: none;',
|
||||
'style' => $show_style,
|
||||
),
|
||||
$this->showHideContent),
|
||||
);
|
||||
|
@ -352,7 +357,7 @@ final class PHUIObjectBoxView extends AphrontView {
|
|||
$content = id(new PHUIBoxView())
|
||||
->appendChild(
|
||||
array(
|
||||
$this->anchor,
|
||||
($this->showHideOpen == false ? $this->anchor : null),
|
||||
$header,
|
||||
$this->infoView,
|
||||
$this->formErrors,
|
||||
|
@ -362,6 +367,7 @@ final class PHUIObjectBoxView extends AphrontView {
|
|||
$tabs,
|
||||
$tab_lists,
|
||||
$showhide,
|
||||
($this->showHideOpen == true ? $this->anchor : null),
|
||||
$property_lists,
|
||||
$this->table,
|
||||
$this->renderChildren(),
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
.phui-object-item-link strong {
|
||||
color: {$fire};
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.phui-source-fragment {
|
||||
|
|
|
@ -97,11 +97,6 @@ body .phui-header-shell.phui-bleed-header
|
|||
font-size: 13px;
|
||||
}
|
||||
|
||||
.device-phone .phui-object-box .phui-header-view .phui-header-action-links {
|
||||
margin-right: 4px;
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
.device-phone .phui-header-action-link .phui-button-text {
|
||||
visibility: hidden;
|
||||
width: 0;
|
||||
|
|
Loading…
Reference in a new issue