Page MenuHomePhabricator

D9227.id.diff
No OneTemporary

D9227.id.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -460,7 +460,7 @@
'rsrc/js/core/behavior-keyboard-shortcuts.js' => 'd75709e6',
'rsrc/js/core/behavior-konami.js' => '5bc2cb21',
'rsrc/js/core/behavior-lightbox-attachments.js' => '3aa45ad9',
- 'rsrc/js/core/behavior-line-linker.js' => 'bc778103',
+ 'rsrc/js/core/behavior-line-linker.js' => '0969ff43',
'rsrc/js/core/behavior-more.js' => '9b9197be',
'rsrc/js/core/behavior-object-selector.js' => 'e6f67523',
'rsrc/js/core/behavior-oncopy.js' => 'c3e218fe',
@@ -601,7 +601,7 @@
'javelin-behavior-phabricator-hovercards' => '9c808199',
'javelin-behavior-phabricator-keyboard-pager' => 'b657bdf8',
'javelin-behavior-phabricator-keyboard-shortcuts' => 'd75709e6',
- 'javelin-behavior-phabricator-line-linker' => 'bc778103',
+ 'javelin-behavior-phabricator-line-linker' => '0969ff43',
'javelin-behavior-phabricator-nav' => 'b5842a5e',
'javelin-behavior-phabricator-notification-example' => 'c51a6616',
'javelin-behavior-phabricator-object-selector' => 'e6f67523',
@@ -864,6 +864,13 @@
array(
0 => 'javelin-install',
),
+ '0969ff43' =>
+ array(
+ 0 => 'javelin-behavior',
+ 1 => 'javelin-stratcom',
+ 2 => 'javelin-dom',
+ 3 => 'javelin-history',
+ ),
'09b15cf1' =>
array(
0 => 'javelin-stratcom',
@@ -1683,13 +1690,6 @@
0 => 'javelin-install',
1 => 'javelin-dom',
),
- 'bc778103' =>
- array(
- 0 => 'javelin-behavior',
- 1 => 'javelin-stratcom',
- 2 => 'javelin-dom',
- 3 => 'javelin-history',
- ),
'bd0aedcd' =>
array(
0 => 'javelin-install',
diff --git a/src/applications/diffusion/controller/DiffusionBrowseFileController.php b/src/applications/diffusion/controller/DiffusionBrowseFileController.php
--- a/src/applications/diffusion/controller/DiffusionBrowseFileController.php
+++ b/src/applications/diffusion/controller/DiffusionBrowseFileController.php
@@ -413,6 +413,7 @@
$callsign = $repository->getCallsign();
$editor_link = $user->loadEditorLink($path, $line, $callsign);
+ $template = $user->loadEditorLink($path, '%l', $callsign);
$icon_edit = id(new PHUIIconView())
->setIconFont('fa-pencil');
@@ -421,6 +422,8 @@
->setText(pht('Open in Editor'))
->setHref($editor_link)
->setIcon($icon_edit)
+ ->setID('editor_link')
+ ->setMetadata(array('link_template' => $template))
->setDisabled(!$editor_link);
return $button;
diff --git a/webroot/rsrc/js/core/behavior-line-linker.js b/webroot/rsrc/js/core/behavior-line-linker.js
--- a/webroot/rsrc/js/core/behavior-line-linker.js
+++ b/webroot/rsrc/js/core/behavior-line-linker.js
@@ -10,6 +10,7 @@
var origin = null;
var target = null;
var root = null;
+ var editor_link = JX.$('editor_link');
function getRowNumber(tr) {
var th = JX.DOM.find(tr, 'th', 'phabricator-source-line');
@@ -79,6 +80,10 @@
target = null;
e.kill();
JX.History.replace(uri);
+ if (editor_link.href) {
+ editdata = JX.Stratcom.getData(editor_link);
+ editor_link.href = editdata.link_template.replace('%25l', o);
+ }
});
});

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 17, 10:28 PM (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6723706
Default Alt Text
D9227.id.diff (3 KB)

Event Timeline