mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-18 10:41:08 +01:00
Conpherence - make widget selector be a fun JS-based menu
Summary: Ref T3155. Also re-adds the ability to update Conpherence titles by letting user click the title and fill out a little dialogue. Also fixes a bunch of random bugs and what have you. I tried to make the javascript less mysterious by trying to code what's actually happening more explicitly. Still a work in progress all over the place but a good stopping point for feedback. Test Plan: played around with Conpherence. In particular, went to /conpherence/ and re-sized and went to /conpherence/X/ and re-sized. Also loaded up my no conpherneces user. Reviewers: epriestley Reviewed By: epriestley CC: chad, aran, Korvin Maniphest Tasks: T3155 Differential Revision: https://secure.phabricator.com/D6022
This commit is contained in:
parent
6dda35897a
commit
27ad838939
20 changed files with 331 additions and 327 deletions
|
@ -918,7 +918,7 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'conpherence-header-pane-css' =>
|
'conpherence-header-pane-css' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/762c199d/rsrc/css/application/conpherence/header-pane.css',
|
'uri' => '/res/6d7bfc7e/rsrc/css/application/conpherence/header-pane.css',
|
||||||
'type' => 'css',
|
'type' => 'css',
|
||||||
'requires' =>
|
'requires' =>
|
||||||
array(
|
array(
|
||||||
|
@ -927,7 +927,7 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'conpherence-menu-css' =>
|
'conpherence-menu-css' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/9991071e/rsrc/css/application/conpherence/menu.css',
|
'uri' => '/res/c955650e/rsrc/css/application/conpherence/menu.css',
|
||||||
'type' => 'css',
|
'type' => 'css',
|
||||||
'requires' =>
|
'requires' =>
|
||||||
array(
|
array(
|
||||||
|
@ -936,7 +936,7 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'conpherence-message-pane-css' =>
|
'conpherence-message-pane-css' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/9b319b64/rsrc/css/application/conpherence/message-pane.css',
|
'uri' => '/res/383af93e/rsrc/css/application/conpherence/message-pane.css',
|
||||||
'type' => 'css',
|
'type' => 'css',
|
||||||
'requires' =>
|
'requires' =>
|
||||||
array(
|
array(
|
||||||
|
@ -954,7 +954,7 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'conpherence-widget-pane-css' =>
|
'conpherence-widget-pane-css' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/c0131a8b/rsrc/css/application/conpherence/widget-pane.css',
|
'uri' => '/res/7aaa78c5/rsrc/css/application/conpherence/widget-pane.css',
|
||||||
'type' => 'css',
|
'type' => 'css',
|
||||||
'requires' =>
|
'requires' =>
|
||||||
array(
|
array(
|
||||||
|
@ -1303,7 +1303,7 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'javelin-behavior-conpherence-menu' =>
|
'javelin-behavior-conpherence-menu' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/2bffa665/rsrc/js/application/conpherence/behavior-menu.js',
|
'uri' => '/res/a7f3be10/rsrc/js/application/conpherence/behavior-menu.js',
|
||||||
'type' => 'js',
|
'type' => 'js',
|
||||||
'requires' =>
|
'requires' =>
|
||||||
array(
|
array(
|
||||||
|
@ -1335,7 +1335,7 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'javelin-behavior-conpherence-widget-pane' =>
|
'javelin-behavior-conpherence-widget-pane' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/d2063fd4/rsrc/js/application/conpherence/behavior-widget-pane.js',
|
'uri' => '/res/bc139f8e/rsrc/js/application/conpherence/behavior-widget-pane.js',
|
||||||
'type' => 'js',
|
'type' => 'js',
|
||||||
'requires' =>
|
'requires' =>
|
||||||
array(
|
array(
|
||||||
|
@ -1346,6 +1346,8 @@ celerity_register_resource_map(array(
|
||||||
4 => 'javelin-util',
|
4 => 'javelin-util',
|
||||||
5 => 'phabricator-notification',
|
5 => 'phabricator-notification',
|
||||||
6 => 'javelin-behavior-device',
|
6 => 'javelin-behavior-device',
|
||||||
|
7 => 'phabricator-dropdown-menu',
|
||||||
|
8 => 'phabricator-menu-item',
|
||||||
),
|
),
|
||||||
'disk' => '/rsrc/js/application/conpherence/behavior-widget-pane.js',
|
'disk' => '/rsrc/js/application/conpherence/behavior-widget-pane.js',
|
||||||
),
|
),
|
||||||
|
|
|
@ -25,7 +25,15 @@ abstract class ConpherenceController extends PhabricatorController {
|
||||||
->setName(pht('New Message'))
|
->setName(pht('New Message'))
|
||||||
->setHref($this->getApplicationURI('new/'))
|
->setHref($this->getApplicationURI('new/'))
|
||||||
->setIcon('create')
|
->setIcon('create')
|
||||||
->setWorkflow(true));
|
->setWorkflow(true))
|
||||||
|
->addAction(
|
||||||
|
id(new PhabricatorMenuItemView())
|
||||||
|
->setName(pht('Thread'))
|
||||||
|
->setHref('#')
|
||||||
|
->setIcon('action-menu')
|
||||||
|
->setStyle('display: none;')
|
||||||
|
->addClass('device-widgets-selector')
|
||||||
|
->addSigil('device-widgets-selector'));
|
||||||
return $crumbs;
|
return $crumbs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +46,9 @@ abstract class ConpherenceController extends PhabricatorController {
|
||||||
}
|
}
|
||||||
$crumbs->addCrumb(
|
$crumbs->addCrumb(
|
||||||
id(new PhabricatorCrumbView())
|
id(new PhabricatorCrumbView())
|
||||||
->setName($title));
|
->setName($title)
|
||||||
|
->setHref($this->getApplicationURI('update/'.$conpherence->getID().'/'))
|
||||||
|
->setWorkflow(true));
|
||||||
|
|
||||||
return $crumbs;
|
return $crumbs;
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ final class ConpherenceUpdateController
|
||||||
case ConpherenceUpdateActions::METADATA:
|
case ConpherenceUpdateActions::METADATA:
|
||||||
$xactions = array();
|
$xactions = array();
|
||||||
$updated = false;
|
$updated = false;
|
||||||
// all other metadata updates are continue requests
|
// all metadata updates are continue requests
|
||||||
if (!$request->isContinueRequest()) {
|
if (!$request->isContinueRequest()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -103,6 +103,7 @@ final class ConpherenceUpdateController
|
||||||
->setTransactionType(ConpherenceTransactionType::TYPE_TITLE)
|
->setTransactionType(ConpherenceTransactionType::TYPE_TITLE)
|
||||||
->setNewValue($title);
|
->setNewValue($title);
|
||||||
$updated = true;
|
$updated = true;
|
||||||
|
$response_mode = 'redirect';
|
||||||
}
|
}
|
||||||
if (!$updated) {
|
if (!$updated) {
|
||||||
$errors[] = pht(
|
$errors[] = pht(
|
||||||
|
|
|
@ -91,10 +91,14 @@ final class ConpherenceViewController extends
|
||||||
->setReplyForm($form)
|
->setReplyForm($form)
|
||||||
->setRole('thread');
|
->setRole('thread');
|
||||||
|
|
||||||
|
$title = $conpherence->getTitle();
|
||||||
|
if (!$title) {
|
||||||
|
$title = pht('Conpherence');
|
||||||
|
}
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
$layout,
|
$layout,
|
||||||
array(
|
array(
|
||||||
'title' => $conpherence->getTitle(),
|
'title' => $title,
|
||||||
'device' => true,
|
'device' => true,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,83 +69,14 @@ final class ConpherenceWidgetController extends
|
||||||
$widgets[] = phutil_tag(
|
$widgets[] = phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
array(
|
array(
|
||||||
'class' => 'widgets-header'
|
'class' => 'widgets-header',
|
||||||
),
|
),
|
||||||
phutil_tag(
|
id(new PhabricatorActionHeaderView())
|
||||||
'div',
|
->setHeaderColor(PhabricatorActionHeaderView::HEADER_GREY)
|
||||||
array(
|
->setHeaderTitle('')
|
||||||
'class' => 'widgets-header-icon-holder'
|
->setHeaderHref('#')
|
||||||
),
|
->setDropdown(true)
|
||||||
array(
|
->addHeaderSigil('widgets-selector'));
|
||||||
javelin_tag(
|
|
||||||
'a',
|
|
||||||
array(
|
|
||||||
'sigil' => 'conpherence-change-widget',
|
|
||||||
'meta' => array(
|
|
||||||
'widget' => 'conpherence-menu-pane',
|
|
||||||
),
|
|
||||||
'id' => 'conpherence-menu-pane-toggle',
|
|
||||||
'class' => 'sprite-conpherence conpherence_list_off',
|
|
||||||
),
|
|
||||||
''),
|
|
||||||
javelin_tag(
|
|
||||||
'a',
|
|
||||||
array(
|
|
||||||
'sigil' => 'conpherence-change-widget',
|
|
||||||
'meta' => array(
|
|
||||||
'widget' => 'conpherence-message-pane',
|
|
||||||
),
|
|
||||||
'id' => 'conpherence-message-pane-toggle',
|
|
||||||
'class' => 'sprite-conpherence conpherence_conversation_off',
|
|
||||||
),
|
|
||||||
''),
|
|
||||||
javelin_tag(
|
|
||||||
'a',
|
|
||||||
array(
|
|
||||||
'sigil' => 'conpherence-change-widget',
|
|
||||||
'meta' => array(
|
|
||||||
'widget' => 'widgets-people',
|
|
||||||
),
|
|
||||||
'id' => 'widgets-people-toggle',
|
|
||||||
'class' =>
|
|
||||||
'sprite-conpherence conpherence_people_on conpherence_people_off'
|
|
||||||
),
|
|
||||||
''),
|
|
||||||
javelin_tag(
|
|
||||||
'a',
|
|
||||||
array(
|
|
||||||
'sigil' => 'conpherence-change-widget',
|
|
||||||
'meta' => array(
|
|
||||||
'widget' => 'widgets-files',
|
|
||||||
),
|
|
||||||
'id' => 'widgets-files-toggle',
|
|
||||||
'class' =>
|
|
||||||
'sprite-conpherence conpherence_files_off'
|
|
||||||
),
|
|
||||||
''),
|
|
||||||
javelin_tag(
|
|
||||||
'a',
|
|
||||||
array(
|
|
||||||
'sigil' => 'conpherence-change-widget',
|
|
||||||
'meta' => array(
|
|
||||||
'widget' => 'widgets-calendar',
|
|
||||||
),
|
|
||||||
'id' => 'widgets-calendar-toggle',
|
|
||||||
'class' => 'sprite-conpherence conpherence_calendar_off',
|
|
||||||
),
|
|
||||||
''),
|
|
||||||
javelin_tag(
|
|
||||||
'a',
|
|
||||||
array(
|
|
||||||
'sigil' => 'conpherence-change-widget',
|
|
||||||
'meta' => array(
|
|
||||||
'widget' => 'widgets-settings',
|
|
||||||
),
|
|
||||||
'id' => 'widgets-settings-toggle',
|
|
||||||
'class' => 'sprite-conpherence conpherence_settings_off',
|
|
||||||
),
|
|
||||||
'')
|
|
||||||
)));
|
|
||||||
$user = $this->getRequest()->getUser();
|
$user = $this->getRequest()->getUser();
|
||||||
// now the widget bodies
|
// now the widget bodies
|
||||||
$widgets[] = javelin_tag(
|
$widgets[] = javelin_tag(
|
||||||
|
|
|
@ -157,9 +157,10 @@ final class ConpherenceThread extends ConpherenceDAO
|
||||||
$lucky_handle = reset($handles);
|
$lucky_handle = reset($handles);
|
||||||
}
|
}
|
||||||
|
|
||||||
$title = $this->getTitle();
|
$title = $js_title = $this->getTitle();
|
||||||
if (!$title) {
|
if (!$title) {
|
||||||
$title = $lucky_handle->getName();
|
$title = $lucky_handle->getName();
|
||||||
|
$js_title = pht('Conpherence');
|
||||||
}
|
}
|
||||||
$img_src = $lucky_handle->getImageURI();
|
$img_src = $lucky_handle->getImageURI();
|
||||||
|
|
||||||
|
@ -191,6 +192,7 @@ final class ConpherenceThread extends ConpherenceDAO
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'title' => $title,
|
'title' => $title,
|
||||||
|
'js_title' => $js_title,
|
||||||
'subtitle' => $subtitle,
|
'subtitle' => $subtitle,
|
||||||
'unread_count' => $unread_count,
|
'unread_count' => $unread_count,
|
||||||
'epoch' => $this->getDateModified(),
|
'epoch' => $this->getDateModified(),
|
||||||
|
|
|
@ -85,6 +85,15 @@ final class ConpherenceFileWidgetView extends ConpherenceWidgetView {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($files)) {
|
||||||
|
$files_html[] = javelin_tag(
|
||||||
|
'div',
|
||||||
|
array(
|
||||||
|
'class' => 'no-files',
|
||||||
|
'sigil' => 'no-files'),
|
||||||
|
pht('No files.'));
|
||||||
|
}
|
||||||
|
|
||||||
return phutil_tag(
|
return phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
array('class' => 'file-list'),
|
array('class' => 'file-list'),
|
||||||
|
|
|
@ -65,40 +65,32 @@ final class ConpherenceLayoutView extends AphrontView {
|
||||||
'hasWidgets' => false,
|
'hasWidgets' => false,
|
||||||
));
|
));
|
||||||
|
|
||||||
$all_views = 1;
|
|
||||||
$devices_only = 0;
|
|
||||||
Javelin::initBehavior(
|
Javelin::initBehavior(
|
||||||
'conpherence-widget-pane',
|
'conpherence-widget-pane',
|
||||||
array(
|
array(
|
||||||
'allViews' => $all_views,
|
'selectChar' => "\xE2\x96\xBC",
|
||||||
'devicesOnly' => $devices_only,
|
'widgetRegistry' => array(
|
||||||
'widgetRegistery' => array(
|
'conpherence-message-pane' => array(
|
||||||
'conpherence-menu-pane' => $devices_only,
|
'name' => pht('Thread'),
|
||||||
'conpherence-message-pane' => $devices_only,
|
'deviceOnly' => true,
|
||||||
'widgets-people' => $all_views,
|
),
|
||||||
'widgets-files' => $all_views,
|
'widgets-people' => array(
|
||||||
'widgets-calendar' => $all_views,
|
'name' => pht('Participants'),
|
||||||
'widgets-settings' => $all_views,
|
'deviceOnly' => false,
|
||||||
),
|
),
|
||||||
'widgetExtraNodes' => array(
|
'widgets-files' => array(
|
||||||
'conpherence-menu-pane' => array(
|
'name' => pht('Files'),
|
||||||
array(
|
'deviceOnly' => false,
|
||||||
'tagname' => 'div',
|
),
|
||||||
'sigil' => 'phabricator-nav-column-background',
|
'widgets-calendar' => array(
|
||||||
'showstyle' => 'block',
|
'name' => pht('Calendar'),
|
||||||
'hidestyle' => 'none',
|
'deviceOnly' => false,
|
||||||
'desktopstyle' => 'block'),
|
),
|
||||||
)
|
'widgets-settings' => array(
|
||||||
),
|
'name' => pht('Settings'),
|
||||||
'widgetToggleMap' => array(
|
'deviceOnly' => false,
|
||||||
'conpherence-menu-pane' => 'conpherence_list_on',
|
),
|
||||||
'conpherence-message-pane' => 'conpherence_conversation_on',
|
)));
|
||||||
'widgets-people' => 'conpherence_people_on',
|
|
||||||
'widgets-files' => 'conpherence_files_on',
|
|
||||||
'widgets-calendar' => 'conpherence_calendar_on',
|
|
||||||
'widgets-settings' => 'conpherence_settings_on',
|
|
||||||
)
|
|
||||||
));
|
|
||||||
|
|
||||||
return javelin_tag(
|
return javelin_tag(
|
||||||
'div',
|
'div',
|
||||||
|
|
|
@ -97,7 +97,7 @@ final class ConpherenceThreadListView extends AphrontView {
|
||||||
->addSigil('conpherence-menu-click')
|
->addSigil('conpherence-menu-click')
|
||||||
->setMetadata(
|
->setMetadata(
|
||||||
array(
|
array(
|
||||||
'title' => $title,
|
'title' => $data['js_title'],
|
||||||
'id' => $thread->getID(),
|
'id' => $thread->getID(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,8 +65,8 @@ abstract class AphrontTagView extends AphrontView {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getClass() {
|
public function getClasses() {
|
||||||
return $this->class;
|
return $this->classes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setID($id) {
|
public function setID($id) {
|
||||||
|
|
|
@ -15,9 +15,16 @@ final class PhabricatorActionHeaderView extends AphrontView {
|
||||||
private $headerTitle;
|
private $headerTitle;
|
||||||
private $headerHref;
|
private $headerHref;
|
||||||
private $headerIcon;
|
private $headerIcon;
|
||||||
|
private $headerSigils = array();
|
||||||
private $actions = array();
|
private $actions = array();
|
||||||
private $iconColor = PhabricatorActionHeaderView::ICON_GREY;
|
private $iconColor = PhabricatorActionHeaderView::ICON_GREY;
|
||||||
private $headerColor;
|
private $headerColor;
|
||||||
|
private $dropdown;
|
||||||
|
|
||||||
|
public function setDropdown($dropdown) {
|
||||||
|
$this->dropdown = $dropdown;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function addAction(PHUIIconView $action) {
|
public function addAction(PHUIIconView $action) {
|
||||||
$this->actions[] = $action;
|
$this->actions[] = $action;
|
||||||
|
@ -39,6 +46,11 @@ final class PhabricatorActionHeaderView extends AphrontView {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function addHeaderSigil($sigil) {
|
||||||
|
$this->headerSigils[] = $sigil;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function setHeaderIcon($minicon) {
|
public function setHeaderIcon($minicon) {
|
||||||
$this->headerIcon = $minicon;
|
$this->headerIcon = $minicon;
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -66,6 +78,10 @@ final class PhabricatorActionHeaderView extends AphrontView {
|
||||||
$classes[] = 'gradient-'.$this->headerColor.'-header';
|
$classes[] = 'gradient-'.$this->headerColor.'-header';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->dropdown) {
|
||||||
|
$classes[] = 'dropdown';
|
||||||
|
}
|
||||||
|
|
||||||
$action_list = array();
|
$action_list = array();
|
||||||
foreach ($this->actions as $action) {
|
foreach ($this->actions as $action) {
|
||||||
$action_list[] = phutil_tag(
|
$action_list[] = phutil_tag(
|
||||||
|
@ -89,11 +105,12 @@ final class PhabricatorActionHeaderView extends AphrontView {
|
||||||
|
|
||||||
$header_title = $this->headerTitle;
|
$header_title = $this->headerTitle;
|
||||||
if ($this->headerHref) {
|
if ($this->headerHref) {
|
||||||
$header_title = phutil_tag(
|
$header_title = javelin_tag(
|
||||||
'a',
|
'a',
|
||||||
array(
|
array(
|
||||||
'class' => 'phabricator-action-header-link',
|
'class' => 'phabricator-action-header-link',
|
||||||
'href' => $this->headerHref
|
'href' => $this->headerHref,
|
||||||
|
'sigil' => implode(' ', $this->headerSigils)
|
||||||
),
|
),
|
||||||
$this->headerTitle);
|
$this->headerTitle);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,12 @@ final class PhabricatorCrumbView extends AphrontView {
|
||||||
private $href;
|
private $href;
|
||||||
private $icon;
|
private $icon;
|
||||||
private $isLastCrumb;
|
private $isLastCrumb;
|
||||||
|
private $workflow;
|
||||||
|
|
||||||
|
public function setWorkflow($workflow) {
|
||||||
|
$this->workflow = $workflow;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function setName($name) {
|
public function setName($name) {
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
|
@ -71,14 +77,13 @@ final class PhabricatorCrumbView extends AphrontView {
|
||||||
$classes[] = 'phabricator-last-crumb';
|
$classes[] = 'phabricator-last-crumb';
|
||||||
}
|
}
|
||||||
|
|
||||||
return phutil_tag(
|
return javelin_tag(
|
||||||
$this->href ? 'a' : 'span',
|
$this->href ? 'a' : 'span',
|
||||||
array(
|
array(
|
||||||
'href' => $this->href,
|
'sigil' => $this->workflow ? 'workflow' : null,
|
||||||
'class' => implode(' ', $classes),
|
'href' => $this->href,
|
||||||
),
|
'class' => implode(' ', $classes),
|
||||||
array($icon, $name, $divider));
|
),
|
||||||
|
array($icon, $name, $divider));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,12 +50,19 @@ final class PhabricatorCrumbsView extends AphrontView {
|
||||||
$action->getName()
|
$action->getName()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$action_sigils = $action->getSigils();
|
||||||
|
if ($action->getWorkflow()) {
|
||||||
|
$action_sigils[] = 'workflow';
|
||||||
|
}
|
||||||
|
$action_classes = $action->getClasses();
|
||||||
|
$action_classes[] = 'phabricator-crumbs-action';
|
||||||
$actions[] = javelin_tag(
|
$actions[] = javelin_tag(
|
||||||
'a',
|
'a',
|
||||||
array(
|
array(
|
||||||
'href' => $action->getHref(),
|
'href' => $action->getHref(),
|
||||||
'class' => 'phabricator-crumbs-action',
|
'class' => implode(' ', $action_classes),
|
||||||
'sigil' => $action->getWorkflow() ? 'workflow' : null,
|
'sigil' => implode(' ', $action_sigils),
|
||||||
|
'style' => $action->getStyle()
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
$icon,
|
$icon,
|
||||||
|
|
0
webroot/rsrc/css/application/conpherence/header-pane.cs
Normal file
0
webroot/rsrc/css/application/conpherence/header-pane.cs
Normal file
|
@ -3,5 +3,4 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.device .conpherence-header-pane {
|
.device .conpherence-header-pane {
|
||||||
display: none;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,44 +22,49 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.conpherence-menu-pane {
|
.conpherence-menu-pane {
|
||||||
width: 300px;
|
width: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
|
.device-desktop .conpherence-layout .conpherence-menu-pane,
|
||||||
|
.device-desktop .conpherence-layout .phabricator-nav-column-background {
|
||||||
|
width: 280px;
|
||||||
|
}
|
||||||
|
.device .conpherence-menu-pane {
|
||||||
|
top: 41px;
|
||||||
|
}
|
||||||
|
.device .conpherence-role-list .conpherence-menu-pane {
|
||||||
|
top: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
.device-phone .conpherence-menu-pane {
|
.device-phone .conpherence-menu-pane {
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.conpherence-content-pane {
|
|
||||||
margin-left: 300px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.conpherence-layout .phabricator-nav-column-background {
|
.conpherence-layout .phabricator-nav-column-background {
|
||||||
display: block;
|
display: block;
|
||||||
width: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.device .conpherence-menu-pane {
|
|
||||||
top: 41px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.device .phabricator-nav-column-background {
|
|
||||||
top: 86px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.device .conpherence-menu-pane,
|
|
||||||
.device .phabricator-nav-column-background {
|
|
||||||
display: none;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device .conpherence-content-pane {
|
.device .phabricator-nav-column-background {
|
||||||
margin-left: 0;
|
top: 44px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.device .conpherence-role-thread .conpherence-menu-pane,
|
||||||
|
.device .conpherence-role-thread .phabricator-nav-column-background {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.device-desktop .conpherence-content-pane {
|
||||||
|
margin-left: 280px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.conpherence-content-pane {
|
||||||
|
margin-left: 0px;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.conpherence-menu .conpherence-menu-item-view {
|
.conpherence-menu .conpherence-menu-item-view {
|
||||||
|
@ -106,7 +111,7 @@
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
text-shadow: 0px 1px 1px #000000;
|
text-shadow: 0px 1px 1px #000000;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
width: 160px;
|
width: 140px;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,6 +156,6 @@
|
||||||
border-top: solid 1px #3B3D3E;
|
border-top: solid 1px #3B3D3E;
|
||||||
padding: 20px 0;
|
padding: 20px 0;
|
||||||
margin: 0px auto;
|
margin: 0px auto;
|
||||||
width: 300px;
|
width: 280px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
.conpherence-message-pane {
|
.conpherence-message-pane {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 300px;
|
left: 280px;
|
||||||
right: 281px;
|
right: 241px;
|
||||||
top: 76px;
|
top: 76px;
|
||||||
min-width: 300px;
|
min-width: 300px;
|
||||||
width: auto;
|
width: auto;
|
||||||
|
@ -15,7 +15,6 @@
|
||||||
.device .conpherence-message-pane {
|
.device .conpherence-message-pane {
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 85px;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,8 +30,8 @@
|
||||||
|
|
||||||
.conpherence-message-pane .conpherence-messages {
|
.conpherence-message-pane .conpherence-messages {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 300px;
|
left: 280px;
|
||||||
right: 281px;
|
right: 241px;
|
||||||
top: 76px;
|
top: 76px;
|
||||||
bottom: 190px;
|
bottom: 190px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
@ -43,7 +42,6 @@
|
||||||
.device .conpherence-message-pane .conpherence-messages {
|
.device .conpherence-message-pane .conpherence-messages {
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 85px;
|
|
||||||
bottom: 3em;
|
bottom: 3em;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
@ -56,8 +54,8 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 300px;
|
left: 280px;
|
||||||
right: 281px;
|
right: 241px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device .conpherence-message-pane .remarkup-assist-bar {
|
.device .conpherence-message-pane .remarkup-assist-bar {
|
||||||
|
|
|
@ -5,13 +5,12 @@
|
||||||
.conpherence-widget-pane {
|
.conpherence-widget-pane {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
top: 76px;
|
top: 74px;
|
||||||
width: 280px;
|
width: 240px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-width: 0 0 0 1px;
|
border-width: 0 0 0 1px;
|
||||||
border-color: #CCC;
|
border-color: #CCC;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
background: url('/rsrc/image/texture/dust_background.jpeg');
|
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
|
@ -23,69 +22,61 @@
|
||||||
|
|
||||||
.conpherence-widget-pane .aphront-form-input {
|
.conpherence-widget-pane .aphront-form-input {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
width: 100%;
|
width: 85%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.conpherence-widget-pane .aphront-form-inset {
|
.conpherence-widget-pane .aphront-form-inset {
|
||||||
border: 0;
|
border: 0;
|
||||||
background: url('/rsrc/image/texture/dust_background.jpeg');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.conpherence-widget-pane .widgets-header {
|
.conpherence-widget-pane .widgets-header {
|
||||||
background-color: #d8dce2;
|
background: #F5F5F5;
|
||||||
box-shadow: 0px 2px 2px rgba(0,0,0,0.15);
|
border-bottom: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.conpherence-widget-pane .widgets-header .widgets-header-icon-holder {
|
.device .conpherence-widget-pane .widgets-header {
|
||||||
height: 40px;
|
|
||||||
width: 280px;
|
|
||||||
margin: 0px auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.device-desktop .conpherence-widget-pane .widgets-header
|
|
||||||
.widgets-header-icon-holder {
|
|
||||||
width: 175px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.conpherence-widget-pane .widgets-header .sprite-conpherence {
|
|
||||||
display: block;
|
|
||||||
width: 29px;
|
|
||||||
height: 34px;
|
|
||||||
margin: 4px 0px 0px 14px;
|
|
||||||
float: left;
|
|
||||||
clear: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.conpherence-widget-pane .widgets-header .conpherence_list_on,
|
|
||||||
.conpherence-widget-pane .widgets-header .conpherence_conversation_on,
|
|
||||||
.conpherence-widget-pane .widgets-header .conpherence_people_on,
|
|
||||||
.conpherence-widget-pane .widgets-header .conpherence_files_on,
|
|
||||||
.conpherence-widget-pane .widgets-header .conpherence_calendar_on,
|
|
||||||
.conpherence-widget-pane .widgets-header .conpherence_settings_on {
|
|
||||||
border-bottom: 3px solid #525252;
|
|
||||||
}
|
|
||||||
|
|
||||||
.device-desktop .conpherence-widget-pane .widgets-header
|
|
||||||
#conpherence-menu-pane-toggle,
|
|
||||||
.device-desktop .conpherence-widget-pane .widgets-header
|
|
||||||
#conpherence-message-pane-toggle {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.conpherence-widget-pane .widgets-header .caret {
|
||||||
|
float: none;
|
||||||
|
height: 0px;
|
||||||
|
width: 0px;
|
||||||
|
margin-right: 0px;
|
||||||
|
border-top-color: #000;
|
||||||
|
}
|
||||||
|
.conpherence-widget-pane .widgets-header a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.device-desktop .conpherence-layout .device-widgets-selector {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-menu-frame {
|
||||||
|
width: 229px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.conpherence-widget-pane .widgets-body {
|
.conpherence-widget-pane .widgets-body {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
top: 116px;
|
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
top: 74px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device .conpherence-widget-pane .widgets-body {
|
.device-desktop .conpherence-widget-pane .widgets-body {
|
||||||
top: 85px;
|
top: 104px;
|
||||||
|
width: 280px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* files widget */
|
/* files widget */
|
||||||
|
|
||||||
|
.conpherence-widget-pane #widgets-files .no-files {
|
||||||
|
width: 200px;
|
||||||
|
padding: 20px;
|
||||||
|
text-align: center;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
.conpherence-widget-pane #widgets-files .file-entry {
|
.conpherence-widget-pane #widgets-files .file-entry {
|
||||||
padding: 12px 0px 14px 0px;
|
padding: 12px 0px 14px 0px;
|
||||||
}
|
}
|
||||||
|
@ -103,7 +94,7 @@
|
||||||
top: -4px;
|
top: -4px;
|
||||||
left: 20px;
|
left: 20px;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
width: 210px;
|
width: 170px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.conpherence-widget-pane #widgets-files .file-uploaded-by {
|
.conpherence-widget-pane #widgets-files .file-uploaded-by {
|
||||||
|
@ -111,14 +102,14 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
left: 20px;
|
left: 20px;
|
||||||
width: 210px;
|
width: 170px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.conpherence-widget-pane #widgets-files .file-extra {
|
.conpherence-widget-pane #widgets-files .file-extra {
|
||||||
display: block;
|
display: block;
|
||||||
height: 120px;
|
height: 120px;
|
||||||
width: 160px;
|
width: 120px;
|
||||||
margin: 8px 0px 8px 52px;
|
margin: 8px 0px 8px 52px;
|
||||||
border: 1px solid #7289b7;
|
border: 1px solid #7289b7;
|
||||||
box-shadow: 0 0px 5px rgba(0,0,0,.25);
|
box-shadow: 0 0px 5px rgba(0,0,0,.25);
|
||||||
|
@ -128,7 +119,7 @@
|
||||||
.conpherence-widget-pane #widgets-files .divider {
|
.conpherence-widget-pane #widgets-files .divider {
|
||||||
float: left;
|
float: left;
|
||||||
clear: both;
|
clear: both;
|
||||||
width: 210px;
|
width: 170px;
|
||||||
margin: 8px 0px 0px 50px;
|
margin: 8px 0px 0px 50px;
|
||||||
border: 1px dashed #bfbfbf;
|
border: 1px dashed #bfbfbf;
|
||||||
}
|
}
|
||||||
|
@ -146,7 +137,7 @@
|
||||||
|
|
||||||
.conpherence-widget-pane #widgets-calendar .aphront-multi-column-view {
|
.conpherence-widget-pane #widgets-calendar .aphront-multi-column-view {
|
||||||
margin: 2px 0px 0px 0px;
|
margin: 2px 0px 0px 0px;
|
||||||
width: 280px;
|
width: 240px;
|
||||||
}
|
}
|
||||||
.device .conpherence-widget-pane #widgets-calendar .aphront-multi-column-view {
|
.device .conpherence-widget-pane #widgets-calendar .aphront-multi-column-view {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -162,6 +153,8 @@
|
||||||
.aphront-multi-column-column-outer {
|
.aphront-multi-column-column-outer {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
|
float: left;
|
||||||
|
clear: none;
|
||||||
}
|
}
|
||||||
.conpherence-widget-pane #widgets-calendar .aphront-multi-column-view
|
.conpherence-widget-pane #widgets-calendar .aphront-multi-column-view
|
||||||
.aphront-multi-column-column-last {
|
.aphront-multi-column-column-last {
|
||||||
|
@ -219,7 +212,7 @@
|
||||||
border-top: 1px solid #bfbfbf;
|
border-top: 1px solid #bfbfbf;
|
||||||
border-bottom: 1px solid #bfbfbf;
|
border-bottom: 1px solid #bfbfbf;
|
||||||
padding: 5px 10px 5px 10px;
|
padding: 5px 10px 5px 10px;
|
||||||
width: 260px;
|
width: 220px;
|
||||||
}
|
}
|
||||||
.device .conpherence-widget-pane #widgets-calendar .day-header {
|
.device .conpherence-widget-pane #widgets-calendar .day-header {
|
||||||
width: 98%;
|
width: 98%;
|
||||||
|
@ -237,7 +230,7 @@
|
||||||
.conpherence-widget-pane #widgets-calendar .divider {
|
.conpherence-widget-pane #widgets-calendar .divider {
|
||||||
float: left;
|
float: left;
|
||||||
clear: both;
|
clear: both;
|
||||||
width: 260px;
|
width: 220px;
|
||||||
margin: 0px 0px 0px 10px;
|
margin: 0px 0px 0px 10px;
|
||||||
border: 1px dashed #bfbfbf;
|
border: 1px dashed #bfbfbf;
|
||||||
}
|
}
|
||||||
|
@ -256,7 +249,7 @@
|
||||||
float: left;
|
float: left;
|
||||||
clear: both;
|
clear: both;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
width: 280px;
|
width: 240px;
|
||||||
}
|
}
|
||||||
.device .conpherence-widget-pane #widgets-calendar .user-status {
|
.device .conpherence-widget-pane #widgets-calendar .user-status {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -293,7 +286,7 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
left: 40px;
|
left: 40px;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
width: 260px;
|
width: 220px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.conpherence-widget-pane #widgets-calendar .user-status .participant {
|
.conpherence-widget-pane #widgets-calendar .user-status .participant {
|
||||||
|
@ -302,7 +295,7 @@
|
||||||
top: 0px;
|
top: 0px;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
width: 260px;
|
width: 220px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device .conpherence-widget-pane #widgets-calendar .user-status .description,
|
.device .conpherence-widget-pane #widgets-calendar .user-status .description,
|
||||||
|
@ -323,12 +316,12 @@
|
||||||
/* people widget */
|
/* people widget */
|
||||||
.conpherence-widget-pane .people-widget-header {
|
.conpherence-widget-pane .people-widget-header {
|
||||||
float: left;
|
float: left;
|
||||||
width: 280px;
|
width: 240px;
|
||||||
}
|
}
|
||||||
.conpherence-widget-pane .people-widget-header .divider {
|
.conpherence-widget-pane .people-widget-header .divider {
|
||||||
float: left;
|
float: left;
|
||||||
clear: both;
|
clear: both;
|
||||||
width: 260px;
|
width: 220px;
|
||||||
margin: 0px 0px 0px 10px;
|
margin: 0px 0px 0px 10px;
|
||||||
border: 1px dashed #bfbfbf;
|
border: 1px dashed #bfbfbf;
|
||||||
}
|
}
|
||||||
|
@ -339,18 +332,19 @@
|
||||||
.conpherence-widget-pane .people-widget-header .add-people-widget {
|
.conpherence-widget-pane .people-widget-header .add-people-widget {
|
||||||
float: left;
|
float: left;
|
||||||
padding: 10px 0px 10px 0px;
|
padding: 10px 0px 10px 0px;
|
||||||
width: 280px;
|
width: 240px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device .conpherence-widget-pane .people-widget-header,
|
.device .conpherence-widget-pane .people-widget-header,
|
||||||
.device .conpherence-widget-pane .people-widget-header .add-people-widget {
|
.device .conpherence-widget-pane .people-widget-header .add-people-widget {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
.conpherence-widget-pane .add-people-widget .aphront-form-input {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
.conpherence-widget-pane .people-widget-header .add-people-widget
|
.conpherence-widget-pane .people-widget-header .add-people-widget
|
||||||
.aphront-form-control-tokenizer {
|
.aphront-form-control-tokenizer {
|
||||||
float: left;
|
float: left;
|
||||||
width: 180px;
|
width: 142px;
|
||||||
padding: 0px 0px 0px 10px
|
padding: 0px 0px 0px 10px
|
||||||
}
|
}
|
||||||
.device .conpherence-widget-pane .people-widget-header .add-people-widget
|
.device .conpherence-widget-pane .people-widget-header .add-people-widget
|
||||||
|
@ -360,7 +354,7 @@
|
||||||
.conpherence-widget-pane .people-widget-header .add-people-widget
|
.conpherence-widget-pane .people-widget-header .add-people-widget
|
||||||
.people-add-button {
|
.people-add-button {
|
||||||
float: right;
|
float: right;
|
||||||
margin: 2px 10px 0px 0px;
|
margin: 2px 8px 0px 0px;
|
||||||
padding: 3px 16px 4px 16px;
|
padding: 3px 16px 4px 16px;
|
||||||
}
|
}
|
||||||
@-moz-document url-prefix() {
|
@-moz-document url-prefix() {
|
||||||
|
@ -371,7 +365,7 @@
|
||||||
}
|
}
|
||||||
.conpherence-widget-pane .person-entry {
|
.conpherence-widget-pane .person-entry {
|
||||||
float: left;
|
float: left;
|
||||||
width: 270px;
|
width: 230px;
|
||||||
clear: both;
|
clear: both;
|
||||||
padding: 10px 0px 0px 8px;
|
padding: 10px 0px 0px 8px;
|
||||||
}
|
}
|
||||||
|
@ -386,7 +380,7 @@
|
||||||
clear: none;
|
clear: none;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
width: 164px;
|
width: 124px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.conpherence-widget-pane .person-entry .pic {
|
.conpherence-widget-pane .person-entry .pic {
|
||||||
|
@ -422,6 +416,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* settings widget */
|
/* settings widget */
|
||||||
|
.conpherence-widget-pane .title-update,
|
||||||
.conpherence-widget-pane .notifications-update {
|
.conpherence-widget-pane .notifications-update {
|
||||||
margin: 2px 0px 0px 8px;
|
margin: 2px 0px 0px 8px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ JX.behavior('conpherence-menu', function(config) {
|
||||||
var data = JX.Stratcom.getData(thread.node);
|
var data = JX.Stratcom.getData(thread.node);
|
||||||
|
|
||||||
if (thread.visible !== null || !config.hasThread) {
|
if (thread.visible !== null || !config.hasThread) {
|
||||||
var uri = config.base_uri + data.id + '/';
|
var uri = config.base_uri + data.id + '/';
|
||||||
new JX.Workflow(uri, {})
|
new JX.Workflow(uri, {})
|
||||||
.setHandler(onloadthreadresponse)
|
.setHandler(onloadthreadresponse)
|
||||||
.start();
|
.start();
|
||||||
|
@ -124,35 +124,23 @@ JX.behavior('conpherence-menu', function(config) {
|
||||||
updatetoggledwidget();
|
updatetoggledwidget();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updatetoggledwidget() {
|
function updatetoggledwidget(no_toggle) {
|
||||||
|
JX.Stratcom.invoke(
|
||||||
|
'conpherence-toggle-widget',
|
||||||
|
null,
|
||||||
|
{
|
||||||
|
widget : getdefaultwidget(),
|
||||||
|
no_toggle : no_toggle
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getdefaultwidget() {
|
||||||
var device = JX.Device.getDevice();
|
var device = JX.Device.getDevice();
|
||||||
if (device != 'desktop') {
|
var widget = 'conpherence-message-pane';
|
||||||
if (config.role == 'list') {
|
if (device == 'desktop') {
|
||||||
JX.Stratcom.invoke(
|
widget = 'widgets-people';
|
||||||
'conpherence-toggle-widget',
|
|
||||||
null,
|
|
||||||
{
|
|
||||||
widget : 'conpherence-menu-pane'
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
JX.Stratcom.invoke(
|
|
||||||
'conpherence-toggle-widget',
|
|
||||||
null,
|
|
||||||
{
|
|
||||||
widget : 'conpherence-message-pane'
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
JX.Stratcom.invoke(
|
|
||||||
'conpherence-toggle-widget',
|
|
||||||
null,
|
|
||||||
{
|
|
||||||
widget : 'widgets-people'
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
return widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onloadthreadresponse(response) {
|
function onloadthreadresponse(response) {
|
||||||
|
@ -174,6 +162,22 @@ JX.behavior('conpherence-menu', function(config) {
|
||||||
var root = JX.DOM.find(document, 'div', 'conpherence-layout');
|
var root = JX.DOM.find(document, 'div', 'conpherence-layout');
|
||||||
var messagesRoot = JX.DOM.find(root, 'div', 'conpherence-messages');
|
var messagesRoot = JX.DOM.find(root, 'div', 'conpherence-messages');
|
||||||
messagesRoot.scrollTop = messagesRoot.scrollHeight;
|
messagesRoot.scrollTop = messagesRoot.scrollHeight;
|
||||||
|
|
||||||
|
try {
|
||||||
|
var device = JX.Device.getDevice();
|
||||||
|
var deviceWidgetSelector = JX.DOM.find(
|
||||||
|
root,
|
||||||
|
'a',
|
||||||
|
'device-widgets-selector');
|
||||||
|
if (device != 'desktop') {
|
||||||
|
JX.DOM.show(deviceWidgetSelector);
|
||||||
|
updatetoggledwidget(true);
|
||||||
|
} else {
|
||||||
|
JX.DOM.hide(deviceWidgetSelector);
|
||||||
|
}
|
||||||
|
} catch (ex) {
|
||||||
|
// not here yet
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
JX.Stratcom.listen(
|
JX.Stratcom.listen(
|
||||||
|
@ -262,6 +266,18 @@ JX.behavior('conpherence-menu', function(config) {
|
||||||
if (new_device === old_device) {
|
if (new_device === old_device) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (old_device === null) {
|
||||||
|
old_device = new_device;
|
||||||
|
if (config.role == 'list') {
|
||||||
|
if (new_device != 'desktop') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
loadthreads();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
var update_toggled_widget =
|
var update_toggled_widget =
|
||||||
new_device == 'desktop' || old_device == 'desktop';
|
new_device == 'desktop' || old_device == 'desktop';
|
||||||
old_device = new_device;
|
old_device = new_device;
|
||||||
|
@ -270,10 +286,12 @@ JX.behavior('conpherence-menu', function(config) {
|
||||||
updatetoggledwidget();
|
updatetoggledwidget();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!config.hasThreadList) {
|
if (config.role == 'list') {
|
||||||
loadthreads();
|
|
||||||
} else {
|
|
||||||
didloadthreads();
|
didloadthreads();
|
||||||
|
config.role = 'thread';
|
||||||
|
var root = JX.DOM.find(document, 'div', 'conpherence-layout');
|
||||||
|
JX.DOM.alterClass(root, 'conpherence-role-list', false);
|
||||||
|
JX.DOM.alterClass(root, 'conpherence-role-thread', true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,104 +6,113 @@
|
||||||
* javelin-util
|
* javelin-util
|
||||||
* phabricator-notification
|
* phabricator-notification
|
||||||
* javelin-behavior-device
|
* javelin-behavior-device
|
||||||
|
* phabricator-dropdown-menu
|
||||||
|
* phabricator-menu-item
|
||||||
* @provides javelin-behavior-conpherence-widget-pane
|
* @provides javelin-behavior-conpherence-widget-pane
|
||||||
*/
|
*/
|
||||||
|
|
||||||
JX.behavior('conpherence-widget-pane', function(config) {
|
JX.behavior('conpherence-widget-pane', function(config) {
|
||||||
|
|
||||||
|
var build_widget_selector = function (data) {
|
||||||
|
var widgets = config.widgetRegistry;
|
||||||
|
var root = JX.DOM.find(document, 'div', 'conpherence-layout');
|
||||||
|
var widgetPane = JX.DOM.find(root, 'div', 'conpherence-widget-pane');
|
||||||
|
var widgetHeader = JX.DOM.find(widgetPane, 'a', 'widgets-selector');
|
||||||
|
var mobileWidgetHeader = null;
|
||||||
|
try {
|
||||||
|
mobileWidgetHeader = JX.DOM.find(
|
||||||
|
root,
|
||||||
|
'a',
|
||||||
|
'device-widgets-selector');
|
||||||
|
} catch (ex) {
|
||||||
|
// is okay - no mobileWidgetHeader yet...
|
||||||
|
}
|
||||||
|
var widgetData = widgets[data.widget];
|
||||||
|
JX.DOM.setContent(
|
||||||
|
widgetHeader,
|
||||||
|
widgetData.name);
|
||||||
|
JX.DOM.appendContent(
|
||||||
|
widgetHeader,
|
||||||
|
JX.$N('span', { className : 'caret' }));
|
||||||
|
if (mobileWidgetHeader) {
|
||||||
|
// this is fragile but adding a sigil to this element is awkward
|
||||||
|
var mobileWidgetHeaderSpans = JX.DOM.scry(mobileWidgetHeader, 'span');
|
||||||
|
var mobileWidgetHeaderSpan = mobileWidgetHeaderSpans[1];
|
||||||
|
JX.DOM.setContent(
|
||||||
|
mobileWidgetHeaderSpan,
|
||||||
|
widgetData.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
var menu = new JX.PhabricatorDropdownMenu(widgetHeader);
|
||||||
|
menu.toggleAlignDropdownRight(false);
|
||||||
|
var deviceMenu = null;
|
||||||
|
if (mobileWidgetHeader) {
|
||||||
|
deviceMenu = new JX.PhabricatorDropdownMenu(mobileWidgetHeader);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var widget in widgets) {
|
||||||
|
widgetData = widgets[widget];
|
||||||
|
if (mobileWidgetHeader) {
|
||||||
|
deviceMenu.addItem(new JX.PhabricatorMenuItem(
|
||||||
|
widgetData.name,
|
||||||
|
JX.bind(null, build_widget_selector, { widget : widget }),
|
||||||
|
'#'
|
||||||
|
).setDisabled(widget == data.widget));
|
||||||
|
}
|
||||||
|
if (widgetData.deviceOnly) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
menu.addItem(new JX.PhabricatorMenuItem(
|
||||||
|
widgetData.name,
|
||||||
|
JX.bind(null, build_widget_selector, { widget : widget }),
|
||||||
|
'#'
|
||||||
|
).setDisabled(widget == data.widget));
|
||||||
|
}
|
||||||
|
if (data.no_toggle) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
toggle_widget(data);
|
||||||
|
};
|
||||||
|
|
||||||
var toggle_widget = function (data) {
|
var toggle_widget = function (data) {
|
||||||
|
var widgets = config.widgetRegistry;
|
||||||
|
var widgetData = widgets[data.widget];
|
||||||
var device = JX.Device.getDevice();
|
var device = JX.Device.getDevice();
|
||||||
var is_desktop = device == 'desktop';
|
var is_desktop = device == 'desktop';
|
||||||
if (config.widgetRegistery[data.widget] == config.devicesOnly &&
|
|
||||||
is_desktop) {
|
if (widgetData.deviceOnly && is_desktop) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var root = JX.DOM.find(document, 'div', 'conpherence-layout');
|
for (var widget in config.widgetRegistry) {
|
||||||
var widgetPane = JX.DOM.find(root, 'div', 'conpherence-widget-pane');
|
widgetData = widgets[widget];
|
||||||
var i;
|
if (widgetData.deviceOnly && is_desktop) {
|
||||||
var tag_data;
|
// some one off code for conpherence messages which are device-only
|
||||||
var node;
|
// as a widget, but shown always on the desktop
|
||||||
|
if (widget == 'conpherence-message-pane') {
|
||||||
for (var widget in config.widgetRegistery) {
|
|
||||||
// device-only widgets are *always shown* on the desktop
|
|
||||||
if (config.widgetRegistery[widget] == config.devicesOnly) {
|
|
||||||
if (is_desktop) {
|
|
||||||
JX.$(widget).style.display = 'block';
|
JX.$(widget).style.display = 'block';
|
||||||
if (config.widgetExtraNodes[widget]) {
|
JX.Stratcom.invoke('conpherence-redraw-thread', null, {});
|
||||||
for (i in config.widgetExtraNodes[widget]) {
|
|
||||||
tag_data = config.widgetExtraNodes[widget][i];
|
|
||||||
node = JX.DOM.find(root, tag_data.tagname, tag_data.sigil);
|
|
||||||
node.style.display = tag_data.desktopstyle;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var cur_toggle = JX.$(widget + '-toggle');
|
|
||||||
var toggle_class = config.widgetToggleMap[widget];
|
|
||||||
if (widget == data.widget) {
|
if (widget == data.widget) {
|
||||||
JX.DOM.alterClass(cur_toggle, toggle_class, true);
|
|
||||||
JX.$(widget).style.display = 'block';
|
JX.$(widget).style.display = 'block';
|
||||||
if (config.widgetRegistery[widget] == config.devicesOnly) {
|
// some one off code for conpherence messages - fancier refresh tech
|
||||||
widgetPane.style.height = '42px';
|
|
||||||
} else {
|
|
||||||
widgetPane.style.height = '100%';
|
|
||||||
}
|
|
||||||
if (config.widgetExtraNodes[widget]) {
|
|
||||||
for (i in config.widgetExtraNodes[widget]) {
|
|
||||||
tag_data = config.widgetExtraNodes[widget][i];
|
|
||||||
node = JX.DOM.find(root, tag_data.tagname, tag_data.sigil);
|
|
||||||
node.style.display = tag_data.showstyle;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// some one off code for conpherence messages
|
|
||||||
if (widget == 'conpherence-message-pane') {
|
if (widget == 'conpherence-message-pane') {
|
||||||
JX.Stratcom.invoke('conpherence-redraw-thread', null, {});
|
JX.Stratcom.invoke('conpherence-redraw-thread', null, {});
|
||||||
JX.Stratcom.invoke('conpherence-update-page-data', null, {});
|
JX.Stratcom.invoke('conpherence-update-page-data', null, {});
|
||||||
}
|
}
|
||||||
// some one off code for conpherence list
|
|
||||||
if (widget == 'conpherence-menu-pane') {
|
|
||||||
JX.Stratcom.invoke(
|
|
||||||
'conpherence-update-page-data',
|
|
||||||
null,
|
|
||||||
{ use_base_uri : true, title: 'Conpherence' }
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
JX.DOM.alterClass(
|
|
||||||
cur_toggle,
|
|
||||||
toggle_class,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
JX.$(widget).style.display = 'none';
|
JX.$(widget).style.display = 'none';
|
||||||
if (config.widgetExtraNodes[widget]) {
|
|
||||||
for (i in config.widgetExtraNodes[widget]) {
|
|
||||||
tag_data = config.widgetExtraNodes[widget][i];
|
|
||||||
node = JX.DOM.find(root, tag_data.tagname, tag_data.sigil);
|
|
||||||
node.style.display = tag_data.hidestyle;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
JX.Stratcom.listen(
|
|
||||||
['touchstart', 'mousedown'],
|
|
||||||
'conpherence-change-widget',
|
|
||||||
function(e) {
|
|
||||||
e.kill();
|
|
||||||
var data = e.getNodeData('conpherence-change-widget');
|
|
||||||
toggle_widget(data);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
JX.Stratcom.listen(
|
JX.Stratcom.listen(
|
||||||
'conpherence-toggle-widget',
|
'conpherence-toggle-widget',
|
||||||
null,
|
null,
|
||||||
function (e) {
|
function (e) {
|
||||||
toggle_widget(e.getData());
|
build_widget_selector(e.getData());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue