Page MenuHomePhorge

D25757.1734701545.diff
No OneTemporary

D25757.1734701545.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -12,7 +12,7 @@
'core.pkg.css' => 'ac619266',
'core.pkg.js' => '2eeda9e0',
'dark-console.pkg.js' => '187792c2',
- 'differential.pkg.css' => '6d3700f0',
+ 'differential.pkg.css' => 'fda9518d',
'differential.pkg.js' => '46fcb3af',
'diffusion.pkg.css' => '354279ea',
'diffusion.pkg.js' => '78c9885d',
@@ -63,7 +63,7 @@
'rsrc/css/application/diff/diff-tree-view.css' => 'e2d3e222',
'rsrc/css/application/diff/inline-comment-summary.css' => '81eb368d',
'rsrc/css/application/differential/add-comment.css' => '7e5900d9',
- 'rsrc/css/application/differential/changeset-view.css' => '1b0476bc',
+ 'rsrc/css/application/differential/changeset-view.css' => '979e688c',
'rsrc/css/application/differential/core.css' => '7300a73e',
'rsrc/css/application/differential/phui-inline-comment.css' => '9863a85e',
'rsrc/css/application/differential/revision-comment.css' => '7dbc8d1d',
@@ -560,7 +560,7 @@
'conpherence-transaction-css' => '3a3f5e7e',
'd3' => 'e97b4b78',
'diff-tree-view-css' => 'e2d3e222',
- 'differential-changeset-view-css' => '1b0476bc',
+ 'differential-changeset-view-css' => '979e688c',
'differential-core-view-css' => '7300a73e',
'differential-revision-add-comment-css' => '7e5900d9',
'differential-revision-comment-css' => '7dbc8d1d',
@@ -1056,9 +1056,6 @@
'javelin-util',
'phabricator-keyboard-shortcut-manager',
),
- '1b0476bc' => array(
- 'phui-inline-comment-view-css',
- ),
'1b6acc2a' => array(
'javelin-magical-init',
'javelin-util',
@@ -1777,6 +1774,9 @@
'javelin-stratcom',
'phabricator-notification',
),
+ '979e688c' => array(
+ 'phui-inline-comment-view-css',
+ ),
'98ef467f' => array(
'javelin-behavior',
'javelin-dom',
diff --git a/src/applications/differential/view/DifferentialChangesetDetailView.php b/src/applications/differential/view/DifferentialChangesetDetailView.php
--- a/src/applications/differential/view/DifferentialChangesetDetailView.php
+++ b/src/applications/differential/view/DifferentialChangesetDetailView.php
@@ -233,6 +233,22 @@
$show_directory_uri = phutil_string_cast($show_directory_uri);
}
+ Javelin::initBehavior('phabricator-clipboard-copy');
+ $path_copy_button = id(new PHUIButtonView())
+ ->setTag('a')
+ ->setColor(PHUIButtonView::GREY)
+ ->setIcon('fa-clipboard')
+ ->setHref('#')
+ ->addSigil('clipboard-copy')
+ ->addSigil('has-tooltip')
+ ->setMetadata(
+ array(
+ 'tip' => pht('Copy file path'),
+ 'text' => $display_filename,
+ 'successMessage' => pht('File path copied.'),
+ 'errorMessage' => pht('Copy of file path failed.'),
+ ));
+
return javelin_tag(
'div',
array(
@@ -278,14 +294,23 @@
'sigil' => 'changeset-header',
),
array(
- $icon,
+ javelin_tag(
+ 'span',
+ array(
+ 'class' => 'differential-changeset-path-copy-button',
+ 'meta' => array(
+ 'selectID' => $display_filename,
+ 'once' => true,
+ ),
+ ),
+ $path_copy_button),
javelin_tag(
'span',
array(
'class' => 'differential-changeset-path-name',
'sigil' => 'changeset-header-path-name',
),
- $display_filename),
+ $display_filename),
)),
javelin_tag(
'div',
diff --git a/webroot/rsrc/css/application/differential/changeset-view.css b/webroot/rsrc/css/application/differential/changeset-view.css
--- a/webroot/rsrc/css/application/differential/changeset-view.css
+++ b/webroot/rsrc/css/application/differential/changeset-view.css
@@ -340,7 +340,7 @@
.differential-file-icon-header .phui-icon-view {
display: inline-block;
- margin: 0 6px 2px 0;
+ margin: 0 0 2px 0;
vertical-align: middle;
font-size: 14px;
}
@@ -349,6 +349,15 @@
display: none;
}
+.differential-changeset-path-copy-button {
+ margin-right: 0;
+ padding-right: 10px;
+}
+
+.device-phone .differential-changeset-path-copy-button {
+ display: none;
+}
+
.differential-changeset-buttons {
float: right;
margin-top: 16px;

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 13:32 (18 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1016654
Default Alt Text
D25757.1734701545.diff (4 KB)

Event Timeline