Page MenuHomePhabricator

D9658.id23198.diff
No OneTemporary

D9658.id23198.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -81,7 +81,7 @@
'rsrc/css/application/phame/phame.css' => '19ecc703',
'rsrc/css/application/pholio/pholio-edit.css' => '3ad9d1ee',
'rsrc/css/application/pholio/pholio-inline-comments.css' => '2703fdb9',
- 'rsrc/css/application/pholio/pholio.css' => '5591f1e9',
+ 'rsrc/css/application/pholio/pholio.css' => '209b1f08',
'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',
@@ -401,7 +401,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' => '929d95eb',
+ 'rsrc/js/application/pholio/behavior-pholio-mock-view.js' => '91a166c7',
'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',
@@ -626,7 +626,7 @@
'javelin-behavior-phabricator-watch-anchor' => '06e05112',
'javelin-behavior-phame-post-preview' => '61d927ec',
'javelin-behavior-pholio-mock-edit' => '1e1e8bb0',
- 'javelin-behavior-pholio-mock-view' => '929d95eb',
+ 'javelin-behavior-pholio-mock-view' => '91a166c7',
'javelin-behavior-phui-object-box-tabs' => 'a3e2244e',
'javelin-behavior-phui-timeline-dropdown-menu' => '4d94d9c3',
'javelin-behavior-policy-control' => 'f3fef818',
@@ -752,7 +752,7 @@
'phabricator-uiexample-reactor-sendproperties' => '551add57',
'phabricator-zindex-css' => 'efb673ac',
'phame-css' => '19ecc703',
- 'pholio-css' => '5591f1e9',
+ 'pholio-css' => '209b1f08',
'pholio-edit-css' => '3ad9d1ee',
'pholio-inline-comments-css' => '2703fdb9',
'phortune-credit-card-form' => '2290aeef',
@@ -1520,7 +1520,7 @@
3 => 'javelin-mask',
4 => 'phabricator-drag-and-drop-file-upload',
),
- '929d95eb' =>
+ '91a166c7' =>
array(
0 => 'javelin-behavior',
1 => 'javelin-util',
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
@@ -73,13 +73,18 @@
$engine->addObject($image, 'default');
}
$engine->process();
-
+ $current_set = 0;
foreach ($mock->getAllImages() as $image) {
$file = $image->getFile();
$metadata = $file->getMetadata();
$x = idx($metadata, PhabricatorFile::METADATA_IMAGE_WIDTH);
$y = idx($metadata, PhabricatorFile::METADATA_IMAGE_HEIGHT);
+ $is_obs = (bool)$image->getIsObsolete();
+ if (!$is_obs) {
+ $current_set++;
+ }
+
$history_uri = '/pholio/image/history/'.$image->getID().'/';
$images[] = array(
'id' => $image->getID(),
@@ -129,6 +134,7 @@
'navsequence' => $navsequence,
'fullIcon' => hsprintf('%s', $full_icon),
'downloadIcon' => hsprintf('%s', $download_icon),
+ 'currentSetSize' => $current_set,
);
Javelin::initBehavior('pholio-mock-view', $config);
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
@@ -240,6 +240,10 @@
border-top: 1px solid {$thinblueborder};
}
+.pholio-image-revision {
+ color: {$bluetext};
+}
+
.pholio-history-header {
vertical-align: middle;
color: {$lightbluetext};
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
@@ -644,12 +644,18 @@
info.push(title);
if (!image.isObsolete) {
- var embed = JX.$N(
+ var img_len = config.currentSetSize;
+ var rev = JX.$N(
'div',
- {className: 'pholio-image-embedding'},
- JX.$H('Embed this image: {M' + config.mockID +
- ', image=' + image.id + '}'));
- info.push(embed);
+ {className: 'pholio-image-revision'},
+ JX.$H('Current Revision (' + img_len + ' images)'));
+ info.push(rev);
+ } else {
+ var prev = JX.$N(
+ 'div',
+ {className: 'pholio-image-revision'},
+ JX.$H('(Previous Revision)'));
+ info.push(prev);
}
for (var ii = 0; ii < info.length; ii++) {

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 20, 5:13 AM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6735231
Default Alt Text
D9658.id23198.diff (4 KB)

Event Timeline