@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Diffusion browser: Update editor link when clicking on a line

Summary: Highlighing and URL are fixed on click - now the edit button too.

Test Plan: click on lines with and without value in "Editr Link" (And without %l in it).

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9227

authored by

Aviv Eyal and committed by
epriestley
9bba4cda 27a369d1

+17 -9
+9 -9
resources/celerity/map.php
··· 460 460 'rsrc/js/core/behavior-keyboard-shortcuts.js' => 'd75709e6', 461 461 'rsrc/js/core/behavior-konami.js' => '5bc2cb21', 462 462 'rsrc/js/core/behavior-lightbox-attachments.js' => '3aa45ad9', 463 - 'rsrc/js/core/behavior-line-linker.js' => 'bc778103', 463 + 'rsrc/js/core/behavior-line-linker.js' => '0969ff43', 464 464 'rsrc/js/core/behavior-more.js' => '9b9197be', 465 465 'rsrc/js/core/behavior-object-selector.js' => 'e6f67523', 466 466 'rsrc/js/core/behavior-oncopy.js' => 'c3e218fe', ··· 601 601 'javelin-behavior-phabricator-hovercards' => '9c808199', 602 602 'javelin-behavior-phabricator-keyboard-pager' => 'b657bdf8', 603 603 'javelin-behavior-phabricator-keyboard-shortcuts' => 'd75709e6', 604 - 'javelin-behavior-phabricator-line-linker' => 'bc778103', 604 + 'javelin-behavior-phabricator-line-linker' => '0969ff43', 605 605 'javelin-behavior-phabricator-nav' => 'b5842a5e', 606 606 'javelin-behavior-phabricator-notification-example' => 'c51a6616', 607 607 'javelin-behavior-phabricator-object-selector' => 'e6f67523', ··· 863 863 '08e56a4e' => 864 864 array( 865 865 0 => 'javelin-install', 866 + ), 867 + '0969ff43' => 868 + array( 869 + 0 => 'javelin-behavior', 870 + 1 => 'javelin-stratcom', 871 + 2 => 'javelin-dom', 872 + 3 => 'javelin-history', 866 873 ), 867 874 '09b15cf1' => 868 875 array( ··· 1682 1689 array( 1683 1690 0 => 'javelin-install', 1684 1691 1 => 'javelin-dom', 1685 - ), 1686 - 'bc778103' => 1687 - array( 1688 - 0 => 'javelin-behavior', 1689 - 1 => 'javelin-stratcom', 1690 - 2 => 'javelin-dom', 1691 - 3 => 'javelin-history', 1692 1692 ), 1693 1693 'bd0aedcd' => 1694 1694 array(
+3
src/applications/diffusion/controller/DiffusionBrowseFileController.php
··· 413 413 414 414 $callsign = $repository->getCallsign(); 415 415 $editor_link = $user->loadEditorLink($path, $line, $callsign); 416 + $template = $user->loadEditorLink($path, '%l', $callsign); 416 417 417 418 $icon_edit = id(new PHUIIconView()) 418 419 ->setIconFont('fa-pencil'); ··· 421 422 ->setText(pht('Open in Editor')) 422 423 ->setHref($editor_link) 423 424 ->setIcon($icon_edit) 425 + ->setID('editor_link') 426 + ->setMetadata(array('link_template' => $template)) 424 427 ->setDisabled(!$editor_link); 425 428 426 429 return $button;
+5
webroot/rsrc/js/core/behavior-line-linker.js
··· 10 10 var origin = null; 11 11 var target = null; 12 12 var root = null; 13 + var editor_link = JX.$('editor_link'); 13 14 14 15 function getRowNumber(tr) { 15 16 var th = JX.DOM.find(tr, 'th', 'phabricator-source-line'); ··· 79 80 target = null; 80 81 e.kill(); 81 82 JX.History.replace(uri); 83 + if (editor_link.href) { 84 + editdata = JX.Stratcom.getData(editor_link); 85 + editor_link.href = editdata.link_template.replace('%25l', o); 86 + } 82 87 }); 83 88 84 89 });