Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13969188
D9549.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D9549.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -79,9 +79,9 @@
'rsrc/css/application/paste/paste.css' => 'aa1767d1',
'rsrc/css/application/people/people-profile.css' => 'ba7b2762',
'rsrc/css/application/phame/phame.css' => '19ecc703',
- 'rsrc/css/application/pholio/pholio-edit.css' => 'b9e59b6d',
+ 'rsrc/css/application/pholio/pholio-edit.css' => '90616955',
'rsrc/css/application/pholio/pholio-inline-comments.css' => '3d5a5590',
- 'rsrc/css/application/pholio/pholio.css' => '344c1440',
+ 'rsrc/css/application/pholio/pholio.css' => '5bd4c882',
'rsrc/css/application/phortune/phortune-credit-card-form.css' => 'b25b4beb',
'rsrc/css/application/phrequent/phrequent.css' => 'ffc185ad',
'rsrc/css/application/phriction/phriction-document-css.css' => '7d7f0071',
@@ -398,7 +398,7 @@
'rsrc/js/application/passphrase/phame-credential-control.js' => '1e1c8a59',
'rsrc/js/application/phame/phame-post-preview.js' => '61d927ec',
'rsrc/js/application/pholio/behavior-pholio-mock-edit.js' => '1e1e8bb0',
- 'rsrc/js/application/pholio/behavior-pholio-mock-view.js' => 'd7f9b108',
+ 'rsrc/js/application/pholio/behavior-pholio-mock-view.js' => '81f57c3a',
'rsrc/js/application/phortune/behavior-balanced-payment-form.js' => '3b3e1664',
'rsrc/js/application/phortune/behavior-stripe-payment-form.js' => '1693a296',
'rsrc/js/application/phortune/behavior-test-payment-form.js' => 'b3e5ee60',
@@ -622,7 +622,7 @@
'javelin-behavior-phabricator-watch-anchor' => '06e05112',
'javelin-behavior-phame-post-preview' => '61d927ec',
'javelin-behavior-pholio-mock-edit' => '1e1e8bb0',
- 'javelin-behavior-pholio-mock-view' => 'd7f9b108',
+ 'javelin-behavior-pholio-mock-view' => '81f57c3a',
'javelin-behavior-phui-object-box-tabs' => 'a3e2244e',
'javelin-behavior-phui-timeline-dropdown-menu' => '4d94d9c3',
'javelin-behavior-policy-control' => 'f3fef818',
@@ -748,8 +748,8 @@
'phabricator-uiexample-reactor-sendproperties' => '551add57',
'phabricator-zindex-css' => 'efb673ac',
'phame-css' => '19ecc703',
- 'pholio-css' => '344c1440',
- 'pholio-edit-css' => 'b9e59b6d',
+ 'pholio-css' => '5bd4c882',
+ 'pholio-edit-css' => '90616955',
'pholio-inline-comments-css' => '3d5a5590',
'phortune-credit-card-form' => '2290aeef',
'phortune-credit-card-form-css' => 'b25b4beb',
@@ -1421,6 +1421,21 @@
0 => 'javelin-behavior',
1 => 'javelin-history',
),
+ '81f57c3a' =>
+ array(
+ 0 => 'javelin-behavior',
+ 1 => 'javelin-util',
+ 2 => 'javelin-stratcom',
+ 3 => 'javelin-dom',
+ 4 => 'javelin-vector',
+ 5 => 'javelin-magical-init',
+ 6 => 'javelin-request',
+ 7 => 'javelin-history',
+ 8 => 'javelin-workflow',
+ 9 => 'javelin-mask',
+ 10 => 'javelin-behavior-device',
+ 11 => 'phabricator-keyboard-shortcut',
+ ),
'82ce2142' =>
array(
0 => 'aphront-typeahead-control-css',
@@ -1868,21 +1883,6 @@
3 => 'javelin-dom',
4 => 'phabricator-keyboard-shortcut',
),
- 'd7f9b108' =>
- array(
- 0 => 'javelin-behavior',
- 1 => 'javelin-util',
- 2 => 'javelin-stratcom',
- 3 => 'javelin-dom',
- 4 => 'javelin-vector',
- 5 => 'javelin-magical-init',
- 6 => 'javelin-request',
- 7 => 'javelin-history',
- 8 => 'javelin-workflow',
- 9 => 'javelin-mask',
- 10 => 'javelin-behavior-device',
- 11 => 'phabricator-keyboard-shortcut',
- ),
'd83a949c' =>
array(
0 => 'javelin-behavior',
diff --git a/src/applications/pholio/view/PholioMockImagesView.php b/src/applications/pholio/view/PholioMockImagesView.php
--- a/src/applications/pholio/view/PholioMockImagesView.php
+++ b/src/applications/pholio/view/PholioMockImagesView.php
@@ -67,6 +67,13 @@
$nonimage_uri = celerity_get_resource_uri(
'rsrc/image/icon/fatcow/thumbnails/default.p100.png');
+ $engine = id(new PhabricatorMarkupEngine())
+ ->setViewer($this->getUser());
+ foreach ($mock->getAllImages() as $image) {
+ $engine->addObject($image, 'default');
+ }
+ $engine->process();
+
foreach ($mock->getAllImages() as $image) {
$file = $image->getFile();
$metadata = $file->getMetadata();
@@ -86,7 +93,7 @@
'width' => $x,
'height' => $y,
'title' => $image->getName(),
- 'desc' => $image->getDescription(),
+ 'descriptionMarkup' => $engine->getOutput($image, 'default'),
'isObsolete' => (bool)$image->getIsObsolete(),
'isImage' => $file->isViewableImage(),
'isViewable' => $file->isViewableInBrowser(),
diff --git a/src/applications/pholio/view/PholioUploadedImageView.php b/src/applications/pholio/view/PholioUploadedImageView.php
--- a/src/applications/pholio/view/PholioUploadedImageView.php
+++ b/src/applications/pholio/view/PholioUploadedImageView.php
@@ -34,7 +34,7 @@
->setSigil('image-title')
->setLabel(pht('Title'));
- $description = id(new AphrontFormTextAreaControl())
+ $description = id(new PhabricatorRemarkupControl())
->setName('description_'.$phid)
->setValue($image->getDescription())
->setSigil('image-description')
diff --git a/webroot/rsrc/css/application/pholio/pholio-edit.css b/webroot/rsrc/css/application/pholio/pholio-edit.css
--- a/webroot/rsrc/css/application/pholio/pholio-edit.css
+++ b/webroot/rsrc/css/application/pholio/pholio-edit.css
@@ -86,6 +86,7 @@
text-align: left;
padding: 0;
margin: 0;
+ clear: both;
}
.pholio-uploaded-image .pholio-image-details .aphront-form-label {
diff --git a/webroot/rsrc/css/application/pholio/pholio.css b/webroot/rsrc/css/application/pholio/pholio.css
--- a/webroot/rsrc/css/application/pholio/pholio.css
+++ b/webroot/rsrc/css/application/pholio/pholio.css
@@ -200,3 +200,8 @@
.device-desktop a.pholio-image-button-link:hover .phui-icon-view {
color: {$sky};
}
+
+.pholio-image-description {
+ padding: 12px;
+ border-top: 1px solid {$lightblueborder};
+}
diff --git a/webroot/rsrc/js/application/pholio/behavior-pholio-mock-view.js b/webroot/rsrc/js/application/pholio/behavior-pholio-mock-view.js
--- a/webroot/rsrc/js/application/pholio/behavior-pholio-mock-view.js
+++ b/webroot/rsrc/js/application/pholio/behavior-pholio-mock-view.js
@@ -628,12 +628,6 @@
image.title);
info.push(title);
- var desc = JX.$N(
- 'div',
- {className: 'pholio-image-description'},
- image.desc);
- info.push(desc);
-
if (!image.isObsolete) {
var embed = JX.$N(
'div',
@@ -648,7 +642,12 @@
}
info = JX.$N('div', {className: 'pholio-image-info'}, info);
- return [buttons, info];
+ var desc = JX.$N(
+ 'div',
+ {className: 'pholio-image-description'},
+ JX.$H(image.descriptionMarkup));
+
+ return [buttons, info, desc];
}
function render_reticle(classes) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 18 2024, 1:01 AM (4 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6720363
Default Alt Text
D9549.diff (6 KB)
Attached To
Mode
D9549: Treat Pholio image descriptions as Remarkup, not plain text
Attached
Detach File
Event Timeline
Log In to Comment