Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2685215
D25757.1734701544.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
4 KB
Referenced Files
None
Subscribers
None
D25757.1734701544.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
@@ -12,7 +12,7 @@
'core.pkg.css' => 'ac619266',
'core.pkg.js' => '2eeda9e0',
'dark-console.pkg.js' => '187792c2',
- 'differential.pkg.css' => '6d3700f0',
+ 'differential.pkg.css' => '8b3f793c',
'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' => 'a4419564',
'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' => 'a4419564',
'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',
@@ -1835,6 +1832,9 @@
'javelin-stratcom',
'javelin-vector',
),
+ 'a4419564' => array(
+ 'phui-inline-comment-view-css',
+ ),
'a4aa75c4' => array(
'phui-button-css',
'phui-button-simple-css',
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
@@ -349,6 +349,14 @@
display: none;
}
+.differential-changeset-path-copy-button {
+ padding-right: 10px;
+}
+
+.device-phone .differential-changeset-path-copy-button {
+ display: none;
+}
+
.differential-changeset-buttons {
float: right;
margin-top: 16px;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 13:32 (18 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1015344
Default Alt Text
D25757.1734701544.diff (4 KB)
Attached To
Mode
D25757: Add Copy file path button to file header bar in Differential/Diffusion
Attached
Detach File
Event Timeline
Log In to Comment