mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +01:00
Merge behavior-show-more into behavior-populate
Summary: Ref T2009. It doesn't make sense to have these as separate behaviors. We require a ChangesetViewManager to track view parameter state. Test Plan: Interacted with changesets in Phriction, Differential and Diffusion. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T2009 Differential Revision: https://secure.phabricator.com/D11979
This commit is contained in:
parent
ad3c94dd45
commit
aa98d9e5f8
7 changed files with 24 additions and 52 deletions
|
@ -11,7 +11,7 @@ return array(
|
|||
'core.pkg.js' => 'a77025a1',
|
||||
'darkconsole.pkg.js' => '8ab24e01',
|
||||
'differential.pkg.css' => 'd8866ed8',
|
||||
'differential.pkg.js' => '9e55f9f5',
|
||||
'differential.pkg.js' => '4db30ad2',
|
||||
'diffusion.pkg.css' => '591664fa',
|
||||
'diffusion.pkg.js' => 'bfc0737b',
|
||||
'maniphest.pkg.css' => '68d4dd3d',
|
||||
|
@ -369,9 +369,8 @@ return array(
|
|||
'rsrc/js/application/differential/behavior-dropdown-menus.js' => '2035b9cb',
|
||||
'rsrc/js/application/differential/behavior-edit-inline-comments.js' => '65936067',
|
||||
'rsrc/js/application/differential/behavior-keyboard-nav.js' => '2c426492',
|
||||
'rsrc/js/application/differential/behavior-populate.js' => 'bdb3e4d0',
|
||||
'rsrc/js/application/differential/behavior-populate.js' => '8694b1df',
|
||||
'rsrc/js/application/differential/behavior-show-field-details.js' => 'bba9eedf',
|
||||
'rsrc/js/application/differential/behavior-show-more.js' => 'c662904a',
|
||||
'rsrc/js/application/differential/behavior-toggle-files.js' => 'ca3f91eb',
|
||||
'rsrc/js/application/differential/behavior-user-select.js' => 'a8d8459d',
|
||||
'rsrc/js/application/diffusion/DiffusionLocateFileSource.js' => 'b42eddc7',
|
||||
|
@ -573,9 +572,8 @@ return array(
|
|||
'javelin-behavior-differential-edit-inline-comments' => '65936067',
|
||||
'javelin-behavior-differential-feedback-preview' => '6932def3',
|
||||
'javelin-behavior-differential-keyboard-navigation' => '2c426492',
|
||||
'javelin-behavior-differential-populate' => 'bdb3e4d0',
|
||||
'javelin-behavior-differential-populate' => '8694b1df',
|
||||
'javelin-behavior-differential-show-field-details' => 'bba9eedf',
|
||||
'javelin-behavior-differential-show-more' => 'c662904a',
|
||||
'javelin-behavior-differential-toggle-files' => 'ca3f91eb',
|
||||
'javelin-behavior-differential-user-select' => 'a8d8459d',
|
||||
'javelin-behavior-diffusion-commit-branches' => 'bdaf4d04',
|
||||
|
@ -1448,6 +1446,13 @@ return array(
|
|||
'85ea0626' => array(
|
||||
'javelin-install',
|
||||
),
|
||||
'8694b1df' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-stratcom',
|
||||
'phabricator-tooltip',
|
||||
'changeset-view-manager',
|
||||
),
|
||||
'869e3445' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
|
@ -1704,13 +1709,6 @@ return array(
|
|||
'javelin-util',
|
||||
'javelin-request',
|
||||
),
|
||||
'bdb3e4d0' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-stratcom',
|
||||
'phabricator-tooltip',
|
||||
'changeset-view-manager',
|
||||
),
|
||||
'be807912' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
|
@ -1731,14 +1729,6 @@ return array(
|
|||
'javelin-stratcom',
|
||||
'javelin-vector',
|
||||
),
|
||||
'c662904a' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-workflow',
|
||||
'javelin-util',
|
||||
'javelin-stratcom',
|
||||
'changeset-view-manager',
|
||||
),
|
||||
'c90a04fc' => array(
|
||||
'javelin-dom',
|
||||
'javelin-dynval',
|
||||
|
@ -2160,7 +2150,6 @@ return array(
|
|||
'javelin-behavior-differential-feedback-preview',
|
||||
'javelin-behavior-differential-edit-inline-comments',
|
||||
'javelin-behavior-differential-populate',
|
||||
'javelin-behavior-differential-show-more',
|
||||
'javelin-behavior-differential-diff-radios',
|
||||
'javelin-behavior-differential-comment-jump',
|
||||
'javelin-behavior-differential-add-reviewers-and-ccs',
|
||||
|
|
|
@ -156,7 +156,6 @@ return array(
|
|||
'javelin-behavior-differential-feedback-preview',
|
||||
'javelin-behavior-differential-edit-inline-comments',
|
||||
'javelin-behavior-differential-populate',
|
||||
'javelin-behavior-differential-show-more',
|
||||
'javelin-behavior-differential-diff-radios',
|
||||
'javelin-behavior-differential-comment-jump',
|
||||
'javelin-behavior-differential-add-reviewers-and-ccs',
|
||||
|
|
|
@ -240,7 +240,6 @@ final class DifferentialChangesetViewController extends DifferentialController {
|
|||
'changesetViewIDs' => array($detail->getID()),
|
||||
));
|
||||
|
||||
Javelin::initBehavior('differential-show-more');
|
||||
Javelin::initBehavior('differential-comment-jump', array());
|
||||
|
||||
$panel = new DifferentialPrimaryPaneView();
|
||||
|
|
|
@ -209,7 +209,6 @@ final class DifferentialChangesetListView extends AphrontView {
|
|||
'changesetViewIDs' => $ids,
|
||||
));
|
||||
|
||||
$this->initBehavior('differential-show-more');
|
||||
$this->initBehavior('differential-comment-jump', array());
|
||||
|
||||
if ($this->inlineURI) {
|
||||
|
|
|
@ -108,7 +108,6 @@ final class PhrictionDiffController extends PhrictionController {
|
|||
Javelin::initBehavior('differential-populate', array(
|
||||
'changesetViewIDs' => array($output->getID()),
|
||||
));
|
||||
Javelin::initBehavior('differential-show-more');
|
||||
|
||||
$slug = $document->getSlug();
|
||||
|
||||
|
|
|
@ -36,6 +36,20 @@ JX.behavior('differential-populate', function(config) {
|
|||
}
|
||||
});
|
||||
|
||||
JX.Stratcom.listen(
|
||||
'click',
|
||||
'show-more',
|
||||
function(e) {
|
||||
e.kill();
|
||||
|
||||
var changeset = e.getNode('differential-changeset');
|
||||
var view = JX.ChangesetViewManager.getForNode(changeset);
|
||||
var data = e.getNodeData('show-more');
|
||||
var target = e.getNode('context-target');
|
||||
|
||||
view.loadContext(data.range, target);
|
||||
});
|
||||
|
||||
var highlighted = null;
|
||||
var highlight_class = null;
|
||||
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
/**
|
||||
* @provides javelin-behavior-differential-show-more
|
||||
* @requires javelin-behavior
|
||||
* javelin-dom
|
||||
* javelin-workflow
|
||||
* javelin-util
|
||||
* javelin-stratcom
|
||||
* changeset-view-manager
|
||||
*/
|
||||
|
||||
JX.behavior('differential-show-more', function() {
|
||||
|
||||
JX.Stratcom.listen(
|
||||
'click',
|
||||
'show-more',
|
||||
function(e) {
|
||||
e.kill();
|
||||
|
||||
var changeset = e.getNode('differential-changeset');
|
||||
var view = JX.ChangesetViewManager.getForNode(changeset);
|
||||
var data = e.getNodeData('show-more');
|
||||
var target = e.getNode('context-target');
|
||||
|
||||
view.loadContext(data.range, target);
|
||||
});
|
||||
|
||||
});
|
Loading…
Reference in a new issue