diff --git a/resources/sql/patches/20130521.dropconphimages.sql b/resources/sql/patches/20130521.dropconphimages.sql new file mode 100644 index 0000000000..16d506e203 --- /dev/null +++ b/resources/sql/patches/20130521.dropconphimages.sql @@ -0,0 +1,2 @@ +ALTER TABLE `{$NAMESPACE}_conpherence`.`conpherence_thread` + DROP imagePHIDs; diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php index c17844ea56..87cc4719a5 100644 --- a/src/__celerity_resource_map__.php +++ b/src/__celerity_resource_map__.php @@ -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( diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index d3efbcca59..8a729bcac2 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -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', diff --git a/src/applications/conpherence/constants/ConpherenceImageData.php b/src/applications/conpherence/constants/ConpherenceImageData.php deleted file mode 100644 index 618acb4b35..0000000000 --- a/src/applications/conpherence/constants/ConpherenceImageData.php +++ /dev/null @@ -1,11 +0,0 @@ -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( diff --git a/src/applications/conpherence/controller/ConpherenceUpdateController.php b/src/applications/conpherence/controller/ConpherenceUpdateController.php index 4fb76990e0..889e635602 100644 --- a/src/applications/conpherence/controller/ConpherenceUpdateController.php +++ b/src/applications/conpherence/controller/ConpherenceUpdateController.php @@ -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)) diff --git a/src/applications/conpherence/controller/ConpherenceViewController.php b/src/applications/conpherence/controller/ConpherenceViewController.php index 38da84a429..26651f261a 100644 --- a/src/applications/conpherence/controller/ConpherenceViewController.php +++ b/src/applications/conpherence/controller/ConpherenceViewController.php @@ -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); diff --git a/src/applications/conpherence/controller/ConpherenceWidgetController.php b/src/applications/conpherence/controller/ConpherenceWidgetController.php index db06edd8f3..91f89fd8ef 100644 --- a/src/applications/conpherence/controller/ConpherenceWidgetController.php +++ b/src/applications/conpherence/controller/ConpherenceWidgetController.php @@ -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) diff --git a/src/applications/conpherence/editor/ConpherenceEditor.php b/src/applications/conpherence/editor/ConpherenceEditor.php index 213ac9ff21..566905e489 100644 --- a/src/applications/conpherence/editor/ConpherenceEditor.php +++ b/src/applications/conpherence/editor/ConpherenceEditor.php @@ -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: diff --git a/src/applications/conpherence/query/ConpherenceThreadQuery.php b/src/applications/conpherence/query/ConpherenceThreadQuery.php index 61d32656c4..a0eb702529 100644 --- a/src/applications/conpherence/query/ConpherenceThreadQuery.php +++ b/src/applications/conpherence/query/ConpherenceThreadQuery.php @@ -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; - } - } diff --git a/src/applications/conpherence/storage/ConpherenceThread.php b/src/applications/conpherence/storage/ConpherenceThread.php index 101510ff82..ee166d3ceb 100644 --- a/src/applications/conpherence/storage/ConpherenceThread.php +++ b/src/applications/conpherence/storage/ConpherenceThread.php @@ -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, ); } diff --git a/src/applications/conpherence/storage/ConpherenceTransaction.php b/src/applications/conpherence/storage/ConpherenceTransaction.php index 7bc0b31f37..5a0d9756b6 100644 --- a/src/applications/conpherence/storage/ConpherenceTransaction.php +++ b/src/applications/conpherence/storage/ConpherenceTransaction.php @@ -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; diff --git a/src/applications/conpherence/view/ConpherenceFormDragAndDropUploadControl.php b/src/applications/conpherence/view/ConpherenceFormDragAndDropUploadControl.php deleted file mode 100644 index 3d9ea57cf9..0000000000 --- a/src/applications/conpherence/view/ConpherenceFormDragAndDropUploadControl.php +++ /dev/null @@ -1,40 +0,0 @@ -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.')); - } - -} diff --git a/src/applications/conpherence/view/ConpherenceLayoutView.php b/src/applications/conpherence/view/ConpherenceLayoutView.php index 5864fb87a7..7b0ad68dcc 100644 --- a/src/applications/conpherence/view/ConpherenceLayoutView.php +++ b/src/applications/conpherence/view/ConpherenceLayoutView.php @@ -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( diff --git a/src/applications/conpherence/view/ConpherenceThreadListView.php b/src/applications/conpherence/view/ConpherenceThreadListView.php index d52ac2038d..7a24fbea1d 100644 --- a/src/applications/conpherence/view/ConpherenceThreadListView.php +++ b/src/applications/conpherence/view/ConpherenceThreadListView.php @@ -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; diff --git a/src/applications/conpherence/view/ConpherenceTransactionView.php b/src/applications/conpherence/view/ConpherenceTransactionView.php index 2d3780fcd2..94bb71e815 100644 --- a/src/applications/conpherence/view/ConpherenceTransactionView.php +++ b/src/applications/conpherence/view/ConpherenceTransactionView.php @@ -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'); diff --git a/src/applications/differential/view/DifferentialChangesetListView.php b/src/applications/differential/view/DifferentialChangesetListView.php index e10fe8bf2f..106dfa0747 100644 --- a/src/applications/differential/view/DifferentialChangesetListView.php +++ b/src/applications/differential/view/DifferentialChangesetListView.php @@ -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"); } } diff --git a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php index 82eb5bcd40..b6d5a23bcd 100644 --- a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php +++ b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php @@ -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'), + ), + ); } } diff --git a/webroot/rsrc/css/application/conpherence/header-pane.css b/webroot/rsrc/css/application/conpherence/header-pane.css index c473ebf011..110621e101 100644 --- a/webroot/rsrc/css/application/conpherence/header-pane.css +++ b/webroot/rsrc/css/application/conpherence/header-pane.css @@ -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; -} - diff --git a/webroot/rsrc/css/application/conpherence/message-pane.css b/webroot/rsrc/css/application/conpherence/message-pane.css index 7ab6797dd2..e9cebe9739 100644 --- a/webroot/rsrc/css/application/conpherence/message-pane.css +++ b/webroot/rsrc/css/application/conpherence/message-pane.css @@ -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; diff --git a/webroot/rsrc/css/application/conpherence/widget-pane.css b/webroot/rsrc/css/application/conpherence/widget-pane.css index 40532c92f7..bd0e909ae2 100644 --- a/webroot/rsrc/css/application/conpherence/widget-pane.css +++ b/webroot/rsrc/css/application/conpherence/widget-pane.css @@ -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 { diff --git a/webroot/rsrc/js/application/conpherence/behavior-drag-and-drop-photo.js b/webroot/rsrc/js/application/conpherence/behavior-drag-and-drop-photo.js deleted file mode 100644 index a19bba029f..0000000000 --- a/webroot/rsrc/js/application/conpherence/behavior-drag-and-drop-photo.js +++ /dev/null @@ -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(); - } - -}); - diff --git a/webroot/rsrc/js/application/conpherence/behavior-menu.js b/webroot/rsrc/js/application/conpherence/behavior-menu.js index d9b66a2a92..b4eb0b7532 100644 --- a/webroot/rsrc/js/application/conpherence/behavior-menu.js +++ b/webroot/rsrc/js/application/conpherence/behavior-menu.js @@ -149,7 +149,7 @@ JX.behavior('conpherence-menu', function(config) { 'conpherence-toggle-widget', null, { - widget : 'widgets-files' + widget : 'widgets-people' } ); }