Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15284526
D11978.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D11978.diff
View Options
diff --git a/src/applications/differential/controller/DifferentialChangesetViewController.php b/src/applications/differential/controller/DifferentialChangesetViewController.php
--- a/src/applications/differential/controller/DifferentialChangesetViewController.php
+++ b/src/applications/differential/controller/DifferentialChangesetViewController.php
@@ -162,7 +162,6 @@
$parser->setRenderer(new DifferentialChangesetOneUpRenderer());
}
-
if ($left && $right) {
$parser->setOriginals($left, $right);
}
@@ -229,13 +228,6 @@
->setCoverage($coverage);
}
- Javelin::initBehavior('differential-show-more', array(
- 'uri' => '/differential/changeset/',
- 'whitespace' => $request->getStr('whitespace'),
- ));
-
- Javelin::initBehavior('differential-comment-jump', array());
-
// TODO: [HTML] Clean up DifferentialChangesetParser output, but it's
// undergoing like six kinds of refactoring anyway.
$output = phutil_safe_html($output);
@@ -246,6 +238,17 @@
->appendChild($output)
->setVsChangesetID($left_source);
+ Javelin::initBehavior('differential-populate', array(
+ 'changesetViewIDs' => array($detail->getID()),
+ ));
+
+ Javelin::initBehavior('differential-show-more', array(
+ 'uri' => '/differential/changeset/',
+ 'whitespace' => $request->getStr('whitespace'),
+ ));
+
+ Javelin::initBehavior('differential-comment-jump', array());
+
$panel = new DifferentialPrimaryPaneView();
$panel->appendChild(
phutil_tag(
diff --git a/src/applications/phriction/controller/PhrictionDiffController.php b/src/applications/phriction/controller/PhrictionDiffController.php
--- a/src/applications/phriction/controller/PhrictionDiffController.php
+++ b/src/applications/phriction/controller/PhrictionDiffController.php
@@ -59,6 +59,8 @@
$engine = new PhabricatorDifferenceEngine();
$changeset = $engine->generateChangesetFromFileContent($text_l, $text_r);
+ $changeset->setFilename($content_r->getTitle());
+
$changeset->setOldProperties(
array(
'Title' => $content_l->getTitle(),
@@ -84,6 +86,7 @@
$spec = $request->getStr('range');
list($range_s, $range_e, $mask) =
DifferentialChangesetParser::parseRangeSpecification($spec);
+
$output = $parser->render($range_s, $range_e, $mask);
if ($request->isAjax()) {
@@ -91,10 +94,19 @@
->setRenderedChangeset($output);
}
+ $output = id(new DifferentialChangesetDetailView())
+ ->setUser($this->getViewer())
+ ->setChangeset($changeset)
+ ->appendChild($output);
+
require_celerity_resource('differential-changeset-view-css');
require_celerity_resource('syntax-highlighting-css');
require_celerity_resource('phriction-document-css');
+ Javelin::initBehavior('differential-populate', array(
+ 'changesetViewIDs' => array($output->getID()),
+ ));
+
Javelin::initBehavior('differential-show-more', array(
'uri' => '/phriction/diff/'.$document->getID().'/',
'whitespace' => $whitespace_mode,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mar 5 2025, 9:55 AM (5 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7224885
Default Alt Text
D11978.diff (3 KB)
Attached To
Mode
D11978: Always run "behavior-populate" before "behavior-show-more"
Attached
Detach File
Event Timeline
Log In to Comment