@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+47 -516
+2
resources/sql/patches/20130521.dropconphimages.sql
··· 1 + ALTER TABLE `{$NAMESPACE}_conpherence`.`conpherence_thread` 2 + DROP imagePHIDs;
+4 -4
src/__celerity_resource_map__.php
··· 918 918 ), 919 919 'conpherence-header-pane-css' => 920 920 array( 921 - 'uri' => '/res/dc654fce/rsrc/css/application/conpherence/header-pane.css', 921 + 'uri' => '/res/762c199d/rsrc/css/application/conpherence/header-pane.css', 922 922 'type' => 'css', 923 923 'requires' => 924 924 array( ··· 936 936 ), 937 937 'conpherence-message-pane-css' => 938 938 array( 939 - 'uri' => '/res/52cf7ca3/rsrc/css/application/conpherence/message-pane.css', 939 + 'uri' => '/res/ff25351b/rsrc/css/application/conpherence/message-pane.css', 940 940 'type' => 'css', 941 941 'requires' => 942 942 array( ··· 954 954 ), 955 955 'conpherence-widget-pane-css' => 956 956 array( 957 - 'uri' => '/res/197df36c/rsrc/css/application/conpherence/widget-pane.css', 957 + 'uri' => '/res/c0131a8b/rsrc/css/application/conpherence/widget-pane.css', 958 958 'type' => 'css', 959 959 'requires' => 960 960 array( ··· 1316 1316 ), 1317 1317 'javelin-behavior-conpherence-menu' => 1318 1318 array( 1319 - 'uri' => '/res/06bfc1a3/rsrc/js/application/conpherence/behavior-menu.js', 1319 + 'uri' => '/res/2bffa665/rsrc/js/application/conpherence/behavior-menu.js', 1320 1320 'type' => 'js', 1321 1321 'requires' => 1322 1322 array(
-4
src/__phutil_library_map__.php
··· 250 250 'ConpherenceDAO' => 'applications/conpherence/storage/ConpherenceDAO.php', 251 251 'ConpherenceEditor' => 'applications/conpherence/editor/ConpherenceEditor.php', 252 252 'ConpherenceFileWidgetView' => 'applications/conpherence/view/ConpherenceFileWidgetView.php', 253 - 'ConpherenceFormDragAndDropUploadControl' => 'applications/conpherence/view/ConpherenceFormDragAndDropUploadControl.php', 254 253 'ConpherenceHovercardEventListener' => 'applications/conpherence/events/ConpherenceHovercardEventListener.php', 255 - 'ConpherenceImageData' => 'applications/conpherence/constants/ConpherenceImageData.php', 256 254 'ConpherenceLayoutView' => 'applications/conpherence/view/ConpherenceLayoutView.php', 257 255 'ConpherenceListController' => 'applications/conpherence/controller/ConpherenceListController.php', 258 256 'ConpherenceMenuItemView' => 'applications/conpherence/view/ConpherenceMenuItemView.php', ··· 2058 2056 'ConpherenceDAO' => 'PhabricatorLiskDAO', 2059 2057 'ConpherenceEditor' => 'PhabricatorApplicationTransactionEditor', 2060 2058 'ConpherenceFileWidgetView' => 'ConpherenceWidgetView', 2061 - 'ConpherenceFormDragAndDropUploadControl' => 'AphrontFormControl', 2062 2059 'ConpherenceHovercardEventListener' => 'PhutilEventListener', 2063 - 'ConpherenceImageData' => 'ConpherenceConstants', 2064 2060 'ConpherenceLayoutView' => 'AphrontView', 2065 2061 'ConpherenceListController' => 'ConpherenceController', 2066 2062 'ConpherenceMenuItemView' => 'AphrontTagView',
-11
src/applications/conpherence/constants/ConpherenceImageData.php
··· 1 - <?php 2 - 3 - final class ConpherenceImageData extends ConpherenceConstants { 4 - 5 - const SIZE_ORIG = 'original'; 6 - const SIZE_HEAD = 'header'; 7 - 8 - const HEAD_WIDTH = 120; 9 - const HEAD_HEIGHT = 80; 10 - 11 - }
+3 -1
src/applications/conpherence/constants/ConpherenceTransactionType.php
··· 7 7 8 8 const TYPE_FILES = 'files'; 9 9 const TYPE_TITLE = 'title'; 10 + const TYPE_PARTICIPANTS = 'participants'; 11 + 12 + /* these two are deprecated but keep them around for legacy installs */ 10 13 const TYPE_PICTURE = 'picture'; 11 14 const TYPE_PICTURE_CROP = 'picture-crop'; 12 - const TYPE_PARTICIPANTS = 'participants'; 13 15 14 16 }
+14 -51
src/applications/conpherence/controller/ConpherenceController.php
··· 22 22 $crumbs 23 23 ->addAction( 24 24 id(new PhabricatorMenuItemView()) 25 - ->setName(pht('New Message')) 26 - ->setHref($this->getApplicationURI('new/')) 27 - ->setIcon('create')) 28 - ->addCrumb( 29 - id(new PhabricatorCrumbView()) 30 - ->setName(pht('Conpherence'))); 31 - 25 + ->setName(pht('New Message')) 26 + ->setHref($this->getApplicationURI('new/')) 27 + ->setIcon('create') 28 + ->setWorkflow(true)); 32 29 return $crumbs; 33 30 } 34 31 35 32 protected function buildHeaderPaneContent(ConpherenceThread $conpherence) { 36 - $user = $this->getRequest()->getUser(); 37 - $display_data = $conpherence->getDisplayData( 38 - $user, 39 - ConpherenceImageData::SIZE_HEAD); 40 - $edit_href = $this->getApplicationURI('update/'.$conpherence->getID().'/'); 41 - $class_mod = $display_data['image_class']; 33 + $crumbs = $this->buildApplicationCrumbs(); 34 + if ($conpherence->getTitle()) { 35 + $title = $conpherence->getTitle(); 36 + } else { 37 + $title = pht('Conpherence'); 38 + } 39 + $crumbs->addCrumb( 40 + id(new PhabricatorCrumbView()) 41 + ->setName($title)); 42 42 43 - return array( 44 - phutil_tag( 45 - 'div', 46 - array( 47 - 'class' => 'upload-photo' 48 - ), 49 - pht('Drop photo here to change this Conpherence photo.')), 50 - javelin_tag( 51 - 'a', 52 - array( 53 - 'class' => 'edit', 54 - 'href' => $edit_href, 55 - 'sigil' => 'conpherence-edit-metadata', 56 - 'meta' => array( 57 - 'action' => 'metadata' 58 - ) 59 - ), 60 - ''), 61 - phutil_tag( 62 - 'div', 63 - array( 64 - 'class' => $class_mod.'header-image', 65 - 'style' => 'background-image: url('.$display_data['image'].');' 66 - ), 67 - ''), 68 - phutil_tag( 69 - 'div', 70 - array( 71 - 'class' => $class_mod.'title', 72 - ), 73 - $display_data['title']), 74 - phutil_tag( 75 - 'div', 76 - array( 77 - 'class' => $class_mod.'subtitle', 78 - ), 79 - $display_data['subtitle']), 80 - ); 43 + return $crumbs; 81 44 } 82 45 83 46 protected function renderConpherenceTransactions(
+1 -95
src/applications/conpherence/controller/ConpherenceUpdateController.php
··· 31 31 ->setViewer($user) 32 32 ->withIDs(array($conpherence_id)) 33 33 ->needFilePHIDs(true) 34 - ->needOrigPics(true) 35 - ->needHeaderPics(true) 36 34 ->executeOne(); 37 - $supported_formats = PhabricatorFile::getTransformableImageFormats(); 38 35 39 36 $action = $request->getStr('action', ConpherenceUpdateActions::METADATA); 40 37 $latest_transaction_id = null; ··· 99 96 break; 100 97 case ConpherenceUpdateActions::METADATA: 101 98 $xactions = array(); 102 - $top = $request->getInt('image_y'); 103 - $left = $request->getInt('image_x'); 104 - $file_id = $request->getInt('file_id'); 105 - $title = $request->getStr('title'); 106 99 $updated = false; 107 - if ($file_id) { 108 - $orig_file = id(new PhabricatorFileQuery()) 109 - ->setViewer($user) 110 - ->withIDs(array($file_id)) 111 - ->executeOne(); 112 - $okay = $orig_file->isTransformableImage(); 113 - if ($okay) { 114 - $xactions[] = id(new ConpherenceTransaction()) 115 - ->setTransactionType(ConpherenceTransactionType::TYPE_PICTURE) 116 - ->setNewValue($orig_file->getPHID()); 117 - // do a transformation "crudely" 118 - $xformer = new PhabricatorImageTransformer(); 119 - $header_file = $xformer->executeConpherenceTransform( 120 - $orig_file, 121 - 0, 122 - 0, 123 - ConpherenceImageData::HEAD_WIDTH, 124 - ConpherenceImageData::HEAD_HEIGHT); 125 - // this is handled outside the editor for now. no particularly 126 - // good reason to move it inside 127 - $conpherence->setImagePHIDs( 128 - array( 129 - ConpherenceImageData::SIZE_HEAD => $header_file->getPHID(), 130 - )); 131 - $conpherence->setImages( 132 - array( 133 - ConpherenceImageData::SIZE_HEAD => $header_file, 134 - )); 135 - } else { 136 - $e_file[] = $orig_file; 137 - $errors[] = 138 - pht('This server only supports these image formats: %s.', 139 - implode(', ', $supported_formats)); 140 - } 141 - // use the existing title in this image upload case 142 - $title = $conpherence->getTitle(); 143 - $updated = true; 144 - $response_mode = 'redirect'; 145 - } 146 - 147 100 // all other metadata updates are continue requests 148 101 if (!$request->isContinueRequest()) { 149 102 break; 150 103 } 151 104 152 - if ($top !== null || $left !== null) { 153 - $file = $conpherence->getImage(ConpherenceImageData::SIZE_ORIG); 154 - $xformer = new PhabricatorImageTransformer(); 155 - $xformed = $xformer->executeConpherenceTransform( 156 - $file, 157 - $top, 158 - $left, 159 - ConpherenceImageData::HEAD_WIDTH, 160 - ConpherenceImageData::HEAD_HEIGHT); 161 - $image_phid = $xformed->getPHID(); 162 - 163 - $xactions[] = id(new ConpherenceTransaction()) 164 - ->setTransactionType( 165 - ConpherenceTransactionType::TYPE_PICTURE_CROP) 166 - ->setNewValue($image_phid); 167 - $updated = true; 168 - } 105 + $title = $request->getStr('title'); 169 106 if ($title != $conpherence->getTitle()) { 170 107 $xactions[] = id(new ConpherenceTransaction()) 171 108 ->setTransactionType(ConpherenceTransactionType::TYPE_TITLE) ··· 282 219 ->setName('title') 283 220 ->setValue($conpherence->getTitle())); 284 221 285 - $image = $conpherence->getImage(ConpherenceImageData::SIZE_ORIG); 286 - if ($image) { 287 - $form 288 - ->appendChild( 289 - id(new AphrontFormMarkupControl()) 290 - ->setLabel(pht('Image')) 291 - ->setValue(phutil_tag( 292 - 'img', 293 - array( 294 - 'src' => 295 - $conpherence->loadImageURI(ConpherenceImageData::SIZE_HEAD), 296 - )))) 297 - ->appendChild( 298 - id(new AphrontFormCropControl()) 299 - ->setLabel(pht('Crop Image')) 300 - ->setValue($image) 301 - ->setWidth(ConpherenceImageData::HEAD_WIDTH) 302 - ->setHeight(ConpherenceImageData::HEAD_HEIGHT)) 303 - ->appendChild( 304 - id(new ConpherenceFormDragAndDropUploadControl()) 305 - ->setLabel(pht('Change Image'))); 306 - } else { 307 - $form 308 - ->appendChild( 309 - id(new ConpherenceFormDragAndDropUploadControl()) 310 - ->setLabel(pht('Image'))); 311 - } 312 - 313 222 require_celerity_resource('conpherence-update-css'); 314 223 return id(new AphrontDialogView()) 315 224 ->setTitle(pht('Update Conpherence')) ··· 323 232 $conpherence_id, 324 233 $latest_transaction_id) { 325 234 326 - $need_header_pics = false; 327 235 $need_widget_data = false; 328 236 $need_transactions = false; 329 237 switch ($action) { 330 238 case ConpherenceUpdateActions::METADATA: 331 - $need_header_pics = true; 332 239 $need_transactions = true; 333 240 break; 334 241 case ConpherenceUpdateActions::MESSAGE: ··· 346 253 $conpherence = id(new ConpherenceThreadQuery()) 347 254 ->setViewer($user) 348 255 ->setAfterTransactionID($latest_transaction_id) 349 - ->needHeaderPics($need_header_pics) 350 256 ->needWidgetData($need_widget_data) 351 257 ->needTransactions($need_transactions) 352 258 ->withIDs(array($conpherence_id))
-1
src/applications/conpherence/controller/ConpherenceViewController.php
··· 40 40 $query = id(new ConpherenceThreadQuery()) 41 41 ->setViewer($user) 42 42 ->withIDs(array($conpherence_id)) 43 - ->needHeaderPics(true) 44 43 ->needParticipantCache(true) 45 44 ->needTransactions(true) 46 45 ->setTransactionLimit(ConpherenceThreadQuery::TRANSACTION_LIMIT);
+4 -3
src/applications/conpherence/controller/ConpherenceWidgetController.php
··· 107 107 'widget' => 'widgets-people', 108 108 ), 109 109 'id' => 'widgets-people-toggle', 110 - 'class' => 'sprite-conpherence conpherence_people_off' 110 + 'class' => 111 + 'sprite-conpherence conpherence_people_on conpherence_people_off' 111 112 ), 112 113 ''), 113 114 javelin_tag( ··· 119 120 ), 120 121 'id' => 'widgets-files-toggle', 121 122 'class' => 122 - 'sprite-conpherence conpherence_files_on conpherence_files_off' 123 + 'sprite-conpherence conpherence_files_off' 123 124 ), 124 125 ''), 125 126 javelin_tag( ··· 153 154 'class' => 'widgets-body', 154 155 'id' => 'widgets-people', 155 156 'sigil' => 'widgets-people', 156 - 'style' => 'display: none;' 157 157 ), 158 158 id(new ConpherencePeopleWidgetView()) 159 159 ->setUser($user) ··· 165 165 'class' => 'widgets-body', 166 166 'id' => 'widgets-files', 167 167 'sigil' => 'widgets-files', 168 + 'style' => 'display: none;' 168 169 ), 169 170 id(new ConpherenceFileWidgetView()) 170 171 ->setUser($user)
-19
src/applications/conpherence/editor/ConpherenceEditor.php
··· 45 45 $types[] = PhabricatorTransactions::TYPE_COMMENT; 46 46 47 47 $types[] = ConpherenceTransactionType::TYPE_TITLE; 48 - $types[] = ConpherenceTransactionType::TYPE_PICTURE; 49 - $types[] = ConpherenceTransactionType::TYPE_PICTURE_CROP; 50 48 $types[] = ConpherenceTransactionType::TYPE_PARTICIPANTS; 51 49 $types[] = ConpherenceTransactionType::TYPE_FILES; 52 50 ··· 60 58 switch ($xaction->getTransactionType()) { 61 59 case ConpherenceTransactionType::TYPE_TITLE: 62 60 return $object->getTitle(); 63 - case ConpherenceTransactionType::TYPE_PICTURE: 64 - return $object->getImagePHID(ConpherenceImageData::SIZE_ORIG); 65 - case ConpherenceTransactionType::TYPE_PICTURE_CROP: 66 - return $object->getImagePHID(ConpherenceImageData::SIZE_HEAD); 67 61 case ConpherenceTransactionType::TYPE_PARTICIPANTS: 68 62 return $object->getParticipantPHIDs(); 69 63 case ConpherenceTransactionType::TYPE_FILES: ··· 77 71 78 72 switch ($xaction->getTransactionType()) { 79 73 case ConpherenceTransactionType::TYPE_TITLE: 80 - case ConpherenceTransactionType::TYPE_PICTURE: 81 - case ConpherenceTransactionType::TYPE_PICTURE_CROP: 82 74 return $xaction->getNewValue(); 83 75 case ConpherenceTransactionType::TYPE_PARTICIPANTS: 84 76 case ConpherenceTransactionType::TYPE_FILES: ··· 114 106 break; 115 107 case ConpherenceTransactionType::TYPE_TITLE: 116 108 $object->setTitle($xaction->getNewValue()); 117 - break; 118 - case ConpherenceTransactionType::TYPE_PICTURE: 119 - $object->setImagePHID( 120 - $xaction->getNewValue(), 121 - ConpherenceImageData::SIZE_ORIG); 122 - break; 123 - case ConpherenceTransactionType::TYPE_PICTURE_CROP: 124 - $object->setImagePHID( 125 - $xaction->getNewValue(), 126 - ConpherenceImageData::SIZE_HEAD); 127 109 break; 128 110 } 129 111 $this->updateRecentParticipantPHIDs($object, $xaction); ··· 241 223 $type = $u->getTransactionType(); 242 224 switch ($type) { 243 225 case ConpherenceTransactionType::TYPE_TITLE: 244 - case ConpherenceTransactionType::TYPE_PICTURE: 245 226 return $v; 246 227 case ConpherenceTransactionType::TYPE_FILES: 247 228 case ConpherenceTransactionType::TYPE_PARTICIPANTS:
-56
src/applications/conpherence/query/ConpherenceThreadQuery.php
··· 11 11 private $phids; 12 12 private $ids; 13 13 private $needWidgetData; 14 - private $needHeaderPics; 15 - private $needOrigPics; 16 14 private $needTransactions; 17 15 private $needParticipantCache; 18 16 private $needFilePHIDs; ··· 27 25 28 26 public function needParticipantCache($participant_cache) { 29 27 $this->needParticipantCache = $participant_cache; 30 - return $this; 31 - } 32 - 33 - public function needOrigPics($need_orig_pics) { 34 - $this->needOrigPics = $need_orig_pics; 35 - return $this; 36 - } 37 - 38 - public function needHeaderPics($need_header_pics) { 39 - $this->needHeaderPics = $need_header_pics; 40 28 return $this; 41 29 } 42 30 ··· 109 97 } 110 98 if ($this->needWidgetData) { 111 99 $this->loadWidgetData($conpherences); 112 - } 113 - if ($this->needOrigPics) { 114 - $this->loadOrigPics($conpherences); 115 - } 116 - if ($this->needHeaderPics) { 117 - $this->loadHeaderPics($conpherences); 118 100 } 119 101 } 120 102 ··· 299 281 'files_authors' => $files_authors 300 282 ); 301 283 $conpherence->attachWidgetData($widget_data); 302 - } 303 - 304 - return $this; 305 - } 306 - 307 - private function loadOrigPics(array $conpherences) { 308 - return $this->loadPics( 309 - $conpherences, 310 - ConpherenceImageData::SIZE_ORIG); 311 - } 312 - 313 - private function loadHeaderPics(array $conpherences) { 314 - return $this->loadPics( 315 - $conpherences, 316 - ConpherenceImageData::SIZE_HEAD); 317 - } 318 - 319 - private function loadPics(array $conpherences, $size) { 320 - $conpherence_pic_phids = array(); 321 - foreach ($conpherences as $conpherence) { 322 - $phid = $conpherence->getImagePHID($size); 323 - if ($phid) { 324 - $conpherence_pic_phids[$conpherence->getPHID()] = $phid; 325 - } 326 - } 327 - 328 - if (!$conpherence_pic_phids) { 329 - return $this; 330 - } 331 - 332 - $files = id(new PhabricatorFileQuery()) 333 - ->setViewer($this->getViewer()) 334 - ->withPHIDs($conpherence_pic_phids) 335 - ->execute(); 336 - $files = mpull($files, null, 'getPHID'); 337 - 338 - foreach ($conpherence_pic_phids as $conpherence_phid => $pic_phid) { 339 - $conpherences[$conpherence_phid]->setImage($files[$pic_phid], $size); 340 284 } 341 285 342 286 return $this;
+1 -49
src/applications/conpherence/storage/ConpherenceThread.php
··· 11 11 protected $title; 12 12 protected $messageCount; 13 13 protected $recentParticipantPHIDs = array(); 14 - protected $imagePHIDs = array(); 15 14 protected $mailKey; 16 15 17 16 private $participants; ··· 26 25 self::CONFIG_AUX_PHID => true, 27 26 self::CONFIG_SERIALIZATION => array( 28 27 'recentParticipantPHIDs' => self::SERIALIZATION_JSON, 29 - 'imagePHIDs' => self::SERIALIZATION_JSON, 30 28 ), 31 29 ) + parent::getConfiguration(); 32 30 } ··· 43 41 return parent::save(); 44 42 } 45 43 46 - public function getImagePHID($size) { 47 - $image_phids = $this->getImagePHIDs(); 48 - return idx($image_phids, $size); 49 - } 50 - public function setImagePHID($phid, $size) { 51 - $image_phids = $this->getImagePHIDs(); 52 - $image_phids[$size] = $phid; 53 - return $this->setImagePHIDs($image_phids); 54 - } 55 - 56 - public function getImage($size) { 57 - $images = $this->getImages(); 58 - return idx($images, $size); 59 - } 60 - public function setImage(PhabricatorFile $file, $size) { 61 - $files = $this->getImages(); 62 - $files[$size] = $file; 63 - return $this->setImages($files); 64 - } 65 - public function setImages(array $files) { 66 - $this->images = $files; 67 - return $this; 68 - } 69 - private function getImages() { 70 - return $this->images; 71 - } 72 - 73 44 public function attachParticipants(array $participants) { 74 45 assert_instances_of($participants, 'ConpherenceParticipant'); 75 46 $this->participants = $participants; ··· 162 133 return $this->widgetData; 163 134 } 164 135 165 - public function loadImageURI($size) { 166 - $file = $this->getImage($size); 167 - 168 - if ($file) { 169 - return $file->getBestURI(); 170 - } 171 - 172 - return PhabricatorUser::getDefaultProfileImageURI(); 173 - } 174 - 175 136 public function getDisplayData(PhabricatorUser $user, $size) { 176 137 $recent_phids = $this->getRecentParticipantPHIDs(); 177 138 $handles = $this->getHandles(); ··· 200 161 if (!$title) { 201 162 $title = $lucky_handle->getName(); 202 163 } 203 - 204 - $image = $this->getImagePHID($size); 205 - if ($image) { 206 - $img_src = $this->getImage($size)->getBestURI(); 207 - $img_class = 'custom-'; 208 - } else { 209 - $img_src = $lucky_handle->getImageURI(); 210 - $img_class = null; 211 - } 164 + $img_src = $lucky_handle->getImageURI(); 212 165 213 166 $count = 0; 214 167 $final = false; ··· 242 195 'unread_count' => $unread_count, 243 196 'epoch' => $this->getDateModified(), 244 197 'image' => $img_src, 245 - 'image_class' => $img_class, 246 198 ); 247 199 } 248 200
+3 -7
src/applications/conpherence/storage/ConpherenceTransaction.php
··· 39 39 case ConpherenceTransactionType::TYPE_PARTICIPANTS: 40 40 return ($old === null); 41 41 case ConpherenceTransactionType::TYPE_TITLE: 42 - case ConpherenceTransactionType::TYPE_PICTURE: 43 42 return false; 44 43 case ConpherenceTransactionType::TYPE_FILES: 44 + return true; 45 + // we used to have them so just always hide 46 + case ConpherenceTransactionType::TYPE_PICTURE: 45 47 case ConpherenceTransactionType::TYPE_PICTURE_CROP: 46 48 return true; 47 49 } ··· 98 100 } 99 101 return $title; 100 102 break; 101 - case ConpherenceTransactionType::TYPE_PICTURE: 102 - return pht( 103 - '%s updated the conpherence image.', 104 - $this->renderHandleLink($author_phid)); 105 103 case ConpherenceTransactionType::TYPE_PARTICIPANTS: 106 104 $add = array_diff($new, $old); 107 105 $rem = array_diff($old, $new); ··· 142 140 143 141 $phids[] = $this->getAuthorPHID(); 144 142 switch ($this->getTransactionType()) { 145 - case ConpherenceTransactionType::TYPE_PICTURE: 146 143 case ConpherenceTransactionType::TYPE_TITLE: 147 144 case ConpherenceTransactionType::TYPE_FILES: 148 145 break; ··· 150 147 $phids = array_merge($phids, $this->getOldValue()); 151 148 $phids = array_merge($phids, $this->getNewValue()); 152 149 break; 153 - 154 150 } 155 151 156 152 return $phids;
-40
src/applications/conpherence/view/ConpherenceFormDragAndDropUploadControl.php
··· 1 - <?php 2 - 3 - final class ConpherenceFormDragAndDropUploadControl extends AphrontFormControl { 4 - 5 - private $dropID; 6 - 7 - public function setDropID($drop_id) { 8 - $this->dropID = $drop_id; 9 - return $this; 10 - } 11 - public function getDropID() { 12 - return $this->dropID; 13 - } 14 - 15 - protected function getCustomControlClass() { 16 - return null; 17 - } 18 - 19 - protected function renderInput() { 20 - 21 - $drop_id = celerity_generate_unique_node_id(); 22 - Javelin::initBehavior('conpherence-drag-and-drop-photo', 23 - array( 24 - 'target' => $drop_id, 25 - 'form_pane' => 'conpherence-form', 26 - 'upload_uri' => '/file/dropupload/', 27 - 'activated_class' => 'conpherence-dialogue-upload-photo', 28 - )); 29 - require_celerity_resource('conpherence-update-css'); 30 - 31 - return phutil_tag( 32 - 'div', 33 - array( 34 - 'id' => $drop_id, 35 - 'class' => 'conpherence-dialogue-drag-photo', 36 - ), 37 - pht('Drag and drop an image here to upload it.')); 38 - } 39 - 40 - }
-14
src/applications/conpherence/view/ConpherenceLayoutView.php
··· 65 65 'hasWidgets' => false, 66 66 )); 67 67 68 - Javelin::initBehavior('conpherence-drag-and-drop-photo', 69 - array( 70 - 'target' => 'conpherence-header-pane', 71 - 'form_pane' => 'conpherence-form', 72 - 'upload_uri' => '/file/dropupload/', 73 - 'activated_class' => 'conpherence-header-upload-photo', 74 - )); 75 - 76 68 $all_views = 1; 77 69 $devices_only = 0; 78 70 Javelin::initBehavior( ··· 94 86 'tagname' => 'div', 95 87 'sigil' => 'phabricator-nav-column-background', 96 88 'showstyle' => 'block', 97 - 'hidestyle' => 'none', 98 - 'desktopstyle' => 'block'), 99 - array( 100 - 'tagname' => 'a', 101 - 'sigil' => 'conpherence-new-conversation', 102 - 'showstyle' => 'none', 103 89 'hidestyle' => 'none', 104 90 'desktopstyle' => 'block'), 105 91 )
-10
src/applications/conpherence/view/ConpherenceThreadListView.php
··· 37 37 ->addClass('conpherence-menu') 38 38 ->setID('conpherence-menu'); 39 39 40 - $menu->addMenuItem( 41 - id(new PhabricatorMenuItemView()) 42 - ->addSigil('conpherence-new-conversation') 43 - ->setName(pht('New Message')) 44 - ->setWorkflow(true) 45 - ->setKey('new') 46 - ->setHref($this->baseURI.'new/') 47 - ->setType(PhabricatorMenuItemView::TYPE_BUTTON)); 48 - 49 - $menu->newLabel(''); 50 40 $this->addThreadsToMenu($menu, $this->threads); 51 41 52 42 return $menu;
-13
src/applications/conpherence/view/ConpherenceTransactionView.php
··· 46 46 $content = null; 47 47 switch ($transaction->getTransactionType()) { 48 48 case ConpherenceTransactionType::TYPE_TITLE: 49 - case ConpherenceTransactionType::TYPE_PICTURE: 50 - case ConpherenceTransactionType::TYPE_PICTURE_CROP: 51 49 $content = $transaction->getTitle(); 52 50 $transaction_view->addClass('conpherence-edited'); 53 51 break; 54 52 case ConpherenceTransactionType::TYPE_FILES: 55 53 $content = $transaction->getTitle(); 56 - break; 57 - case ConpherenceTransactionType::TYPE_PICTURE: 58 - $img = $transaction->getHandle($transaction->getNewValue()); 59 - $content = array( 60 - $transaction->getTitle(), 61 - phutil_tag( 62 - 'img', 63 - array( 64 - 'src' => $img->getImageURI() 65 - ))); 66 - $transaction_view->addClass('conpherence-edited'); 67 54 break; 68 55 case ConpherenceTransactionType::TYPE_PARTICIPANTS: 69 56 $content = $transaction->getTitle();
+1 -1
src/applications/differential/view/DifferentialChangesetListView.php
··· 317 317 'target' => '_blank', 318 318 'sigil' => 'differential-view-options', 319 319 ), 320 - pht("View Options \xE2\x96\xBC")); 320 + pht('View Options') . " \xE2\x96\xBC"); 321 321 } 322 322 323 323 }
+5
src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php
··· 1306 1306 'type' => 'sql', 1307 1307 'name' => $this->getPatchPath('20130519.diviner.sql'), 1308 1308 ), 1309 + '20130521.dropconphimages.sql' => array( 1310 + 'type' => 'sql', 1311 + 'name' => $this->getPatchPath('20130521.dropconphimages.sql'), 1312 + ), 1313 + 1309 1314 ); 1310 1315 } 1311 1316 }
-90
webroot/rsrc/css/application/conpherence/header-pane.css
··· 2 2 * @provides conpherence-header-pane-css 3 3 */ 4 4 5 - .conpherence-header-pane { 6 - border-bottom: 1px solid #ccc; 7 - height: 80px; 8 - width: 100%; 9 - } 10 - 11 5 .device .conpherence-header-pane { 12 6 display: none; 13 7 } 14 - 15 - .conpherence-header-pane .edit { 16 - float: right; 17 - margin: 16px 16px 0px 0px; 18 - height: 50px; 19 - width: 50px; 20 - background-image: url('/rsrc/image/actions/edit.png'); 21 - } 22 - 23 - .conpherence-header-pane .header-image { 24 - position: absolute; 25 - top: 15px; 26 - left: 15px; 27 - height: 50px; 28 - width: 50px; 29 - } 30 - 31 - .conpherence-header-pane .custom-header-image { 32 - position: absolute; 33 - top: 0px; 34 - left: 0px; 35 - height: 80px; 36 - width: 120px; 37 - } 38 - 39 - .conpherence-header-pane .title { 40 - position: absolute; 41 - font-size: 16px; 42 - font-weight: bold; 43 - left: 77px; 44 - top: 21px; 45 - right: 66px; 46 - overflow-x: auto; 47 - } 48 - 49 - .conpherence-header-pane .custom-title { 50 - position: absolute; 51 - font-size: 16px; 52 - font-weight: bold; 53 - left: 132px; 54 - top: 21px; 55 - right: 66px; 56 - overflow-x: auto; 57 - } 58 - 59 - .conpherence-header-pane .subtitle { 60 - position: absolute; 61 - left: 77px; 62 - top: 40px; 63 - right: 66px; 64 - color: #bfbfbf; 65 - } 66 - 67 - .conpherence-header-pane .custom-subtitle { 68 - position: absolute; 69 - left: 132px; 70 - top: 40px; 71 - right: 66px; 72 - color: #bfbfbf; 73 - } 74 - 75 - .conpherence-header-pane .upload-photo { 76 - display: none; 77 - } 78 - 79 - .conpherence-header-upload-photo .upload-photo { 80 - display: block; 81 - width: 100%; 82 - padding: 32px; 83 - font-size: 16px; 84 - background: #99ff99; 85 - border-color: #669966; 86 - } 87 - 88 - .conpherence-header-upload-photo .edit, 89 - .conpherence-header-upload-photo .header-image, 90 - .conpherence-header-upload-photo .custom-header-image, 91 - .conpherence-header-upload-photo .title, 92 - .conpherence-header-upload-photo .custom-title, 93 - .conpherence-header-upload-photo .subtitle, 94 - .conpherence-header-upload-photo .custom-subtitle { 95 - display: none; 96 - } 97 -
+5 -5
webroot/rsrc/css/application/conpherence/message-pane.css
··· 6 6 position: fixed; 7 7 left: 300px; 8 8 right: 281px; 9 - top: 125px; 9 + top: 76px; 10 10 min-width: 300px; 11 11 width: auto; 12 12 height: 100%; ··· 33 33 position: fixed; 34 34 left: 300px; 35 35 right: 281px; 36 - top: 125px; 37 - bottom: 142px; 36 + top: 76px; 37 + bottom: 190px; 38 38 overflow-y: auto; 39 39 box-shadow: inset 1px 4px 5px rgba(0,0,0,0.1); 40 40 -webkit-overflow-scrolling: touch; ··· 52 52 .conpherence-message-pane .phabricator-form-view { 53 53 border-width: 0; 54 54 background: none; 55 - height: 143px; 55 + height: 190px; 56 56 padding: 0; 57 57 position: fixed; 58 58 bottom: 0; ··· 121 121 } 122 122 123 123 .conpherence-message-pane .remarkup-assist-textarea { 124 - height: 6em; 124 + height: 124px; 125 125 padding: 6px; 126 126 border-width: 0 0 1px 0; 127 127 border-color: #e7e7e7;
+3 -2
webroot/rsrc/css/application/conpherence/widget-pane.css
··· 5 5 .conpherence-widget-pane { 6 6 position: fixed; 7 7 right: 0px; 8 - top: 125px; 8 + top: 76px; 9 9 width: 280px; 10 10 height: 100%; 11 11 border-width: 0 0 0 1px; ··· 75 75 .conpherence-widget-pane .widgets-body { 76 76 position: fixed; 77 77 overflow-y: auto; 78 - top: 165px; 78 + top: 116px; 79 79 bottom: 0px; 80 80 width: 100%; 81 81 } ··· 161 161 .aphront-multi-column-fluid .aphront-multi-column-5-up 162 162 .aphront-multi-column-column-outer { 163 163 width: 20%; 164 + margin-bottom: 0px; 164 165 } 165 166 .conpherence-widget-pane #widgets-calendar .aphront-multi-column-view 166 167 .aphront-multi-column-column-last {
-39
webroot/rsrc/js/application/conpherence/behavior-drag-and-drop-photo.js
··· 1 - /** 2 - * @provides javelin-behavior-conpherence-drag-and-drop-photo 3 - * @requires javelin-behavior 4 - * javelin-dom 5 - * javelin-workflow 6 - * phabricator-drag-and-drop-file-upload 7 - */ 8 - 9 - JX.behavior('conpherence-drag-and-drop-photo', function(config) { 10 - 11 - var target = JX.$(config.target); 12 - var form_pane = JX.$(config.form_pane); 13 - 14 - function onupload(f) { 15 - var data = { 16 - 'file_id' : f.getID(), 17 - 'action' : 'metadata' 18 - }; 19 - 20 - var form = JX.DOM.find(form_pane, 'form'); 21 - var workflow = JX.Workflow.newFromForm(form, data); 22 - workflow.start(); 23 - } 24 - 25 - if (JX.PhabricatorDragAndDropFileUpload.isSupported()) { 26 - var drop = new JX.PhabricatorDragAndDropFileUpload(target) 27 - .setURI(config.upload_uri); 28 - drop.listen('didBeginDrag', function(e) { 29 - JX.DOM.alterClass(target, config.activated_class, true); 30 - }); 31 - drop.listen('didEndDrag', function(e) { 32 - JX.DOM.alterClass(target, config.activated_class, false); 33 - }); 34 - drop.listen('didUpload', onupload); 35 - drop.start(); 36 - } 37 - 38 - }); 39 -
+1 -1
webroot/rsrc/js/application/conpherence/behavior-menu.js
··· 149 149 'conpherence-toggle-widget', 150 150 null, 151 151 { 152 - widget : 'widgets-files' 152 + widget : 'widgets-people' 153 153 } 154 154 ); 155 155 }