1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

Conpherence - kill the image-based header UI

Summary:
removes the whole custom image thing, instead using a more standard application crumbs. Gives this glorious space back to the compose area which is now tens of pixels taller. Also defaults it to the people widget. Basically, fixes T3160.

For now, you **CAN NOT** edit the title of a conpherence. I didn't want to jam in too much here. Next diff will be to change the widget icons into the dropdown switcher, which will also bring back the editing of titles.

Test Plan: looked at conpherence and it was pretty. Resized it vigorously and it wasn't too bad.

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin

Maniphest Tasks: T3160

Differential Revision: https://secure.phabricator.com/D5998
This commit is contained in:
Bob Trahan 2013-05-22 16:05:47 -07:00
parent b956944667
commit a56ca7a043
24 changed files with 48 additions and 517 deletions

View file

@ -0,0 +1,2 @@
ALTER TABLE `{$NAMESPACE}_conpherence`.`conpherence_thread`
DROP imagePHIDs;

View file

@ -918,7 +918,7 @@ celerity_register_resource_map(array(
),
'conpherence-header-pane-css' =>
array(
'uri' => '/res/dc654fce/rsrc/css/application/conpherence/header-pane.css',
'uri' => '/res/762c199d/rsrc/css/application/conpherence/header-pane.css',
'type' => 'css',
'requires' =>
array(
@ -936,7 +936,7 @@ celerity_register_resource_map(array(
),
'conpherence-message-pane-css' =>
array(
'uri' => '/res/52cf7ca3/rsrc/css/application/conpherence/message-pane.css',
'uri' => '/res/ff25351b/rsrc/css/application/conpherence/message-pane.css',
'type' => 'css',
'requires' =>
array(
@ -954,7 +954,7 @@ celerity_register_resource_map(array(
),
'conpherence-widget-pane-css' =>
array(
'uri' => '/res/197df36c/rsrc/css/application/conpherence/widget-pane.css',
'uri' => '/res/c0131a8b/rsrc/css/application/conpherence/widget-pane.css',
'type' => 'css',
'requires' =>
array(
@ -1316,7 +1316,7 @@ celerity_register_resource_map(array(
),
'javelin-behavior-conpherence-menu' =>
array(
'uri' => '/res/06bfc1a3/rsrc/js/application/conpherence/behavior-menu.js',
'uri' => '/res/2bffa665/rsrc/js/application/conpherence/behavior-menu.js',
'type' => 'js',
'requires' =>
array(

View file

@ -250,9 +250,7 @@ phutil_register_library_map(array(
'ConpherenceDAO' => 'applications/conpherence/storage/ConpherenceDAO.php',
'ConpherenceEditor' => 'applications/conpherence/editor/ConpherenceEditor.php',
'ConpherenceFileWidgetView' => 'applications/conpherence/view/ConpherenceFileWidgetView.php',
'ConpherenceFormDragAndDropUploadControl' => 'applications/conpherence/view/ConpherenceFormDragAndDropUploadControl.php',
'ConpherenceHovercardEventListener' => 'applications/conpherence/events/ConpherenceHovercardEventListener.php',
'ConpherenceImageData' => 'applications/conpherence/constants/ConpherenceImageData.php',
'ConpherenceLayoutView' => 'applications/conpherence/view/ConpherenceLayoutView.php',
'ConpherenceListController' => 'applications/conpherence/controller/ConpherenceListController.php',
'ConpherenceMenuItemView' => 'applications/conpherence/view/ConpherenceMenuItemView.php',
@ -2058,9 +2056,7 @@ phutil_register_library_map(array(
'ConpherenceDAO' => 'PhabricatorLiskDAO',
'ConpherenceEditor' => 'PhabricatorApplicationTransactionEditor',
'ConpherenceFileWidgetView' => 'ConpherenceWidgetView',
'ConpherenceFormDragAndDropUploadControl' => 'AphrontFormControl',
'ConpherenceHovercardEventListener' => 'PhutilEventListener',
'ConpherenceImageData' => 'ConpherenceConstants',
'ConpherenceLayoutView' => 'AphrontView',
'ConpherenceListController' => 'ConpherenceController',
'ConpherenceMenuItemView' => 'AphrontTagView',

View file

@ -1,11 +0,0 @@
<?php
final class ConpherenceImageData extends ConpherenceConstants {
const SIZE_ORIG = 'original';
const SIZE_HEAD = 'header';
const HEAD_WIDTH = 120;
const HEAD_HEIGHT = 80;
}

View file

@ -7,8 +7,10 @@ final class ConpherenceTransactionType extends ConpherenceConstants {
const TYPE_FILES = 'files';
const TYPE_TITLE = 'title';
const TYPE_PICTURE = 'picture';
const TYPE_PICTURE_CROP = 'picture-crop';
const TYPE_PARTICIPANTS = 'participants';
/* these two are deprecated but keep them around for legacy installs */
const TYPE_PICTURE = 'picture';
const TYPE_PICTURE_CROP = 'picture-crop';
}

View file

@ -22,62 +22,25 @@ abstract class ConpherenceController extends PhabricatorController {
$crumbs
->addAction(
id(new PhabricatorMenuItemView())
->setName(pht('New Message'))
->setHref($this->getApplicationURI('new/'))
->setIcon('create'))
->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('Conpherence')));
->setName(pht('New Message'))
->setHref($this->getApplicationURI('new/'))
->setIcon('create')
->setWorkflow(true));
return $crumbs;
}
protected function buildHeaderPaneContent(ConpherenceThread $conpherence) {
$user = $this->getRequest()->getUser();
$display_data = $conpherence->getDisplayData(
$user,
ConpherenceImageData::SIZE_HEAD);
$edit_href = $this->getApplicationURI('update/'.$conpherence->getID().'/');
$class_mod = $display_data['image_class'];
$crumbs = $this->buildApplicationCrumbs();
if ($conpherence->getTitle()) {
$title = $conpherence->getTitle();
} else {
$title = pht('Conpherence');
}
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName($title));
return array(
phutil_tag(
'div',
array(
'class' => 'upload-photo'
),
pht('Drop photo here to change this Conpherence photo.')),
javelin_tag(
'a',
array(
'class' => 'edit',
'href' => $edit_href,
'sigil' => 'conpherence-edit-metadata',
'meta' => array(
'action' => 'metadata'
)
),
''),
phutil_tag(
'div',
array(
'class' => $class_mod.'header-image',
'style' => 'background-image: url('.$display_data['image'].');'
),
''),
phutil_tag(
'div',
array(
'class' => $class_mod.'title',
),
$display_data['title']),
phutil_tag(
'div',
array(
'class' => $class_mod.'subtitle',
),
$display_data['subtitle']),
);
return $crumbs;
}
protected function renderConpherenceTransactions(

View file

@ -31,10 +31,7 @@ final class ConpherenceUpdateController
->setViewer($user)
->withIDs(array($conpherence_id))
->needFilePHIDs(true)
->needOrigPics(true)
->needHeaderPics(true)
->executeOne();
$supported_formats = PhabricatorFile::getTransformableImageFormats();
$action = $request->getStr('action', ConpherenceUpdateActions::METADATA);
$latest_transaction_id = null;
@ -99,73 +96,13 @@ final class ConpherenceUpdateController
break;
case ConpherenceUpdateActions::METADATA:
$xactions = array();
$top = $request->getInt('image_y');
$left = $request->getInt('image_x');
$file_id = $request->getInt('file_id');
$title = $request->getStr('title');
$updated = false;
if ($file_id) {
$orig_file = id(new PhabricatorFileQuery())
->setViewer($user)
->withIDs(array($file_id))
->executeOne();
$okay = $orig_file->isTransformableImage();
if ($okay) {
$xactions[] = id(new ConpherenceTransaction())
->setTransactionType(ConpherenceTransactionType::TYPE_PICTURE)
->setNewValue($orig_file->getPHID());
// do a transformation "crudely"
$xformer = new PhabricatorImageTransformer();
$header_file = $xformer->executeConpherenceTransform(
$orig_file,
0,
0,
ConpherenceImageData::HEAD_WIDTH,
ConpherenceImageData::HEAD_HEIGHT);
// this is handled outside the editor for now. no particularly
// good reason to move it inside
$conpherence->setImagePHIDs(
array(
ConpherenceImageData::SIZE_HEAD => $header_file->getPHID(),
));
$conpherence->setImages(
array(
ConpherenceImageData::SIZE_HEAD => $header_file,
));
} else {
$e_file[] = $orig_file;
$errors[] =
pht('This server only supports these image formats: %s.',
implode(', ', $supported_formats));
}
// use the existing title in this image upload case
$title = $conpherence->getTitle();
$updated = true;
$response_mode = 'redirect';
}
// all other metadata updates are continue requests
if (!$request->isContinueRequest()) {
break;
}
if ($top !== null || $left !== null) {
$file = $conpherence->getImage(ConpherenceImageData::SIZE_ORIG);
$xformer = new PhabricatorImageTransformer();
$xformed = $xformer->executeConpherenceTransform(
$file,
$top,
$left,
ConpherenceImageData::HEAD_WIDTH,
ConpherenceImageData::HEAD_HEIGHT);
$image_phid = $xformed->getPHID();
$xactions[] = id(new ConpherenceTransaction())
->setTransactionType(
ConpherenceTransactionType::TYPE_PICTURE_CROP)
->setNewValue($image_phid);
$updated = true;
}
$title = $request->getStr('title');
if ($title != $conpherence->getTitle()) {
$xactions[] = id(new ConpherenceTransaction())
->setTransactionType(ConpherenceTransactionType::TYPE_TITLE)
@ -282,34 +219,6 @@ final class ConpherenceUpdateController
->setName('title')
->setValue($conpherence->getTitle()));
$image = $conpherence->getImage(ConpherenceImageData::SIZE_ORIG);
if ($image) {
$form
->appendChild(
id(new AphrontFormMarkupControl())
->setLabel(pht('Image'))
->setValue(phutil_tag(
'img',
array(
'src' =>
$conpherence->loadImageURI(ConpherenceImageData::SIZE_HEAD),
))))
->appendChild(
id(new AphrontFormCropControl())
->setLabel(pht('Crop Image'))
->setValue($image)
->setWidth(ConpherenceImageData::HEAD_WIDTH)
->setHeight(ConpherenceImageData::HEAD_HEIGHT))
->appendChild(
id(new ConpherenceFormDragAndDropUploadControl())
->setLabel(pht('Change Image')));
} else {
$form
->appendChild(
id(new ConpherenceFormDragAndDropUploadControl())
->setLabel(pht('Image')));
}
require_celerity_resource('conpherence-update-css');
return id(new AphrontDialogView())
->setTitle(pht('Update Conpherence'))
@ -323,12 +232,10 @@ final class ConpherenceUpdateController
$conpherence_id,
$latest_transaction_id) {
$need_header_pics = false;
$need_widget_data = false;
$need_transactions = false;
switch ($action) {
case ConpherenceUpdateActions::METADATA:
$need_header_pics = true;
$need_transactions = true;
break;
case ConpherenceUpdateActions::MESSAGE:
@ -346,7 +253,6 @@ final class ConpherenceUpdateController
$conpherence = id(new ConpherenceThreadQuery())
->setViewer($user)
->setAfterTransactionID($latest_transaction_id)
->needHeaderPics($need_header_pics)
->needWidgetData($need_widget_data)
->needTransactions($need_transactions)
->withIDs(array($conpherence_id))

View file

@ -40,7 +40,6 @@ final class ConpherenceViewController extends
$query = id(new ConpherenceThreadQuery())
->setViewer($user)
->withIDs(array($conpherence_id))
->needHeaderPics(true)
->needParticipantCache(true)
->needTransactions(true)
->setTransactionLimit(ConpherenceThreadQuery::TRANSACTION_LIMIT);

View file

@ -107,7 +107,8 @@ final class ConpherenceWidgetController extends
'widget' => 'widgets-people',
),
'id' => 'widgets-people-toggle',
'class' => 'sprite-conpherence conpherence_people_off'
'class' =>
'sprite-conpherence conpherence_people_on conpherence_people_off'
),
''),
javelin_tag(
@ -119,7 +120,7 @@ final class ConpherenceWidgetController extends
),
'id' => 'widgets-files-toggle',
'class' =>
'sprite-conpherence conpherence_files_on conpherence_files_off'
'sprite-conpherence conpherence_files_off'
),
''),
javelin_tag(
@ -153,7 +154,6 @@ final class ConpherenceWidgetController extends
'class' => 'widgets-body',
'id' => 'widgets-people',
'sigil' => 'widgets-people',
'style' => 'display: none;'
),
id(new ConpherencePeopleWidgetView())
->setUser($user)
@ -165,6 +165,7 @@ final class ConpherenceWidgetController extends
'class' => 'widgets-body',
'id' => 'widgets-files',
'sigil' => 'widgets-files',
'style' => 'display: none;'
),
id(new ConpherenceFileWidgetView())
->setUser($user)

View file

@ -45,8 +45,6 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor {
$types[] = PhabricatorTransactions::TYPE_COMMENT;
$types[] = ConpherenceTransactionType::TYPE_TITLE;
$types[] = ConpherenceTransactionType::TYPE_PICTURE;
$types[] = ConpherenceTransactionType::TYPE_PICTURE_CROP;
$types[] = ConpherenceTransactionType::TYPE_PARTICIPANTS;
$types[] = ConpherenceTransactionType::TYPE_FILES;
@ -60,10 +58,6 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor {
switch ($xaction->getTransactionType()) {
case ConpherenceTransactionType::TYPE_TITLE:
return $object->getTitle();
case ConpherenceTransactionType::TYPE_PICTURE:
return $object->getImagePHID(ConpherenceImageData::SIZE_ORIG);
case ConpherenceTransactionType::TYPE_PICTURE_CROP:
return $object->getImagePHID(ConpherenceImageData::SIZE_HEAD);
case ConpherenceTransactionType::TYPE_PARTICIPANTS:
return $object->getParticipantPHIDs();
case ConpherenceTransactionType::TYPE_FILES:
@ -77,8 +71,6 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor {
switch ($xaction->getTransactionType()) {
case ConpherenceTransactionType::TYPE_TITLE:
case ConpherenceTransactionType::TYPE_PICTURE:
case ConpherenceTransactionType::TYPE_PICTURE_CROP:
return $xaction->getNewValue();
case ConpherenceTransactionType::TYPE_PARTICIPANTS:
case ConpherenceTransactionType::TYPE_FILES:
@ -115,16 +107,6 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor {
case ConpherenceTransactionType::TYPE_TITLE:
$object->setTitle($xaction->getNewValue());
break;
case ConpherenceTransactionType::TYPE_PICTURE:
$object->setImagePHID(
$xaction->getNewValue(),
ConpherenceImageData::SIZE_ORIG);
break;
case ConpherenceTransactionType::TYPE_PICTURE_CROP:
$object->setImagePHID(
$xaction->getNewValue(),
ConpherenceImageData::SIZE_HEAD);
break;
}
$this->updateRecentParticipantPHIDs($object, $xaction);
}
@ -241,7 +223,6 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor {
$type = $u->getTransactionType();
switch ($type) {
case ConpherenceTransactionType::TYPE_TITLE:
case ConpherenceTransactionType::TYPE_PICTURE:
return $v;
case ConpherenceTransactionType::TYPE_FILES:
case ConpherenceTransactionType::TYPE_PARTICIPANTS:

View file

@ -11,8 +11,6 @@ final class ConpherenceThreadQuery
private $phids;
private $ids;
private $needWidgetData;
private $needHeaderPics;
private $needOrigPics;
private $needTransactions;
private $needParticipantCache;
private $needFilePHIDs;
@ -30,16 +28,6 @@ final class ConpherenceThreadQuery
return $this;
}
public function needOrigPics($need_orig_pics) {
$this->needOrigPics = $need_orig_pics;
return $this;
}
public function needHeaderPics($need_header_pics) {
$this->needHeaderPics = $need_header_pics;
return $this;
}
public function needWidgetData($need_widget_data) {
$this->needWidgetData = $need_widget_data;
return $this;
@ -110,12 +98,6 @@ final class ConpherenceThreadQuery
if ($this->needWidgetData) {
$this->loadWidgetData($conpherences);
}
if ($this->needOrigPics) {
$this->loadOrigPics($conpherences);
}
if ($this->needHeaderPics) {
$this->loadHeaderPics($conpherences);
}
}
return $conpherences;
@ -304,42 +286,4 @@ final class ConpherenceThreadQuery
return $this;
}
private function loadOrigPics(array $conpherences) {
return $this->loadPics(
$conpherences,
ConpherenceImageData::SIZE_ORIG);
}
private function loadHeaderPics(array $conpherences) {
return $this->loadPics(
$conpherences,
ConpherenceImageData::SIZE_HEAD);
}
private function loadPics(array $conpherences, $size) {
$conpherence_pic_phids = array();
foreach ($conpherences as $conpherence) {
$phid = $conpherence->getImagePHID($size);
if ($phid) {
$conpherence_pic_phids[$conpherence->getPHID()] = $phid;
}
}
if (!$conpherence_pic_phids) {
return $this;
}
$files = id(new PhabricatorFileQuery())
->setViewer($this->getViewer())
->withPHIDs($conpherence_pic_phids)
->execute();
$files = mpull($files, null, 'getPHID');
foreach ($conpherence_pic_phids as $conpherence_phid => $pic_phid) {
$conpherences[$conpherence_phid]->setImage($files[$pic_phid], $size);
}
return $this;
}
}

View file

@ -11,7 +11,6 @@ final class ConpherenceThread extends ConpherenceDAO
protected $title;
protected $messageCount;
protected $recentParticipantPHIDs = array();
protected $imagePHIDs = array();
protected $mailKey;
private $participants;
@ -26,7 +25,6 @@ final class ConpherenceThread extends ConpherenceDAO
self::CONFIG_AUX_PHID => true,
self::CONFIG_SERIALIZATION => array(
'recentParticipantPHIDs' => self::SERIALIZATION_JSON,
'imagePHIDs' => self::SERIALIZATION_JSON,
),
) + parent::getConfiguration();
}
@ -43,33 +41,6 @@ final class ConpherenceThread extends ConpherenceDAO
return parent::save();
}
public function getImagePHID($size) {
$image_phids = $this->getImagePHIDs();
return idx($image_phids, $size);
}
public function setImagePHID($phid, $size) {
$image_phids = $this->getImagePHIDs();
$image_phids[$size] = $phid;
return $this->setImagePHIDs($image_phids);
}
public function getImage($size) {
$images = $this->getImages();
return idx($images, $size);
}
public function setImage(PhabricatorFile $file, $size) {
$files = $this->getImages();
$files[$size] = $file;
return $this->setImages($files);
}
public function setImages(array $files) {
$this->images = $files;
return $this;
}
private function getImages() {
return $this->images;
}
public function attachParticipants(array $participants) {
assert_instances_of($participants, 'ConpherenceParticipant');
$this->participants = $participants;
@ -162,16 +133,6 @@ final class ConpherenceThread extends ConpherenceDAO
return $this->widgetData;
}
public function loadImageURI($size) {
$file = $this->getImage($size);
if ($file) {
return $file->getBestURI();
}
return PhabricatorUser::getDefaultProfileImageURI();
}
public function getDisplayData(PhabricatorUser $user, $size) {
$recent_phids = $this->getRecentParticipantPHIDs();
$handles = $this->getHandles();
@ -200,15 +161,7 @@ final class ConpherenceThread extends ConpherenceDAO
if (!$title) {
$title = $lucky_handle->getName();
}
$image = $this->getImagePHID($size);
if ($image) {
$img_src = $this->getImage($size)->getBestURI();
$img_class = 'custom-';
} else {
$img_src = $lucky_handle->getImageURI();
$img_class = null;
}
$img_src = $lucky_handle->getImageURI();
$count = 0;
$final = false;
@ -242,7 +195,6 @@ final class ConpherenceThread extends ConpherenceDAO
'unread_count' => $unread_count,
'epoch' => $this->getDateModified(),
'image' => $img_src,
'image_class' => $img_class,
);
}

View file

@ -39,9 +39,11 @@ final class ConpherenceTransaction extends PhabricatorApplicationTransaction {
case ConpherenceTransactionType::TYPE_PARTICIPANTS:
return ($old === null);
case ConpherenceTransactionType::TYPE_TITLE:
case ConpherenceTransactionType::TYPE_PICTURE:
return false;
case ConpherenceTransactionType::TYPE_FILES:
return true;
// we used to have them so just always hide
case ConpherenceTransactionType::TYPE_PICTURE:
case ConpherenceTransactionType::TYPE_PICTURE_CROP:
return true;
}
@ -98,10 +100,6 @@ final class ConpherenceTransaction extends PhabricatorApplicationTransaction {
}
return $title;
break;
case ConpherenceTransactionType::TYPE_PICTURE:
return pht(
'%s updated the conpherence image.',
$this->renderHandleLink($author_phid));
case ConpherenceTransactionType::TYPE_PARTICIPANTS:
$add = array_diff($new, $old);
$rem = array_diff($old, $new);
@ -142,7 +140,6 @@ final class ConpherenceTransaction extends PhabricatorApplicationTransaction {
$phids[] = $this->getAuthorPHID();
switch ($this->getTransactionType()) {
case ConpherenceTransactionType::TYPE_PICTURE:
case ConpherenceTransactionType::TYPE_TITLE:
case ConpherenceTransactionType::TYPE_FILES:
break;
@ -150,7 +147,6 @@ final class ConpherenceTransaction extends PhabricatorApplicationTransaction {
$phids = array_merge($phids, $this->getOldValue());
$phids = array_merge($phids, $this->getNewValue());
break;
}
return $phids;

View file

@ -1,40 +0,0 @@
<?php
final class ConpherenceFormDragAndDropUploadControl extends AphrontFormControl {
private $dropID;
public function setDropID($drop_id) {
$this->dropID = $drop_id;
return $this;
}
public function getDropID() {
return $this->dropID;
}
protected function getCustomControlClass() {
return null;
}
protected function renderInput() {
$drop_id = celerity_generate_unique_node_id();
Javelin::initBehavior('conpherence-drag-and-drop-photo',
array(
'target' => $drop_id,
'form_pane' => 'conpherence-form',
'upload_uri' => '/file/dropupload/',
'activated_class' => 'conpherence-dialogue-upload-photo',
));
require_celerity_resource('conpherence-update-css');
return phutil_tag(
'div',
array(
'id' => $drop_id,
'class' => 'conpherence-dialogue-drag-photo',
),
pht('Drag and drop an image here to upload it.'));
}
}

View file

@ -65,14 +65,6 @@ final class ConpherenceLayoutView extends AphrontView {
'hasWidgets' => false,
));
Javelin::initBehavior('conpherence-drag-and-drop-photo',
array(
'target' => 'conpherence-header-pane',
'form_pane' => 'conpherence-form',
'upload_uri' => '/file/dropupload/',
'activated_class' => 'conpherence-header-upload-photo',
));
$all_views = 1;
$devices_only = 0;
Javelin::initBehavior(
@ -96,12 +88,6 @@ final class ConpherenceLayoutView extends AphrontView {
'showstyle' => 'block',
'hidestyle' => 'none',
'desktopstyle' => 'block'),
array(
'tagname' => 'a',
'sigil' => 'conpherence-new-conversation',
'showstyle' => 'none',
'hidestyle' => 'none',
'desktopstyle' => 'block'),
)
),
'widgetToggleMap' => array(

View file

@ -37,16 +37,6 @@ final class ConpherenceThreadListView extends AphrontView {
->addClass('conpherence-menu')
->setID('conpherence-menu');
$menu->addMenuItem(
id(new PhabricatorMenuItemView())
->addSigil('conpherence-new-conversation')
->setName(pht('New Message'))
->setWorkflow(true)
->setKey('new')
->setHref($this->baseURI.'new/')
->setType(PhabricatorMenuItemView::TYPE_BUTTON));
$menu->newLabel('');
$this->addThreadsToMenu($menu, $this->threads);
return $menu;

View file

@ -46,25 +46,12 @@ final class ConpherenceTransactionView extends AphrontView {
$content = null;
switch ($transaction->getTransactionType()) {
case ConpherenceTransactionType::TYPE_TITLE:
case ConpherenceTransactionType::TYPE_PICTURE:
case ConpherenceTransactionType::TYPE_PICTURE_CROP:
$content = $transaction->getTitle();
$transaction_view->addClass('conpherence-edited');
break;
case ConpherenceTransactionType::TYPE_FILES:
$content = $transaction->getTitle();
break;
case ConpherenceTransactionType::TYPE_PICTURE:
$img = $transaction->getHandle($transaction->getNewValue());
$content = array(
$transaction->getTitle(),
phutil_tag(
'img',
array(
'src' => $img->getImageURI()
)));
$transaction_view->addClass('conpherence-edited');
break;
case ConpherenceTransactionType::TYPE_PARTICIPANTS:
$content = $transaction->getTitle();
$transaction_view->addClass('conpherence-edited');

View file

@ -317,7 +317,7 @@ final class DifferentialChangesetListView extends AphrontView {
'target' => '_blank',
'sigil' => 'differential-view-options',
),
pht("View Options \xE2\x96\xBC"));
pht('View Options') . " \xE2\x96\xBC");
}
}

View file

@ -1306,6 +1306,11 @@ final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList {
'type' => 'sql',
'name' => $this->getPatchPath('20130519.diviner.sql'),
),
'20130521.dropconphimages.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130521.dropconphimages.sql'),
),
);
}
}

View file

@ -2,96 +2,6 @@
* @provides conpherence-header-pane-css
*/
.conpherence-header-pane {
border-bottom: 1px solid #ccc;
height: 80px;
width: 100%;
}
.device .conpherence-header-pane {
display: none;
}
.conpherence-header-pane .edit {
float: right;
margin: 16px 16px 0px 0px;
height: 50px;
width: 50px;
background-image: url('/rsrc/image/actions/edit.png');
}
.conpherence-header-pane .header-image {
position: absolute;
top: 15px;
left: 15px;
height: 50px;
width: 50px;
}
.conpherence-header-pane .custom-header-image {
position: absolute;
top: 0px;
left: 0px;
height: 80px;
width: 120px;
}
.conpherence-header-pane .title {
position: absolute;
font-size: 16px;
font-weight: bold;
left: 77px;
top: 21px;
right: 66px;
overflow-x: auto;
}
.conpherence-header-pane .custom-title {
position: absolute;
font-size: 16px;
font-weight: bold;
left: 132px;
top: 21px;
right: 66px;
overflow-x: auto;
}
.conpherence-header-pane .subtitle {
position: absolute;
left: 77px;
top: 40px;
right: 66px;
color: #bfbfbf;
}
.conpherence-header-pane .custom-subtitle {
position: absolute;
left: 132px;
top: 40px;
right: 66px;
color: #bfbfbf;
}
.conpherence-header-pane .upload-photo {
display: none;
}
.conpherence-header-upload-photo .upload-photo {
display: block;
width: 100%;
padding: 32px;
font-size: 16px;
background: #99ff99;
border-color: #669966;
}
.conpherence-header-upload-photo .edit,
.conpherence-header-upload-photo .header-image,
.conpherence-header-upload-photo .custom-header-image,
.conpherence-header-upload-photo .title,
.conpherence-header-upload-photo .custom-title,
.conpherence-header-upload-photo .subtitle,
.conpherence-header-upload-photo .custom-subtitle {
display: none;
}

View file

@ -6,7 +6,7 @@
position: fixed;
left: 300px;
right: 281px;
top: 125px;
top: 76px;
min-width: 300px;
width: auto;
height: 100%;
@ -33,8 +33,8 @@
position: fixed;
left: 300px;
right: 281px;
top: 125px;
bottom: 142px;
top: 76px;
bottom: 190px;
overflow-y: auto;
box-shadow: inset 1px 4px 5px rgba(0,0,0,0.1);
-webkit-overflow-scrolling: touch;
@ -52,7 +52,7 @@
.conpherence-message-pane .phabricator-form-view {
border-width: 0;
background: none;
height: 143px;
height: 190px;
padding: 0;
position: fixed;
bottom: 0;
@ -121,7 +121,7 @@
}
.conpherence-message-pane .remarkup-assist-textarea {
height: 6em;
height: 124px;
padding: 6px;
border-width: 0 0 1px 0;
border-color: #e7e7e7;

View file

@ -5,7 +5,7 @@
.conpherence-widget-pane {
position: fixed;
right: 0px;
top: 125px;
top: 76px;
width: 280px;
height: 100%;
border-width: 0 0 0 1px;
@ -75,7 +75,7 @@
.conpherence-widget-pane .widgets-body {
position: fixed;
overflow-y: auto;
top: 165px;
top: 116px;
bottom: 0px;
width: 100%;
}
@ -161,6 +161,7 @@
.aphront-multi-column-fluid .aphront-multi-column-5-up
.aphront-multi-column-column-outer {
width: 20%;
margin-bottom: 0px;
}
.conpherence-widget-pane #widgets-calendar .aphront-multi-column-view
.aphront-multi-column-column-last {

View file

@ -1,39 +0,0 @@
/**
* @provides javelin-behavior-conpherence-drag-and-drop-photo
* @requires javelin-behavior
* javelin-dom
* javelin-workflow
* phabricator-drag-and-drop-file-upload
*/
JX.behavior('conpherence-drag-and-drop-photo', function(config) {
var target = JX.$(config.target);
var form_pane = JX.$(config.form_pane);
function onupload(f) {
var data = {
'file_id' : f.getID(),
'action' : 'metadata'
};
var form = JX.DOM.find(form_pane, 'form');
var workflow = JX.Workflow.newFromForm(form, data);
workflow.start();
}
if (JX.PhabricatorDragAndDropFileUpload.isSupported()) {
var drop = new JX.PhabricatorDragAndDropFileUpload(target)
.setURI(config.upload_uri);
drop.listen('didBeginDrag', function(e) {
JX.DOM.alterClass(target, config.activated_class, true);
});
drop.listen('didEndDrag', function(e) {
JX.DOM.alterClass(target, config.activated_class, false);
});
drop.listen('didUpload', onupload);
drop.start();
}
});

View file

@ -149,7 +149,7 @@ JX.behavior('conpherence-menu', function(config) {
'conpherence-toggle-widget',
null,
{
widget : 'widgets-files'
widget : 'widgets-people'
}
);
}