1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +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:
Chad Little 2015-06-16 13:10:24 -07:00 committed by epriestley
parent 3846a00916
commit 13e959286c
4 changed files with 13 additions and 10 deletions

View file

@ -193,7 +193,8 @@ final class PhabricatorApplicationSearchController
pht('Edit Query'), pht('Edit Query'),
pht('Hide Query'), pht('Hide Query'),
$form, $form,
$this->getApplicationURI('query/advanced/?query='.$query_key)); $this->getApplicationURI('query/advanced/?query='.$query_key),
(!$named_query ? true : false));
} else { } else {
$box->setForm($form); $box->setForm($form);
} }

View file

@ -24,6 +24,7 @@ final class PHUIObjectBoxView extends AphrontView {
private $hideAction; private $hideAction;
private $showHideHref; private $showHideHref;
private $showHideContent; private $showHideContent;
private $showHideOpen;
private $tabs = array(); private $tabs = array();
private $propertyLists = array(); private $propertyLists = array();
@ -173,11 +174,12 @@ final class PHUIObjectBoxView extends AphrontView {
return $this; return $this;
} }
public function setShowHide($show, $hide, $content, $href) { public function setShowHide($show, $hide, $content, $href, $open = false) {
$this->showAction = $show; $this->showAction = $show;
$this->hideAction = $hide; $this->hideAction = $hide;
$this->showHideContent = $content; $this->showHideContent = $content;
$this->showHideHref = $href; $this->showHideHref = $href;
$this->showHideOpen = $open;
return $this; return $this;
} }
@ -205,10 +207,13 @@ final class PHUIObjectBoxView extends AphrontView {
$show_action_id = celerity_generate_unique_node_id(); $show_action_id = celerity_generate_unique_node_id();
$content_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()) $hide_action = id(new PHUIButtonView())
->setTag('a') ->setTag('a')
->addSigil('reveal-content') ->addSigil('reveal-content')
->setID($hide_action_id) ->setID($hide_action_id)
->setStyle($hide_style)
->setHref($this->showHideHref) ->setHref($this->showHideHref)
->setMetaData( ->setMetaData(
array( array(
@ -220,7 +225,7 @@ final class PHUIObjectBoxView extends AphrontView {
$show_action = id(new PHUIButtonView()) $show_action = id(new PHUIButtonView())
->setTag('a') ->setTag('a')
->addSigil('reveal-content') ->addSigil('reveal-content')
->setStyle('display: none;') ->setStyle($show_style)
->setHref('#') ->setHref('#')
->setID($show_action_id) ->setID($show_action_id)
->setMetaData( ->setMetaData(
@ -239,7 +244,7 @@ final class PHUIObjectBoxView extends AphrontView {
array( array(
'class' => 'phui-object-box-hidden-content', 'class' => 'phui-object-box-hidden-content',
'id' => $content_id, 'id' => $content_id,
'style' => 'display: none;', 'style' => $show_style,
), ),
$this->showHideContent), $this->showHideContent),
); );
@ -352,7 +357,7 @@ final class PHUIObjectBoxView extends AphrontView {
$content = id(new PHUIBoxView()) $content = id(new PHUIBoxView())
->appendChild( ->appendChild(
array( array(
$this->anchor, ($this->showHideOpen == false ? $this->anchor : null),
$header, $header,
$this->infoView, $this->infoView,
$this->formErrors, $this->formErrors,
@ -362,6 +367,7 @@ final class PHUIObjectBoxView extends AphrontView {
$tabs, $tabs,
$tab_lists, $tab_lists,
$showhide, $showhide,
($this->showHideOpen == true ? $this->anchor : null),
$property_lists, $property_lists,
$this->table, $this->table,
$this->renderChildren(), $this->renderChildren(),

View file

@ -4,6 +4,7 @@
.phui-object-item-link strong { .phui-object-item-link strong {
color: {$fire}; color: {$fire};
text-decoration: underline;
} }
.phui-source-fragment { .phui-source-fragment {

View file

@ -97,11 +97,6 @@ body .phui-header-shell.phui-bleed-header
font-size: 13px; 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 { .device-phone .phui-header-action-link .phui-button-text {
visibility: hidden; visibility: hidden;
width: 0; width: 0;