mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-09 16:32:39 +01:00
Entirely replace the old filetree UI with the "flank" UI
Summary: Ref T13516. Deletes all old filetree / flex / active / collapse nav code in favor of the new code. Restores the inline tips in the path tree. Test Plan: {F7374175} Maniphest Tasks: T13516 Differential Revision: https://secure.phabricator.com/D21154
This commit is contained in:
parent
ba8071bbef
commit
12eddb18fb
19 changed files with 121 additions and 896 deletions
|
@ -9,10 +9,10 @@ return array(
|
||||||
'names' => array(
|
'names' => array(
|
||||||
'conpherence.pkg.css' => '3c8a0668',
|
'conpherence.pkg.css' => '3c8a0668',
|
||||||
'conpherence.pkg.js' => '020aebcf',
|
'conpherence.pkg.js' => '020aebcf',
|
||||||
'core.pkg.css' => 'a4a2417c',
|
'core.pkg.css' => '4d5d0922',
|
||||||
'core.pkg.js' => 'd092ddaf',
|
'core.pkg.js' => '544bc792',
|
||||||
'differential.pkg.css' => '607c84be',
|
'differential.pkg.css' => 'cb99cd21',
|
||||||
'differential.pkg.js' => '58e09368',
|
'differential.pkg.js' => 'b3589d05',
|
||||||
'diffusion.pkg.css' => '42c75c37',
|
'diffusion.pkg.css' => '42c75c37',
|
||||||
'diffusion.pkg.js' => 'a98c0bf7',
|
'diffusion.pkg.js' => 'a98c0bf7',
|
||||||
'maniphest.pkg.css' => '35995d6d',
|
'maniphest.pkg.css' => '35995d6d',
|
||||||
|
@ -29,7 +29,7 @@ return array(
|
||||||
'rsrc/css/aphront/multi-column.css' => 'fbc00ba3',
|
'rsrc/css/aphront/multi-column.css' => 'fbc00ba3',
|
||||||
'rsrc/css/aphront/notification.css' => '30240bd2',
|
'rsrc/css/aphront/notification.css' => '30240bd2',
|
||||||
'rsrc/css/aphront/panel-view.css' => '46923d46',
|
'rsrc/css/aphront/panel-view.css' => '46923d46',
|
||||||
'rsrc/css/aphront/phabricator-nav-view.css' => 'f8a0c1bf',
|
'rsrc/css/aphront/phabricator-nav-view.css' => '423f92cc',
|
||||||
'rsrc/css/aphront/table-view.css' => '0bb61df1',
|
'rsrc/css/aphront/table-view.css' => '0bb61df1',
|
||||||
'rsrc/css/aphront/tokenizer.css' => '34e2a838',
|
'rsrc/css/aphront/tokenizer.css' => '34e2a838',
|
||||||
'rsrc/css/aphront/tooltip.css' => 'e3f2412f',
|
'rsrc/css/aphront/tooltip.css' => 'e3f2412f',
|
||||||
|
@ -40,7 +40,7 @@ return array(
|
||||||
'rsrc/css/application/base/main-menu-view.css' => 'bcec20f0',
|
'rsrc/css/application/base/main-menu-view.css' => 'bcec20f0',
|
||||||
'rsrc/css/application/base/notification-menu.css' => '4df1ee30',
|
'rsrc/css/application/base/notification-menu.css' => '4df1ee30',
|
||||||
'rsrc/css/application/base/phui-theme.css' => '35883b37',
|
'rsrc/css/application/base/phui-theme.css' => '35883b37',
|
||||||
'rsrc/css/application/base/standard-page-view.css' => 'ed076e5a',
|
'rsrc/css/application/base/standard-page-view.css' => 'a374f94c',
|
||||||
'rsrc/css/application/chatlog/chatlog.css' => 'abdc76ee',
|
'rsrc/css/application/chatlog/chatlog.css' => 'abdc76ee',
|
||||||
'rsrc/css/application/conduit/conduit-api.css' => 'ce2cfc41',
|
'rsrc/css/application/conduit/conduit-api.css' => 'ce2cfc41',
|
||||||
'rsrc/css/application/config/config-options.css' => '16c920ae',
|
'rsrc/css/application/config/config-options.css' => '16c920ae',
|
||||||
|
@ -59,7 +59,7 @@ return array(
|
||||||
'rsrc/css/application/countdown/timer.css' => 'bff8012f',
|
'rsrc/css/application/countdown/timer.css' => 'bff8012f',
|
||||||
'rsrc/css/application/daemon/bulk-job.css' => '73af99f5',
|
'rsrc/css/application/daemon/bulk-job.css' => '73af99f5',
|
||||||
'rsrc/css/application/dashboard/dashboard.css' => '5a205b9d',
|
'rsrc/css/application/dashboard/dashboard.css' => '5a205b9d',
|
||||||
'rsrc/css/application/diff/diff-tree-view.css' => 'ce58c3d1',
|
'rsrc/css/application/diff/diff-tree-view.css' => '8f487a99',
|
||||||
'rsrc/css/application/diff/inline-comment-summary.css' => '81eb368d',
|
'rsrc/css/application/diff/inline-comment-summary.css' => '81eb368d',
|
||||||
'rsrc/css/application/differential/add-comment.css' => '7e5900d9',
|
'rsrc/css/application/differential/add-comment.css' => '7e5900d9',
|
||||||
'rsrc/css/application/differential/changeset-view.css' => '489b6995',
|
'rsrc/css/application/differential/changeset-view.css' => '489b6995',
|
||||||
|
@ -115,12 +115,11 @@ return array(
|
||||||
'rsrc/css/core/core.css' => '1b29ed61',
|
'rsrc/css/core/core.css' => '1b29ed61',
|
||||||
'rsrc/css/core/remarkup.css' => 'c286eaef',
|
'rsrc/css/core/remarkup.css' => 'c286eaef',
|
||||||
'rsrc/css/core/syntax.css' => '220b85f9',
|
'rsrc/css/core/syntax.css' => '220b85f9',
|
||||||
'rsrc/css/core/z-index.css' => '99c0f5eb',
|
'rsrc/css/core/z-index.css' => '612e9522',
|
||||||
'rsrc/css/diviner/diviner-shared.css' => '4bd263b0',
|
'rsrc/css/diviner/diviner-shared.css' => '4bd263b0',
|
||||||
'rsrc/css/font/font-awesome.css' => '3883938a',
|
'rsrc/css/font/font-awesome.css' => '3883938a',
|
||||||
'rsrc/css/font/font-lato.css' => '23631304',
|
'rsrc/css/font/font-lato.css' => '23631304',
|
||||||
'rsrc/css/font/phui-font-icon-base.css' => 'd7994e06',
|
'rsrc/css/font/phui-font-icon-base.css' => 'd7994e06',
|
||||||
'rsrc/css/layout/phabricator-filetree-view.css' => '56cdd875',
|
|
||||||
'rsrc/css/layout/phabricator-source-code-view.css' => '03d7ac28',
|
'rsrc/css/layout/phabricator-source-code-view.css' => '03d7ac28',
|
||||||
'rsrc/css/phui/button/phui-button-bar.css' => 'a4aa75c4',
|
'rsrc/css/phui/button/phui-button-bar.css' => 'a4aa75c4',
|
||||||
'rsrc/css/phui/button/phui-button-simple.css' => '1ff278aa',
|
'rsrc/css/phui/button/phui-button-simple.css' => '1ff278aa',
|
||||||
|
@ -379,10 +378,10 @@ return array(
|
||||||
'rsrc/js/application/dashboard/behavior-dashboard-move-panels.js' => 'a2ab19be',
|
'rsrc/js/application/dashboard/behavior-dashboard-move-panels.js' => 'a2ab19be',
|
||||||
'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '1e413dc9',
|
'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '1e413dc9',
|
||||||
'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => '0116d3e8',
|
'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => '0116d3e8',
|
||||||
'rsrc/js/application/diff/DiffChangeset.js' => 'ea6e377d',
|
'rsrc/js/application/diff/DiffChangeset.js' => '2a3101b1',
|
||||||
'rsrc/js/application/diff/DiffChangesetList.js' => '5a351998',
|
'rsrc/js/application/diff/DiffChangesetList.js' => '57035863',
|
||||||
'rsrc/js/application/diff/DiffInline.js' => '16e97ebc',
|
'rsrc/js/application/diff/DiffInline.js' => '16e97ebc',
|
||||||
'rsrc/js/application/diff/DiffPathView.js' => '8337f4c7',
|
'rsrc/js/application/diff/DiffPathView.js' => 'c0ed32ce',
|
||||||
'rsrc/js/application/diff/DiffTreeView.js' => 'a5823e4d',
|
'rsrc/js/application/diff/DiffTreeView.js' => 'a5823e4d',
|
||||||
'rsrc/js/application/diff/behavior-preview-link.js' => 'f51e9c17',
|
'rsrc/js/application/diff/behavior-preview-link.js' => 'f51e9c17',
|
||||||
'rsrc/js/application/differential/behavior-diff-radios.js' => '925fe8cd',
|
'rsrc/js/application/differential/behavior-diff-radios.js' => '925fe8cd',
|
||||||
|
@ -466,7 +465,6 @@ return array(
|
||||||
'rsrc/js/core/TextAreaUtils.js' => 'f340a484',
|
'rsrc/js/core/TextAreaUtils.js' => 'f340a484',
|
||||||
'rsrc/js/core/Title.js' => '43bc9360',
|
'rsrc/js/core/Title.js' => '43bc9360',
|
||||||
'rsrc/js/core/ToolTip.js' => '83754533',
|
'rsrc/js/core/ToolTip.js' => '83754533',
|
||||||
'rsrc/js/core/behavior-active-nav.js' => '7353f43d',
|
|
||||||
'rsrc/js/core/behavior-audio-source.js' => '3dc5ad43',
|
'rsrc/js/core/behavior-audio-source.js' => '3dc5ad43',
|
||||||
'rsrc/js/core/behavior-autofocus.js' => '65bb0011',
|
'rsrc/js/core/behavior-autofocus.js' => '65bb0011',
|
||||||
'rsrc/js/core/behavior-badge-view.js' => '92cdd7b6',
|
'rsrc/js/core/behavior-badge-view.js' => '92cdd7b6',
|
||||||
|
@ -477,7 +475,6 @@ return array(
|
||||||
'rsrc/js/core/behavior-device.js' => '0cf79f45',
|
'rsrc/js/core/behavior-device.js' => '0cf79f45',
|
||||||
'rsrc/js/core/behavior-drag-and-drop-textarea.js' => '7ad020a5',
|
'rsrc/js/core/behavior-drag-and-drop-textarea.js' => '7ad020a5',
|
||||||
'rsrc/js/core/behavior-fancy-datepicker.js' => '956f3eeb',
|
'rsrc/js/core/behavior-fancy-datepicker.js' => '956f3eeb',
|
||||||
'rsrc/js/core/behavior-file-tree.js' => 'a61c2d11',
|
|
||||||
'rsrc/js/core/behavior-form.js' => '55d7b788',
|
'rsrc/js/core/behavior-form.js' => '55d7b788',
|
||||||
'rsrc/js/core/behavior-gesture.js' => 'b58d1a2a',
|
'rsrc/js/core/behavior-gesture.js' => 'b58d1a2a',
|
||||||
'rsrc/js/core/behavior-global-drag-and-drop.js' => '1cab0e9a',
|
'rsrc/js/core/behavior-global-drag-and-drop.js' => '1cab0e9a',
|
||||||
|
@ -492,7 +489,6 @@ return array(
|
||||||
'rsrc/js/core/behavior-more.js' => '506aa3f4',
|
'rsrc/js/core/behavior-more.js' => '506aa3f4',
|
||||||
'rsrc/js/core/behavior-object-selector.js' => '98ef467f',
|
'rsrc/js/core/behavior-object-selector.js' => '98ef467f',
|
||||||
'rsrc/js/core/behavior-oncopy.js' => 'ff7b3f22',
|
'rsrc/js/core/behavior-oncopy.js' => 'ff7b3f22',
|
||||||
'rsrc/js/core/behavior-phabricator-nav.js' => 'f166c949',
|
|
||||||
'rsrc/js/core/behavior-phabricator-remarkup-assist.js' => '54262396',
|
'rsrc/js/core/behavior-phabricator-remarkup-assist.js' => '54262396',
|
||||||
'rsrc/js/core/behavior-read-only-warning.js' => 'b9109f8f',
|
'rsrc/js/core/behavior-read-only-warning.js' => 'b9109f8f',
|
||||||
'rsrc/js/core/behavior-redirect.js' => '407ee861',
|
'rsrc/js/core/behavior-redirect.js' => '407ee861',
|
||||||
|
@ -562,7 +558,7 @@ return array(
|
||||||
'conpherence-thread-manager' => 'aec8e38c',
|
'conpherence-thread-manager' => 'aec8e38c',
|
||||||
'conpherence-transaction-css' => '3a3f5e7e',
|
'conpherence-transaction-css' => '3a3f5e7e',
|
||||||
'd3' => '9d068042',
|
'd3' => '9d068042',
|
||||||
'diff-tree-view-css' => 'ce58c3d1',
|
'diff-tree-view-css' => '8f487a99',
|
||||||
'differential-changeset-view-css' => '489b6995',
|
'differential-changeset-view-css' => '489b6995',
|
||||||
'differential-core-view-css' => '7300a73e',
|
'differential-core-view-css' => '7300a73e',
|
||||||
'differential-revision-add-comment-css' => '7e5900d9',
|
'differential-revision-add-comment-css' => '7e5900d9',
|
||||||
|
@ -644,16 +640,13 @@ return array(
|
||||||
'javelin-behavior-maniphest-list-editor' => 'c687e867',
|
'javelin-behavior-maniphest-list-editor' => 'c687e867',
|
||||||
'javelin-behavior-owners-path-editor' => 'ff688a7a',
|
'javelin-behavior-owners-path-editor' => 'ff688a7a',
|
||||||
'javelin-behavior-passphrase-credential-control' => '48fe33d0',
|
'javelin-behavior-passphrase-credential-control' => '48fe33d0',
|
||||||
'javelin-behavior-phabricator-active-nav' => '7353f43d',
|
|
||||||
'javelin-behavior-phabricator-autofocus' => '65bb0011',
|
'javelin-behavior-phabricator-autofocus' => '65bb0011',
|
||||||
'javelin-behavior-phabricator-clipboard-copy' => 'cf32921f',
|
'javelin-behavior-phabricator-clipboard-copy' => 'cf32921f',
|
||||||
'javelin-behavior-phabricator-file-tree' => 'a61c2d11',
|
|
||||||
'javelin-behavior-phabricator-gesture' => 'b58d1a2a',
|
'javelin-behavior-phabricator-gesture' => 'b58d1a2a',
|
||||||
'javelin-behavior-phabricator-gesture-example' => '242dedd0',
|
'javelin-behavior-phabricator-gesture-example' => '242dedd0',
|
||||||
'javelin-behavior-phabricator-keyboard-pager' => '1325b731',
|
'javelin-behavior-phabricator-keyboard-pager' => '1325b731',
|
||||||
'javelin-behavior-phabricator-keyboard-shortcuts' => '42c44e8b',
|
'javelin-behavior-phabricator-keyboard-shortcuts' => '42c44e8b',
|
||||||
'javelin-behavior-phabricator-line-linker' => '590e6527',
|
'javelin-behavior-phabricator-line-linker' => '590e6527',
|
||||||
'javelin-behavior-phabricator-nav' => 'f166c949',
|
|
||||||
'javelin-behavior-phabricator-notification-example' => '29819b75',
|
'javelin-behavior-phabricator-notification-example' => '29819b75',
|
||||||
'javelin-behavior-phabricator-object-selector' => '98ef467f',
|
'javelin-behavior-phabricator-object-selector' => '98ef467f',
|
||||||
'javelin-behavior-phabricator-oncopy' => 'ff7b3f22',
|
'javelin-behavior-phabricator-oncopy' => 'ff7b3f22',
|
||||||
|
@ -782,10 +775,10 @@ return array(
|
||||||
'phabricator-darklog' => '3b869402',
|
'phabricator-darklog' => '3b869402',
|
||||||
'phabricator-darkmessage' => '26cd4b73',
|
'phabricator-darkmessage' => '26cd4b73',
|
||||||
'phabricator-dashboard-css' => '5a205b9d',
|
'phabricator-dashboard-css' => '5a205b9d',
|
||||||
'phabricator-diff-changeset' => 'ea6e377d',
|
'phabricator-diff-changeset' => '2a3101b1',
|
||||||
'phabricator-diff-changeset-list' => '5a351998',
|
'phabricator-diff-changeset-list' => '57035863',
|
||||||
'phabricator-diff-inline' => '16e97ebc',
|
'phabricator-diff-inline' => '16e97ebc',
|
||||||
'phabricator-diff-path-view' => '8337f4c7',
|
'phabricator-diff-path-view' => 'c0ed32ce',
|
||||||
'phabricator-diff-tree-view' => 'a5823e4d',
|
'phabricator-diff-tree-view' => 'a5823e4d',
|
||||||
'phabricator-drag-and-drop-file-upload' => '4370900d',
|
'phabricator-drag-and-drop-file-upload' => '4370900d',
|
||||||
'phabricator-draggable-list' => '0169e425',
|
'phabricator-draggable-list' => '0169e425',
|
||||||
|
@ -793,12 +786,11 @@ return array(
|
||||||
'phabricator-favicon' => '7930776a',
|
'phabricator-favicon' => '7930776a',
|
||||||
'phabricator-feed-css' => 'd8b6e3f8',
|
'phabricator-feed-css' => 'd8b6e3f8',
|
||||||
'phabricator-file-upload' => 'ab85e184',
|
'phabricator-file-upload' => 'ab85e184',
|
||||||
'phabricator-filetree-view-css' => '56cdd875',
|
|
||||||
'phabricator-flag-css' => '2b77be8d',
|
'phabricator-flag-css' => '2b77be8d',
|
||||||
'phabricator-keyboard-shortcut' => '1a844c06',
|
'phabricator-keyboard-shortcut' => '1a844c06',
|
||||||
'phabricator-keyboard-shortcut-manager' => '81debc48',
|
'phabricator-keyboard-shortcut-manager' => '81debc48',
|
||||||
'phabricator-main-menu-view' => 'bcec20f0',
|
'phabricator-main-menu-view' => 'bcec20f0',
|
||||||
'phabricator-nav-view-css' => 'f8a0c1bf',
|
'phabricator-nav-view-css' => '423f92cc',
|
||||||
'phabricator-notification' => 'a9b91e3f',
|
'phabricator-notification' => 'a9b91e3f',
|
||||||
'phabricator-notification-css' => '30240bd2',
|
'phabricator-notification-css' => '30240bd2',
|
||||||
'phabricator-notification-menu-css' => '4df1ee30',
|
'phabricator-notification-menu-css' => '4df1ee30',
|
||||||
|
@ -810,12 +802,12 @@ return array(
|
||||||
'phabricator-shaped-request' => 'abf88db8',
|
'phabricator-shaped-request' => 'abf88db8',
|
||||||
'phabricator-slowvote-css' => '1694baed',
|
'phabricator-slowvote-css' => '1694baed',
|
||||||
'phabricator-source-code-view-css' => '03d7ac28',
|
'phabricator-source-code-view-css' => '03d7ac28',
|
||||||
'phabricator-standard-page-view' => 'ed076e5a',
|
'phabricator-standard-page-view' => 'a374f94c',
|
||||||
'phabricator-textareautils' => 'f340a484',
|
'phabricator-textareautils' => 'f340a484',
|
||||||
'phabricator-title' => '43bc9360',
|
'phabricator-title' => '43bc9360',
|
||||||
'phabricator-tooltip' => '83754533',
|
'phabricator-tooltip' => '83754533',
|
||||||
'phabricator-ui-example-css' => 'b4795059',
|
'phabricator-ui-example-css' => 'b4795059',
|
||||||
'phabricator-zindex-css' => '99c0f5eb',
|
'phabricator-zindex-css' => '612e9522',
|
||||||
'phame-css' => 'bb442327',
|
'phame-css' => 'bb442327',
|
||||||
'pholio-css' => '88ef5ef1',
|
'pholio-css' => '88ef5ef1',
|
||||||
'pholio-edit-css' => '4df55b3b',
|
'pholio-edit-css' => '4df55b3b',
|
||||||
|
@ -1163,6 +1155,18 @@ return array(
|
||||||
'javelin-stratcom',
|
'javelin-stratcom',
|
||||||
'javelin-behavior',
|
'javelin-behavior',
|
||||||
),
|
),
|
||||||
|
'2a3101b1' => array(
|
||||||
|
'javelin-dom',
|
||||||
|
'javelin-util',
|
||||||
|
'javelin-stratcom',
|
||||||
|
'javelin-install',
|
||||||
|
'javelin-workflow',
|
||||||
|
'javelin-router',
|
||||||
|
'javelin-behavior-device',
|
||||||
|
'javelin-vector',
|
||||||
|
'phabricator-diff-inline',
|
||||||
|
'phabricator-diff-path-view',
|
||||||
|
),
|
||||||
'2a8b62d9' => array(
|
'2a8b62d9' => array(
|
||||||
'multirow-row-manager',
|
'multirow-row-manager',
|
||||||
'javelin-install',
|
'javelin-install',
|
||||||
|
@ -1432,6 +1436,11 @@ return array(
|
||||||
'javelin-stratcom',
|
'javelin-stratcom',
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
),
|
),
|
||||||
|
57035863 => array(
|
||||||
|
'javelin-install',
|
||||||
|
'phuix-button-view',
|
||||||
|
'phabricator-diff-tree-view',
|
||||||
|
),
|
||||||
'5793d835' => array(
|
'5793d835' => array(
|
||||||
'javelin-install',
|
'javelin-install',
|
||||||
'javelin-util',
|
'javelin-util',
|
||||||
|
@ -1472,11 +1481,6 @@ return array(
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
'javelin-history',
|
'javelin-history',
|
||||||
),
|
),
|
||||||
'5a351998' => array(
|
|
||||||
'javelin-install',
|
|
||||||
'phuix-button-view',
|
|
||||||
'phabricator-diff-tree-view',
|
|
||||||
),
|
|
||||||
'5a6f6a06' => array(
|
'5a6f6a06' => array(
|
||||||
'javelin-behavior',
|
'javelin-behavior',
|
||||||
'javelin-quicksand',
|
'javelin-quicksand',
|
||||||
|
@ -1583,13 +1587,6 @@ return array(
|
||||||
'javelin-util',
|
'javelin-util',
|
||||||
'javelin-reactor-node-calmer',
|
'javelin-reactor-node-calmer',
|
||||||
),
|
),
|
||||||
'7353f43d' => array(
|
|
||||||
'javelin-behavior',
|
|
||||||
'javelin-stratcom',
|
|
||||||
'javelin-vector',
|
|
||||||
'javelin-dom',
|
|
||||||
'javelin-uri',
|
|
||||||
),
|
|
||||||
'73ecc1f8' => array(
|
'73ecc1f8' => array(
|
||||||
'javelin-behavior',
|
'javelin-behavior',
|
||||||
'javelin-behavior-device',
|
'javelin-behavior-device',
|
||||||
|
@ -1657,9 +1654,6 @@ return array(
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
'javelin-vector',
|
'javelin-vector',
|
||||||
),
|
),
|
||||||
'8337f4c7' => array(
|
|
||||||
'javelin-dom',
|
|
||||||
),
|
|
||||||
83754533 => array(
|
83754533 => array(
|
||||||
'javelin-install',
|
'javelin-install',
|
||||||
'javelin-util',
|
'javelin-util',
|
||||||
|
@ -1878,11 +1872,6 @@ return array(
|
||||||
'a5823e4d' => array(
|
'a5823e4d' => array(
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
),
|
),
|
||||||
'a61c2d11' => array(
|
|
||||||
'javelin-behavior',
|
|
||||||
'phabricator-keyboard-shortcut',
|
|
||||||
'javelin-stratcom',
|
|
||||||
),
|
|
||||||
'a9942052' => array(
|
'a9942052' => array(
|
||||||
'javelin-behavior',
|
'javelin-behavior',
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
|
@ -2046,6 +2035,9 @@ return array(
|
||||||
'c03f2fb4' => array(
|
'c03f2fb4' => array(
|
||||||
'javelin-install',
|
'javelin-install',
|
||||||
),
|
),
|
||||||
|
'c0ed32ce' => array(
|
||||||
|
'javelin-dom',
|
||||||
|
),
|
||||||
'c2c500a7' => array(
|
'c2c500a7' => array(
|
||||||
'javelin-install',
|
'javelin-install',
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
|
@ -2161,18 +2153,6 @@ return array(
|
||||||
'javelin-install',
|
'javelin-install',
|
||||||
'javelin-event',
|
'javelin-event',
|
||||||
),
|
),
|
||||||
'ea6e377d' => array(
|
|
||||||
'javelin-dom',
|
|
||||||
'javelin-util',
|
|
||||||
'javelin-stratcom',
|
|
||||||
'javelin-install',
|
|
||||||
'javelin-workflow',
|
|
||||||
'javelin-router',
|
|
||||||
'javelin-behavior-device',
|
|
||||||
'javelin-vector',
|
|
||||||
'phabricator-diff-inline',
|
|
||||||
'phabricator-diff-path-view',
|
|
||||||
),
|
|
||||||
'ebe83a6b' => array(
|
'ebe83a6b' => array(
|
||||||
'javelin-install',
|
'javelin-install',
|
||||||
),
|
),
|
||||||
|
@ -2187,16 +2167,6 @@ return array(
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
'javelin-stratcom',
|
'javelin-stratcom',
|
||||||
),
|
),
|
||||||
'f166c949' => array(
|
|
||||||
'javelin-behavior',
|
|
||||||
'javelin-behavior-device',
|
|
||||||
'javelin-stratcom',
|
|
||||||
'javelin-dom',
|
|
||||||
'javelin-magical-init',
|
|
||||||
'javelin-vector',
|
|
||||||
'javelin-request',
|
|
||||||
'javelin-util',
|
|
||||||
),
|
|
||||||
'f340a484' => array(
|
'f340a484' => array(
|
||||||
'javelin-install',
|
'javelin-install',
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
|
@ -2377,8 +2347,6 @@ return array(
|
||||||
'javelin-behavior-aphlict-dropdown',
|
'javelin-behavior-aphlict-dropdown',
|
||||||
'javelin-behavior-history-install',
|
'javelin-behavior-history-install',
|
||||||
'javelin-behavior-phabricator-gesture',
|
'javelin-behavior-phabricator-gesture',
|
||||||
'javelin-behavior-phabricator-active-nav',
|
|
||||||
'javelin-behavior-phabricator-nav',
|
|
||||||
'javelin-behavior-phabricator-remarkup-assist',
|
'javelin-behavior-phabricator-remarkup-assist',
|
||||||
'phabricator-textareautils',
|
'phabricator-textareautils',
|
||||||
'phabricator-file-upload',
|
'phabricator-file-upload',
|
||||||
|
@ -2424,7 +2392,6 @@ return array(
|
||||||
'phabricator-content-source-view-css',
|
'phabricator-content-source-view-css',
|
||||||
'inline-comment-summary-css',
|
'inline-comment-summary-css',
|
||||||
'phui-inline-comment-view-css',
|
'phui-inline-comment-view-css',
|
||||||
'phabricator-filetree-view-css',
|
|
||||||
),
|
),
|
||||||
'differential.pkg.js' => array(
|
'differential.pkg.js' => array(
|
||||||
'phabricator-drag-and-drop-file-upload',
|
'phabricator-drag-and-drop-file-upload',
|
||||||
|
|
|
@ -54,8 +54,6 @@ return array(
|
||||||
'javelin-behavior-aphlict-dropdown',
|
'javelin-behavior-aphlict-dropdown',
|
||||||
'javelin-behavior-history-install',
|
'javelin-behavior-history-install',
|
||||||
'javelin-behavior-phabricator-gesture',
|
'javelin-behavior-phabricator-gesture',
|
||||||
'javelin-behavior-phabricator-active-nav',
|
|
||||||
'javelin-behavior-phabricator-nav',
|
|
||||||
'javelin-behavior-phabricator-remarkup-assist',
|
'javelin-behavior-phabricator-remarkup-assist',
|
||||||
'phabricator-textareautils',
|
'phabricator-textareautils',
|
||||||
'phabricator-file-upload',
|
'phabricator-file-upload',
|
||||||
|
@ -187,7 +185,6 @@ return array(
|
||||||
'phabricator-content-source-view-css',
|
'phabricator-content-source-view-css',
|
||||||
'inline-comment-summary-css',
|
'inline-comment-summary-css',
|
||||||
'phui-inline-comment-view-css',
|
'phui-inline-comment-view-css',
|
||||||
'phabricator-filetree-view-css',
|
|
||||||
),
|
),
|
||||||
'differential.pkg.js' => array(
|
'differential.pkg.js' => array(
|
||||||
'phabricator-drag-and-drop-file-upload',
|
'phabricator-drag-and-drop-file-upload',
|
||||||
|
|
|
@ -466,7 +466,6 @@ phutil_register_library_map(array(
|
||||||
'DifferentialChangeset' => 'applications/differential/storage/DifferentialChangeset.php',
|
'DifferentialChangeset' => 'applications/differential/storage/DifferentialChangeset.php',
|
||||||
'DifferentialChangesetDetailView' => 'applications/differential/view/DifferentialChangesetDetailView.php',
|
'DifferentialChangesetDetailView' => 'applications/differential/view/DifferentialChangesetDetailView.php',
|
||||||
'DifferentialChangesetEngine' => 'applications/differential/engine/DifferentialChangesetEngine.php',
|
'DifferentialChangesetEngine' => 'applications/differential/engine/DifferentialChangesetEngine.php',
|
||||||
'DifferentialChangesetFileTreeSideNavBuilder' => 'applications/differential/view/DifferentialChangesetFileTreeSideNavBuilder.php',
|
|
||||||
'DifferentialChangesetHTMLRenderer' => 'applications/differential/render/DifferentialChangesetHTMLRenderer.php',
|
'DifferentialChangesetHTMLRenderer' => 'applications/differential/render/DifferentialChangesetHTMLRenderer.php',
|
||||||
'DifferentialChangesetListController' => 'applications/differential/controller/DifferentialChangesetListController.php',
|
'DifferentialChangesetListController' => 'applications/differential/controller/DifferentialChangesetListController.php',
|
||||||
'DifferentialChangesetListView' => 'applications/differential/view/DifferentialChangesetListView.php',
|
'DifferentialChangesetListView' => 'applications/differential/view/DifferentialChangesetListView.php',
|
||||||
|
@ -4769,7 +4768,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorSetupIssueView' => 'applications/config/view/PhabricatorSetupIssueView.php',
|
'PhabricatorSetupIssueView' => 'applications/config/view/PhabricatorSetupIssueView.php',
|
||||||
'PhabricatorShiftChartFunction' => 'applications/fact/chart/PhabricatorShiftChartFunction.php',
|
'PhabricatorShiftChartFunction' => 'applications/fact/chart/PhabricatorShiftChartFunction.php',
|
||||||
'PhabricatorShortSite' => 'aphront/site/PhabricatorShortSite.php',
|
'PhabricatorShortSite' => 'aphront/site/PhabricatorShortSite.php',
|
||||||
'PhabricatorShowFiletreeSetting' => 'applications/settings/setting/PhabricatorShowFiletreeSetting.php',
|
|
||||||
'PhabricatorSignDocumentsUserLogType' => 'applications/people/userlog/PhabricatorSignDocumentsUserLogType.php',
|
'PhabricatorSignDocumentsUserLogType' => 'applications/people/userlog/PhabricatorSignDocumentsUserLogType.php',
|
||||||
'PhabricatorSimpleEditType' => 'applications/transactions/edittype/PhabricatorSimpleEditType.php',
|
'PhabricatorSimpleEditType' => 'applications/transactions/edittype/PhabricatorSimpleEditType.php',
|
||||||
'PhabricatorSinChartFunction' => 'applications/fact/chart/PhabricatorSinChartFunction.php',
|
'PhabricatorSinChartFunction' => 'applications/fact/chart/PhabricatorSinChartFunction.php',
|
||||||
|
@ -6517,7 +6515,6 @@ phutil_register_library_map(array(
|
||||||
),
|
),
|
||||||
'DifferentialChangesetDetailView' => 'AphrontView',
|
'DifferentialChangesetDetailView' => 'AphrontView',
|
||||||
'DifferentialChangesetEngine' => 'Phobject',
|
'DifferentialChangesetEngine' => 'Phobject',
|
||||||
'DifferentialChangesetFileTreeSideNavBuilder' => 'Phobject',
|
|
||||||
'DifferentialChangesetHTMLRenderer' => 'DifferentialChangesetRenderer',
|
'DifferentialChangesetHTMLRenderer' => 'DifferentialChangesetRenderer',
|
||||||
'DifferentialChangesetListController' => 'DifferentialController',
|
'DifferentialChangesetListController' => 'DifferentialController',
|
||||||
'DifferentialChangesetListView' => 'AphrontView',
|
'DifferentialChangesetListView' => 'AphrontView',
|
||||||
|
@ -11519,7 +11516,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorSetupIssueView' => 'AphrontView',
|
'PhabricatorSetupIssueView' => 'AphrontView',
|
||||||
'PhabricatorShiftChartFunction' => 'PhabricatorPureChartFunction',
|
'PhabricatorShiftChartFunction' => 'PhabricatorPureChartFunction',
|
||||||
'PhabricatorShortSite' => 'PhabricatorSite',
|
'PhabricatorShortSite' => 'PhabricatorSite',
|
||||||
'PhabricatorShowFiletreeSetting' => 'PhabricatorSelectSetting',
|
|
||||||
'PhabricatorSignDocumentsUserLogType' => 'PhabricatorUserLogType',
|
'PhabricatorSignDocumentsUserLogType' => 'PhabricatorUserLogType',
|
||||||
'PhabricatorSimpleEditType' => 'PhabricatorEditType',
|
'PhabricatorSimpleEditType' => 'PhabricatorEditType',
|
||||||
'PhabricatorSinChartFunction' => 'PhabricatorPureChartFunction',
|
'PhabricatorSinChartFunction' => 'PhabricatorPureChartFunction',
|
||||||
|
|
|
@ -193,7 +193,6 @@ final class DifferentialChangesetDetailView extends AphrontView {
|
||||||
'autoload' => $this->getAutoload(),
|
'autoload' => $this->getAutoload(),
|
||||||
'displayPath' => hsprintf('%s', $display_parts),
|
'displayPath' => hsprintf('%s', $display_parts),
|
||||||
'icon' => $display_icon,
|
'icon' => $display_icon,
|
||||||
'treeNodeID' => 'tree-node-'.$changeset->getAnchorName(),
|
|
||||||
'pathParts' => $path_parts,
|
'pathParts' => $path_parts,
|
||||||
|
|
||||||
'editorURI' => $this->getEditorURI(),
|
'editorURI' => $this->getEditorURI(),
|
||||||
|
|
|
@ -1,158 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
final class DifferentialChangesetFileTreeSideNavBuilder extends Phobject {
|
|
||||||
|
|
||||||
private $title;
|
|
||||||
private $baseURI;
|
|
||||||
private $anchorName;
|
|
||||||
private $collapsed = false;
|
|
||||||
private $width;
|
|
||||||
|
|
||||||
public function setAnchorName($anchor_name) {
|
|
||||||
$this->anchorName = $anchor_name;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
public function getAnchorName() {
|
|
||||||
return $this->anchorName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setBaseURI(PhutilURI $base_uri) {
|
|
||||||
$this->baseURI = $base_uri;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
public function getBaseURI() {
|
|
||||||
return $this->baseURI;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setTitle($title) {
|
|
||||||
$this->title = $title;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
public function getTitle() {
|
|
||||||
return $this->title;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setCollapsed($collapsed) {
|
|
||||||
$this->collapsed = $collapsed;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setWidth($width) {
|
|
||||||
$this->width = $width;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function build(array $changesets) {
|
|
||||||
assert_instances_of($changesets, 'DifferentialChangeset');
|
|
||||||
|
|
||||||
$nav = id(new AphrontSideNavFilterView())
|
|
||||||
->setBaseURI($this->getBaseURI())
|
|
||||||
->setFlexible(true)
|
|
||||||
->setCollapsed($this->collapsed)
|
|
||||||
->setWidth($this->width);
|
|
||||||
|
|
||||||
$anchor = $this->getAnchorName();
|
|
||||||
|
|
||||||
$tree = new PhutilFileTree();
|
|
||||||
foreach ($changesets as $changeset) {
|
|
||||||
try {
|
|
||||||
$tree->addPath($changeset->getFilename(), $changeset);
|
|
||||||
} catch (Exception $ex) {
|
|
||||||
// TODO: See T1702. When viewing the versus diff of diffs, we may
|
|
||||||
// have files with the same filename. For example, if you have a setup
|
|
||||||
// like this in SVN:
|
|
||||||
//
|
|
||||||
// a/
|
|
||||||
// README
|
|
||||||
// b/
|
|
||||||
// README
|
|
||||||
//
|
|
||||||
// ...and you run "arc diff" once from a/, and again from b/, you'll
|
|
||||||
// get two diffs with path README. However, in the versus diff view we
|
|
||||||
// will compute their absolute repository paths and detect that they
|
|
||||||
// aren't really the same file. This is correct, but causes us to
|
|
||||||
// throw when inserting them.
|
|
||||||
//
|
|
||||||
// We should probably compute the smallest unique path for each file
|
|
||||||
// and show these as "a/README" and "b/README" when diffed against
|
|
||||||
// one another. However, we get this wrong in a lot of places (the
|
|
||||||
// other TOC shows two "README" files, and we generate the same anchor
|
|
||||||
// hash for both) so I'm just stopping the bleeding until we can get
|
|
||||||
// a proper fix in place.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
require_celerity_resource('phabricator-filetree-view-css');
|
|
||||||
|
|
||||||
$filetree = array();
|
|
||||||
|
|
||||||
$path = $tree;
|
|
||||||
while (($path = $path->getNextNode())) {
|
|
||||||
$data = $path->getData();
|
|
||||||
|
|
||||||
$classes = array();
|
|
||||||
$classes[] = 'phabricator-filetree-item';
|
|
||||||
|
|
||||||
$name = $path->getName();
|
|
||||||
$style = 'padding-left: '.(2 + (3 * $path->getDepth())).'px';
|
|
||||||
|
|
||||||
$href = null;
|
|
||||||
if ($data) {
|
|
||||||
$href = '#'.$data->getAnchorName();
|
|
||||||
$title = $name;
|
|
||||||
|
|
||||||
$icon = $data->newFileTreeIcon();
|
|
||||||
$classes[] = $data->getFileTreeClass();
|
|
||||||
|
|
||||||
$count = phutil_tag(
|
|
||||||
'span',
|
|
||||||
array(
|
|
||||||
'class' => 'filetree-progress-hint',
|
|
||||||
'id' => 'tree-node-'.$data->getAnchorName(),
|
|
||||||
));
|
|
||||||
} else {
|
|
||||||
$name .= '/';
|
|
||||||
$title = $path->getFullPath().'/';
|
|
||||||
$icon = id(new PHUIIconView())
|
|
||||||
->setIcon('fa-folder-open blue');
|
|
||||||
|
|
||||||
$count = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$name_element = phutil_tag(
|
|
||||||
'span',
|
|
||||||
array(
|
|
||||||
'class' => 'phabricator-filetree-name',
|
|
||||||
),
|
|
||||||
$name);
|
|
||||||
|
|
||||||
|
|
||||||
$filetree[] = javelin_tag(
|
|
||||||
$href ? 'a' : 'span',
|
|
||||||
array(
|
|
||||||
'href' => $href,
|
|
||||||
'style' => $style,
|
|
||||||
'title' => $title,
|
|
||||||
'class' => implode(' ', $classes),
|
|
||||||
),
|
|
||||||
array($count, $icon, $name_element));
|
|
||||||
}
|
|
||||||
$tree->destroy();
|
|
||||||
|
|
||||||
$filetree = phutil_tag(
|
|
||||||
'div',
|
|
||||||
array(
|
|
||||||
'class' => 'phabricator-filetree',
|
|
||||||
),
|
|
||||||
$filetree);
|
|
||||||
|
|
||||||
Javelin::initBehavior('phabricator-file-tree', array());
|
|
||||||
|
|
||||||
$nav->addLabel(pht('Changed Files'));
|
|
||||||
$nav->addCustomBlock($filetree);
|
|
||||||
$nav->setActive(true);
|
|
||||||
$nav->selectFilter(null);
|
|
||||||
return $nav;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -457,26 +457,10 @@ final class DiffusionCommitController extends DiffusionController {
|
||||||
$commit,
|
$commit,
|
||||||
$timeline);
|
$timeline);
|
||||||
|
|
||||||
$filetree_on = $viewer->compareUserSetting(
|
$filetree = id(new DifferentialFileTreeEngine())
|
||||||
PhabricatorShowFiletreeSetting::SETTINGKEY,
|
->setViewer($viewer)
|
||||||
PhabricatorShowFiletreeSetting::VALUE_ENABLE_FILETREE);
|
->setChangesets($changesets)
|
||||||
|
->setDisabled(!$show_changesets);
|
||||||
$nav = null;
|
|
||||||
if ($show_changesets && $filetree_on) {
|
|
||||||
$pref_collapse = PhabricatorFiletreeVisibleSetting::SETTINGKEY;
|
|
||||||
$collapsed = $viewer->getUserSetting($pref_collapse);
|
|
||||||
|
|
||||||
$pref_width = PhabricatorFiletreeWidthSetting::SETTINGKEY;
|
|
||||||
$width = $viewer->getUserSetting($pref_width);
|
|
||||||
|
|
||||||
$nav = id(new DifferentialChangesetFileTreeSideNavBuilder())
|
|
||||||
->setTitle($commit->getDisplayName())
|
|
||||||
->setBaseURI(new PhutilURI($commit->getURI()))
|
|
||||||
->build($changesets)
|
|
||||||
->setCrumbs($crumbs)
|
|
||||||
->setCollapsed((bool)$collapsed)
|
|
||||||
->setWidth((int)$width);
|
|
||||||
}
|
|
||||||
|
|
||||||
$description_box = id(new PHUIObjectBoxView())
|
$description_box = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText(pht('Description'))
|
->setHeaderText(pht('Description'))
|
||||||
|
@ -509,18 +493,20 @@ final class DiffusionCommitController extends DiffusionController {
|
||||||
$add_comment,
|
$add_comment,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$main_content = array(
|
||||||
|
$crumbs,
|
||||||
|
$view,
|
||||||
|
);
|
||||||
|
|
||||||
|
$main_content = $filetree->newView($main_content);
|
||||||
|
if (!$filetree->getDisabled()) {
|
||||||
|
$change_list->setFormationView($main_content);
|
||||||
|
}
|
||||||
|
|
||||||
$page = $this->newPage()
|
$page = $this->newPage()
|
||||||
->setTitle($commit->getDisplayName())
|
->setTitle($commit->getDisplayName())
|
||||||
->setCrumbs($crumbs)
|
|
||||||
->setPageObjectPHIDS(array($commit->getPHID()))
|
->setPageObjectPHIDS(array($commit->getPHID()))
|
||||||
->appendChild(
|
->appendChild($main_content);
|
||||||
array(
|
|
||||||
$view,
|
|
||||||
));
|
|
||||||
|
|
||||||
if ($nav) {
|
|
||||||
$page->setNavigation($nav);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $page;
|
return $page;
|
||||||
|
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
final class PhabricatorShowFiletreeSetting
|
|
||||||
extends PhabricatorSelectSetting {
|
|
||||||
|
|
||||||
const SETTINGKEY = 'diff-filetree';
|
|
||||||
|
|
||||||
const VALUE_DISABLE_FILETREE = 0;
|
|
||||||
const VALUE_ENABLE_FILETREE = 1;
|
|
||||||
|
|
||||||
public function getSettingName() {
|
|
||||||
return pht('Show Filetree');
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getSettingOrder() {
|
|
||||||
return 300;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getSettingPanelKey() {
|
|
||||||
return PhabricatorDiffPreferencesSettingsPanel::PANELKEY;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getControlInstructions() {
|
|
||||||
return pht(
|
|
||||||
'When viewing a revision or commit, you can enable a sidebar showing '.
|
|
||||||
'affected files. When this option is enabled, press {nav %s} to show '.
|
|
||||||
'or hide the sidebar.',
|
|
||||||
'f');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getSettingDefaultValue() {
|
|
||||||
return self::VALUE_DISABLE_FILETREE;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getSelectOptions() {
|
|
||||||
return array(
|
|
||||||
self::VALUE_DISABLE_FILETREE => pht('Disable Filetree'),
|
|
||||||
self::VALUE_ENABLE_FILETREE => pht('Enable Filetree'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -20,9 +20,6 @@ final class AphrontSideNavFilterView extends AphrontView {
|
||||||
private $items = array();
|
private $items = array();
|
||||||
private $baseURI;
|
private $baseURI;
|
||||||
private $selectedFilter = false;
|
private $selectedFilter = false;
|
||||||
private $flexible;
|
|
||||||
private $collapsed = false;
|
|
||||||
private $active;
|
|
||||||
private $menu;
|
private $menu;
|
||||||
private $crumbs;
|
private $crumbs;
|
||||||
private $classes = array();
|
private $classes = array();
|
||||||
|
@ -30,7 +27,6 @@ final class AphrontSideNavFilterView extends AphrontView {
|
||||||
private $mainID;
|
private $mainID;
|
||||||
private $isProfileMenu;
|
private $isProfileMenu;
|
||||||
private $footer = array();
|
private $footer = array();
|
||||||
private $width;
|
|
||||||
|
|
||||||
public function setMenuID($menu_id) {
|
public function setMenuID($menu_id) {
|
||||||
$this->menuID = $menu_id;
|
$this->menuID = $menu_id;
|
||||||
|
@ -68,26 +64,6 @@ final class AphrontSideNavFilterView extends AphrontView {
|
||||||
return $this->isProfileMenu;
|
return $this->isProfileMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setActive($active) {
|
|
||||||
$this->active = $active;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setFlexible($flexible) {
|
|
||||||
$this->flexible = $flexible;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setCollapsed($collapsed) {
|
|
||||||
$this->collapsed = $collapsed;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setWidth($width) {
|
|
||||||
$this->width = $width;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getMenuView() {
|
public function getMenuView() {
|
||||||
return $this->menu;
|
return $this->menu;
|
||||||
}
|
}
|
||||||
|
@ -227,53 +203,18 @@ final class AphrontSideNavFilterView extends AphrontView {
|
||||||
$local_menu = null;
|
$local_menu = null;
|
||||||
$main_id = $this->getMainID();
|
$main_id = $this->getMainID();
|
||||||
|
|
||||||
$width = $this->width;
|
|
||||||
if ($width) {
|
|
||||||
$width = min($width, 600);
|
|
||||||
$width = max($width, 150);
|
|
||||||
} else {
|
|
||||||
$width = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($width && !$this->collapsed) {
|
|
||||||
$width_drag_style = 'left: '.$width.'px';
|
|
||||||
$width_panel_style = 'width: '.$width.'px';
|
|
||||||
$width_margin_style = 'margin-left: '.($width + 7).'px';
|
|
||||||
} else {
|
|
||||||
$width_drag_style = null;
|
|
||||||
$width_panel_style = null;
|
|
||||||
$width_margin_style = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->flexible) {
|
|
||||||
$drag_id = celerity_generate_unique_node_id();
|
|
||||||
$flex_bar = phutil_tag(
|
|
||||||
'div',
|
|
||||||
array(
|
|
||||||
'class' => 'phabricator-nav-drag',
|
|
||||||
'id' => $drag_id,
|
|
||||||
'style' => $width_drag_style,
|
|
||||||
),
|
|
||||||
'');
|
|
||||||
} else {
|
|
||||||
$flex_bar = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$nav_menu = null;
|
$nav_menu = null;
|
||||||
if ($this->menu->getItems()) {
|
if ($this->menu->getItems()) {
|
||||||
$local_id = celerity_generate_unique_node_id();
|
$local_id = celerity_generate_unique_node_id();
|
||||||
$background_id = celerity_generate_unique_node_id();
|
$background_id = celerity_generate_unique_node_id();
|
||||||
|
|
||||||
if (!$this->collapsed) {
|
$nav_classes[] = 'has-local-nav';
|
||||||
$nav_classes[] = 'has-local-nav';
|
|
||||||
}
|
|
||||||
|
|
||||||
$local_menu = phutil_tag(
|
$local_menu = phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
array(
|
array(
|
||||||
'class' => 'phabricator-nav-local phabricator-side-menu',
|
'class' => 'phabricator-nav-local phabricator-side-menu',
|
||||||
'id' => $local_id,
|
'id' => $local_id,
|
||||||
'style' => $width_panel_style,
|
|
||||||
),
|
),
|
||||||
$this->menu->setID($this->getMenuID()));
|
$this->menu->setID($this->getMenuID()));
|
||||||
}
|
}
|
||||||
|
@ -284,34 +225,6 @@ final class AphrontSideNavFilterView extends AphrontView {
|
||||||
$nav_classes[] = 'has-crumbs';
|
$nav_classes[] = 'has-crumbs';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->flexible) {
|
|
||||||
if (!$this->collapsed) {
|
|
||||||
$nav_classes[] = 'has-drag-nav';
|
|
||||||
} else {
|
|
||||||
$nav_classes[] = 'has-closed-nav';
|
|
||||||
}
|
|
||||||
|
|
||||||
Javelin::initBehavior(
|
|
||||||
'phabricator-nav',
|
|
||||||
array(
|
|
||||||
'mainID' => $main_id,
|
|
||||||
'localID' => $local_id,
|
|
||||||
'dragID' => $drag_id,
|
|
||||||
'contentID' => $content_id,
|
|
||||||
'backgroundID' => $background_id,
|
|
||||||
'collapsed' => $this->collapsed,
|
|
||||||
'width' => $width,
|
|
||||||
));
|
|
||||||
|
|
||||||
if ($this->active) {
|
|
||||||
Javelin::initBehavior(
|
|
||||||
'phabricator-active-nav',
|
|
||||||
array(
|
|
||||||
'localID' => $local_id,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$nav_classes = array_merge($nav_classes, $this->classes);
|
$nav_classes = array_merge($nav_classes, $this->classes);
|
||||||
|
|
||||||
$menu = phutil_tag(
|
$menu = phutil_tag(
|
||||||
|
@ -322,13 +235,11 @@ final class AphrontSideNavFilterView extends AphrontView {
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
$local_menu,
|
$local_menu,
|
||||||
$flex_bar,
|
|
||||||
phutil_tag(
|
phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
array(
|
array(
|
||||||
'class' => 'phabricator-nav-content plb',
|
'class' => 'phabricator-nav-content plb',
|
||||||
'id' => $content_id,
|
'id' => $content_id,
|
||||||
'style' => $width_margin_style,
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
$crumbs,
|
$crumbs,
|
||||||
|
|
|
@ -2,19 +2,11 @@
|
||||||
* @provides phabricator-nav-view-css
|
* @provides phabricator-nav-view-css
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.jx-drag-col {
|
.device .phui-navigation-shell div.phabricator-nav-local {
|
||||||
cursor: col-resize;
|
|
||||||
}
|
|
||||||
|
|
||||||
.device-desktop .has-closed-nav div.phabricator-nav-local,
|
|
||||||
.device-desktop .has-closed-nav div.phabricator-nav-drag,
|
|
||||||
.device .phui-navigation-shell div.phabricator-nav-local,
|
|
||||||
.device .phui-navigation-shell div.phabricator-nav-drag {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-desktop .has-local-nav .phabricator-nav-local,
|
.device-desktop .has-local-nav .phabricator-nav-local {
|
||||||
.device-desktop .has-local-nav .phabricator-nav-drag {
|
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,55 +32,11 @@
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.phabricator-nav-drag {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 310px;
|
|
||||||
width: 7px;
|
|
||||||
|
|
||||||
cursor: col-resize;
|
|
||||||
background: #f5f5f5;
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 0 1px 0 1px;
|
|
||||||
border-color: #fff #999c9e #fff #999c9e;
|
|
||||||
|
|
||||||
box-shadow: inset -1px 0px 1px rgba({$alphablack}, 0.15);
|
|
||||||
|
|
||||||
background-image: url(/rsrc/image/divot.png);
|
|
||||||
background-position: center;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
.phabricator-nav-content {
|
.phabricator-nav-content {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-desktop .phabricator-standard-page-body .has-drag-nav
|
|
||||||
.phabricator-nav-content {
|
|
||||||
margin-left: 317px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.device-desktop .phabricator-standard-page-body .has-drag-nav
|
|
||||||
.phabricator-nav-local {
|
|
||||||
max-width: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.has-drag-nav ul.phui-list-view {
|
|
||||||
height: 100%;
|
|
||||||
overflow-y: auto;
|
|
||||||
overflow-x: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.device-desktop .phui-navigation-shell .has-drag-nav .phabricator-nav-local {
|
|
||||||
width: 310px;
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
/* See PHI568. If we don't paint the background explicitly, the content can
|
|
||||||
render underneath it when scrolled horizontally. */
|
|
||||||
background: {$page.background};
|
|
||||||
}
|
|
||||||
|
|
||||||
.device-phone .phabricator-side-menu-home .phabricator-nav-content {
|
.device-phone .phabricator-side-menu-home .phabricator-nav-content {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,10 +81,13 @@ body.white-background {
|
||||||
}
|
}
|
||||||
|
|
||||||
.keyboard-focus-focus-reticle {
|
.keyboard-focus-focus-reticle {
|
||||||
background: rgba(255, 255, 211, 0.15);
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
border: 1px solid {$yellow};
|
|
||||||
pointer-events: none;
|
box-sizing: border-box;
|
||||||
|
border-width: 0 6px 0 0;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: {$yellow};
|
||||||
|
background: {$lightyellow};
|
||||||
}
|
}
|
||||||
|
|
||||||
a.handle-status-closed {
|
a.handle-status-closed {
|
||||||
|
|
|
@ -3,16 +3,19 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.diff-tree-view {
|
.diff-tree-view {
|
||||||
margin: 4px;
|
margin: 0 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.diff-tree-path {
|
.diff-tree-path {
|
||||||
position: relative;
|
|
||||||
height: 20px;
|
height: 20px;
|
||||||
color: {$greytext};
|
color: {$greytext};
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.diff-tree-path-indent {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
.diff-tree-path-icon {
|
.diff-tree-path-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
|
@ -22,7 +25,7 @@
|
||||||
|
|
||||||
.diff-tree-path-name {
|
.diff-tree-path-name {
|
||||||
margin-left: 24px;
|
margin-left: 24px;
|
||||||
margin-right: 24px;
|
margin-right: 44px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
@ -45,3 +48,28 @@
|
||||||
background: {$lightblueborder};
|
background: {$lightblueborder};
|
||||||
transition: 0.1s;
|
transition: 0.1s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.diff-tree-path-inlines {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
right: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
text-align: center;
|
||||||
|
top: 2px;
|
||||||
|
height: 16px;
|
||||||
|
line-height: 14px;
|
||||||
|
width: 36px;
|
||||||
|
font-size: {$smallerfontsize};
|
||||||
|
color: {$greytext};
|
||||||
|
}
|
||||||
|
|
||||||
|
.diff-tree-path-inlines-visible {
|
||||||
|
display: block;
|
||||||
|
background: {$lightblueborder};
|
||||||
|
}
|
||||||
|
|
||||||
|
.diff-tree-path-inlines-completed {
|
||||||
|
background: {$darkgreybackground};
|
||||||
|
color: {$lightgreytext};
|
||||||
|
opacity: 0.75;
|
||||||
|
}
|
||||||
|
|
|
@ -64,10 +64,6 @@ div.phui-calendar-day-event {
|
||||||
z-index: 4;
|
z-index: 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.phabricator-nav-drag {
|
|
||||||
z-index: 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
.conpherence-message-pane .conpherence-search-main {
|
.conpherence-message-pane .conpherence-search-main {
|
||||||
z-index: 4;
|
z-index: 4;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,91 +0,0 @@
|
||||||
/**
|
|
||||||
* @provides phabricator-filetree-view-css
|
|
||||||
*/
|
|
||||||
|
|
||||||
.phabricator-filetree {
|
|
||||||
padding: 4px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* NOTE: Until the whole side nav situation gets cleaned up, we need to be
|
|
||||||
highly specific in specifying selectors here, to override side nav styles.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.phabricator-filetree .phabricator-filetree-item {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
display: block;
|
|
||||||
border-left: 4px solid transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.phabricator-filetree span.phabricator-filetree-icon {
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: 0 2px;
|
|
||||||
width: 16px;
|
|
||||||
height: 20px;
|
|
||||||
padding: 0;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.phabricator-filetree span.phabricator-filetree-name {
|
|
||||||
padding: 0;
|
|
||||||
margin-left: 4px;
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: normal;
|
|
||||||
line-height: 20px;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.phabricator-filetree span.phabricator-filetree-item
|
|
||||||
.phabricator-filetree-name {
|
|
||||||
color: {$darkbluetext};
|
|
||||||
}
|
|
||||||
|
|
||||||
.phabricator-filetree a.phabricator-filetree-item
|
|
||||||
.phabricator-filetree-name {
|
|
||||||
color: {$darkbluetext};
|
|
||||||
}
|
|
||||||
|
|
||||||
.phabricator-filetree a.phabricator-filetree-item:hover {
|
|
||||||
text-decoration: none;
|
|
||||||
background-color: {$hovergrey};
|
|
||||||
}
|
|
||||||
|
|
||||||
.phabricator-filetree .filetree-added {
|
|
||||||
background: {$sh-greenbackground};
|
|
||||||
}
|
|
||||||
|
|
||||||
.phabricator-filetree .filetree-deleted {
|
|
||||||
background: {$sh-redbackground};
|
|
||||||
}
|
|
||||||
|
|
||||||
.phabricator-filetree .filetree-movecopy {
|
|
||||||
background: {$sh-orangebackground};
|
|
||||||
}
|
|
||||||
|
|
||||||
.phabricator-filetree .phabricator-active-nav-focus {
|
|
||||||
background-color: {$hovergrey};
|
|
||||||
border-left: 4px solid {$sky};
|
|
||||||
}
|
|
||||||
|
|
||||||
.phabricator-filetree .filetree-progress-hint {
|
|
||||||
width: 24px;
|
|
||||||
margin-right: 6px;
|
|
||||||
display: inline-block;
|
|
||||||
padding: 0 4px;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: smaller;
|
|
||||||
background: {$greybackground};
|
|
||||||
text-align: center;
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.phabricator-filetree .filetree-comments-visible {
|
|
||||||
background: {$lightblue};
|
|
||||||
opacity: 0.75;
|
|
||||||
color: {$darkgreytext};
|
|
||||||
}
|
|
||||||
|
|
||||||
.phabricator-filetree .filetree-comments-completed {
|
|
||||||
background: {$darkgreybackground};
|
|
||||||
color: {$greytext};
|
|
||||||
}
|
|
|
@ -67,7 +67,6 @@ JX.install('DiffChangeset', {
|
||||||
|
|
||||||
_changesetList: null,
|
_changesetList: null,
|
||||||
_icon: null,
|
_icon: null,
|
||||||
_treeNodeID: null,
|
|
||||||
|
|
||||||
_editorURI: null,
|
_editorURI: null,
|
||||||
_editorConfigureURI: null,
|
_editorConfigureURI: null,
|
||||||
|
@ -770,13 +769,6 @@ JX.install('DiffChangeset', {
|
||||||
},
|
},
|
||||||
|
|
||||||
redrawFileTree: function() {
|
redrawFileTree: function() {
|
||||||
var tree;
|
|
||||||
try {
|
|
||||||
tree = JX.$(this._treeNodeID);
|
|
||||||
} catch (e) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var inlines = this._inlines;
|
var inlines = this._inlines;
|
||||||
var done = [];
|
var done = [];
|
||||||
var undone = [];
|
var undone = [];
|
||||||
|
@ -833,9 +825,12 @@ JX.install('DiffChangeset', {
|
||||||
is_completed = false;
|
is_completed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
JX.DOM.setContent(tree, hint);
|
var node = this.getPathView().getInlineNode();
|
||||||
JX.DOM.alterClass(tree, 'filetree-comments-visible', is_visible);
|
|
||||||
JX.DOM.alterClass(tree, 'filetree-comments-completed', is_completed);
|
JX.DOM.setContent(node, hint);
|
||||||
|
|
||||||
|
JX.DOM.alterClass(node, 'diff-tree-path-inlines-visible', is_visible);
|
||||||
|
JX.DOM.alterClass(node, 'diff-tree-path-inlines-completed', is_completed);
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleVisibility: function() {
|
toggleVisibility: function() {
|
||||||
|
|
|
@ -1177,14 +1177,15 @@ JX.install('DiffChangesetList', {
|
||||||
// space between the focused element and the outline.
|
// space between the focused element and the outline.
|
||||||
var p = JX.Vector.getPos(node);
|
var p = JX.Vector.getPos(node);
|
||||||
var s = JX.Vector.getAggregateScrollForNode(node);
|
var s = JX.Vector.getAggregateScrollForNode(node);
|
||||||
|
var d = JX.Vector.getDim(node);
|
||||||
|
|
||||||
p.add(s).add(-4, -4).setPos(reticle);
|
p.add(s).add(d.x + 1, 0).setPos(reticle);
|
||||||
// Compute the size we need to extend to the full extent of the focused
|
// Compute the size we need to extend to the full extent of the focused
|
||||||
// nodes.
|
// nodes.
|
||||||
JX.Vector.getPos(extended_node)
|
JX.Vector.getPos(extended_node)
|
||||||
.add(-p.x, -p.y)
|
.add(-p.x, -p.y)
|
||||||
.add(JX.Vector.getDim(extended_node))
|
.add(0, JX.Vector.getDim(extended_node).y)
|
||||||
.add(8, 8)
|
.add(10, 0)
|
||||||
.setDim(reticle);
|
.setDim(reticle);
|
||||||
|
|
||||||
JX.DOM.getContentFrame().appendChild(reticle);
|
JX.DOM.getContentFrame().appendChild(reticle);
|
||||||
|
|
|
@ -20,6 +20,7 @@ JX.install('DiffPathView', {
|
||||||
_indentNode: null,
|
_indentNode: null,
|
||||||
_pathNode: null,
|
_pathNode: null,
|
||||||
_changeset: null,
|
_changeset: null,
|
||||||
|
_inlineNode: null,
|
||||||
|
|
||||||
getNode: function() {
|
getNode: function() {
|
||||||
if (!this._node) {
|
if (!this._node) {
|
||||||
|
@ -71,7 +72,7 @@ JX.install('DiffPathView', {
|
||||||
setDepth: function(depth) {
|
setDepth: function(depth) {
|
||||||
this._depth = depth;
|
this._depth = depth;
|
||||||
|
|
||||||
this._getIndentNode().style.marginLeft = (8 * this._depth) + 'px';
|
this._getIndentNode().style.marginLeft = (6 * this._depth) + 'px';
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
@ -109,12 +110,17 @@ JX.install('DiffPathView', {
|
||||||
|
|
||||||
_getIndentNode: function() {
|
_getIndentNode: function() {
|
||||||
if (!this._indentNode) {
|
if (!this._indentNode) {
|
||||||
|
var attrs = {
|
||||||
|
className: 'diff-tree-path-indent'
|
||||||
|
};
|
||||||
|
|
||||||
var content = [
|
var content = [
|
||||||
|
this.getInlineNode(),
|
||||||
this._getIconNode(),
|
this._getIconNode(),
|
||||||
this._getPathNode(),
|
this._getPathNode(),
|
||||||
];
|
];
|
||||||
|
|
||||||
this._indentNode = JX.$N('div', {}, content);
|
this._indentNode = JX.$N('div', attrs, content);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this._indentNode;
|
return this._indentNode;
|
||||||
|
@ -138,6 +144,16 @@ JX.install('DiffPathView', {
|
||||||
this._iconNode = JX.$N('div', attrs, this.getIcon().getNode());
|
this._iconNode = JX.$N('div', attrs, this.getIcon().getNode());
|
||||||
}
|
}
|
||||||
return this._iconNode;
|
return this._iconNode;
|
||||||
|
},
|
||||||
|
|
||||||
|
getInlineNode: function() {
|
||||||
|
if (!this._inlineNode) {
|
||||||
|
var attrs = {
|
||||||
|
className: 'diff-tree-path-inlines',
|
||||||
|
};
|
||||||
|
this._inlineNode = JX.$N('div', attrs, '-');
|
||||||
|
}
|
||||||
|
return this._inlineNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,87 +0,0 @@
|
||||||
/**
|
|
||||||
* @provides javelin-behavior-phabricator-active-nav
|
|
||||||
* @requires javelin-behavior
|
|
||||||
* javelin-stratcom
|
|
||||||
* javelin-vector
|
|
||||||
* javelin-dom
|
|
||||||
* javelin-uri
|
|
||||||
*/
|
|
||||||
|
|
||||||
JX.behavior('phabricator-active-nav', function(config) {
|
|
||||||
|
|
||||||
var local = JX.$(config.localID);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Select the navigation item corresponding to a given anchor.
|
|
||||||
*/
|
|
||||||
var selectnav = function(anchor) {
|
|
||||||
var links = JX.DOM.scry(local, 'a');
|
|
||||||
var link;
|
|
||||||
var link_anchor;
|
|
||||||
var selected;
|
|
||||||
for (var ii = 0; ii < links.length; ii++) {
|
|
||||||
link = links[ii];
|
|
||||||
link_anchor = JX.$U(link.href).getFragment();
|
|
||||||
|
|
||||||
selected = (link_anchor == anchor);
|
|
||||||
JX.DOM.alterClass(
|
|
||||||
link,
|
|
||||||
'phabricator-active-nav-focus',
|
|
||||||
selected);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identify the current anchor based on the document scroll position.
|
|
||||||
*/
|
|
||||||
var updateposition = function() {
|
|
||||||
// Find all the markers in the document.
|
|
||||||
var scroll_position = JX.Vector.getScroll().y;
|
|
||||||
var document_size = JX.Vector.getDocument();
|
|
||||||
var viewport_size = JX.Vector.getViewport();
|
|
||||||
|
|
||||||
// If we're scrolled all the way down, we always want to select the last
|
|
||||||
// anchor.
|
|
||||||
var is_at_bottom = (viewport_size.y + scroll_position >= document_size.y);
|
|
||||||
|
|
||||||
var markers = JX.DOM.scry(document.body, 'legend', 'marker');
|
|
||||||
|
|
||||||
// Sort the markers by Y position, descending.
|
|
||||||
var markinfo = [];
|
|
||||||
var ii;
|
|
||||||
for (ii = 0; ii < markers.length; ii++) {
|
|
||||||
markinfo.push({
|
|
||||||
marker: markers[ii],
|
|
||||||
position: JX.$V(markers[ii]).y - 15
|
|
||||||
});
|
|
||||||
}
|
|
||||||
markinfo.sort(function(u, v) { return (v.position - u.position); });
|
|
||||||
|
|
||||||
// Find the first marker above the current scroll position, or the first
|
|
||||||
// marker in the document if we're above all the markers.
|
|
||||||
var active = null;
|
|
||||||
for (ii = 0; ii < markinfo.length; ii++) {
|
|
||||||
active = markinfo[ii].marker;
|
|
||||||
if (markinfo[ii].position <= scroll_position) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (is_at_bottom) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// If we get above the first marker, select it.
|
|
||||||
selectnav(active && JX.Stratcom.getData(active).anchor);
|
|
||||||
};
|
|
||||||
|
|
||||||
var pending = null;
|
|
||||||
var onviewportchange = function() {
|
|
||||||
pending && clearTimeout(pending);
|
|
||||||
pending = setTimeout(updateposition, 100);
|
|
||||||
};
|
|
||||||
|
|
||||||
JX.Stratcom.listen('scroll', null, onviewportchange);
|
|
||||||
JX.Stratcom.listen('resize', null, onviewportchange);
|
|
||||||
JX.Stratcom.listen('hashchange', null, onviewportchange);
|
|
||||||
});
|
|
|
@ -1,17 +0,0 @@
|
||||||
/**
|
|
||||||
* @provides javelin-behavior-phabricator-file-tree
|
|
||||||
* @requires javelin-behavior
|
|
||||||
* phabricator-keyboard-shortcut
|
|
||||||
* javelin-stratcom
|
|
||||||
*/
|
|
||||||
|
|
||||||
JX.behavior('phabricator-file-tree', function() {
|
|
||||||
|
|
||||||
new JX.KeyboardShortcut('f', 'Toggle file tree.')
|
|
||||||
.setGroup('diff-vis')
|
|
||||||
.setHandler(function() {
|
|
||||||
JX.Stratcom.invoke('differential-filetree-toggle');
|
|
||||||
})
|
|
||||||
.register();
|
|
||||||
|
|
||||||
});
|
|
|
@ -1,223 +0,0 @@
|
||||||
/**
|
|
||||||
* @provides javelin-behavior-phabricator-nav
|
|
||||||
* @requires javelin-behavior
|
|
||||||
* javelin-behavior-device
|
|
||||||
* javelin-stratcom
|
|
||||||
* javelin-dom
|
|
||||||
* javelin-magical-init
|
|
||||||
* javelin-vector
|
|
||||||
* javelin-request
|
|
||||||
* javelin-util
|
|
||||||
* @javelin
|
|
||||||
*/
|
|
||||||
|
|
||||||
JX.behavior('phabricator-nav', function(config) {
|
|
||||||
|
|
||||||
var content = JX.$(config.contentID);
|
|
||||||
var local = JX.$(config.localID);
|
|
||||||
var main = JX.$(config.mainID);
|
|
||||||
var drag = JX.$(config.dragID);
|
|
||||||
|
|
||||||
// - Flexible Navigation Column ------------------------------------------------
|
|
||||||
|
|
||||||
var dragging;
|
|
||||||
var track;
|
|
||||||
|
|
||||||
var collapsed = config.collapsed;
|
|
||||||
var narrowed;
|
|
||||||
var visible = null;
|
|
||||||
|
|
||||||
JX.enableDispatch(document.body, 'mousemove');
|
|
||||||
|
|
||||||
JX.DOM.listen(drag, 'mousedown', null, function(e) {
|
|
||||||
if (!e.isNormalMouseEvent()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
dragging = JX.$V(e);
|
|
||||||
|
|
||||||
// Show the "col-resize" cursor on the whole document while we're
|
|
||||||
// dragging, since the mouse will slip off the actual bar fairly often and
|
|
||||||
// we don't want it to flicker.
|
|
||||||
JX.DOM.alterClass(document.body, 'jx-drag-col', true);
|
|
||||||
|
|
||||||
track = [
|
|
||||||
{
|
|
||||||
element: local,
|
|
||||||
parameter: 'width',
|
|
||||||
start: JX.Vector.getDim(local).x,
|
|
||||||
width: JX.Vector.getDim(local).x,
|
|
||||||
minWidth: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
element: drag,
|
|
||||||
parameter: 'left',
|
|
||||||
start: get_width()
|
|
||||||
},
|
|
||||||
{
|
|
||||||
element: content,
|
|
||||||
parameter: 'marginLeft',
|
|
||||||
start: parseInt(getComputedStyle(content).marginLeft, 10),
|
|
||||||
width: JX.Vector.getDim(content).x,
|
|
||||||
minWidth: 300,
|
|
||||||
minScale: -1
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
e.kill();
|
|
||||||
});
|
|
||||||
|
|
||||||
JX.Stratcom.listen('mousemove', null, function(e) {
|
|
||||||
if (!dragging) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var dx = JX.$V(e).x - dragging.x;
|
|
||||||
var panel;
|
|
||||||
var k;
|
|
||||||
|
|
||||||
for (k = 0; k < track.length; k++) {
|
|
||||||
panel = track[k];
|
|
||||||
if (!panel.minWidth) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
var new_width = panel.width + (dx * (panel.minScale || 1));
|
|
||||||
if (new_width < panel.minWidth) {
|
|
||||||
dx = (panel.minWidth - panel.width) * panel.minScale;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (k = 0; k < track.length; k++) {
|
|
||||||
panel = track[k];
|
|
||||||
var v = (panel.start + (dx * (panel.scale || 1)));
|
|
||||||
panel.element.style[panel.parameter] = v + 'px';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
JX.Stratcom.listen('mouseup', null, function() {
|
|
||||||
if (!dragging) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
JX.DOM.alterClass(document.body, 'jx-drag-col', false);
|
|
||||||
dragging = false;
|
|
||||||
|
|
||||||
new JX.Request('/settings/adjust/', JX.bag)
|
|
||||||
.setData(
|
|
||||||
{
|
|
||||||
key: 'filetree.width',
|
|
||||||
value: get_width()
|
|
||||||
})
|
|
||||||
.send();
|
|
||||||
});
|
|
||||||
|
|
||||||
function get_width() {
|
|
||||||
// See PHI568. If the document has scrolled horizontally, the "x" position
|
|
||||||
// of the bar will be the actual width of the menu plus the horizontal
|
|
||||||
// scroll position (because the element is "position: fixed"). Subtract the
|
|
||||||
// document scroll position when saving the element width so that scrolling
|
|
||||||
// to the right and then toggling the filetree UI does not make it grow
|
|
||||||
// any wider.
|
|
||||||
return (JX.$V(drag).x - JX.Vector.getScroll().x);
|
|
||||||
}
|
|
||||||
|
|
||||||
function repaint() {
|
|
||||||
narrowed = !JX.Device.isDesktop();
|
|
||||||
|
|
||||||
var was_visible = visible;
|
|
||||||
visible = (!collapsed && !narrowed);
|
|
||||||
|
|
||||||
if (was_visible === visible) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!visible) {
|
|
||||||
savedrag();
|
|
||||||
}
|
|
||||||
|
|
||||||
JX.DOM.alterClass(main, 'has-local-nav', visible);
|
|
||||||
JX.DOM.alterClass(main, 'has-drag-nav', visible);
|
|
||||||
JX.DOM.alterClass(main, 'has-closed-nav', !visible);
|
|
||||||
|
|
||||||
if (visible) {
|
|
||||||
restoredrag();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var saved_width = config.width;
|
|
||||||
function savedrag() {
|
|
||||||
saved_width = get_width();
|
|
||||||
|
|
||||||
local.style.width = '';
|
|
||||||
drag.style.left = '';
|
|
||||||
content.style.marginLeft = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
function restoredrag() {
|
|
||||||
if (!saved_width) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
local.style.width = saved_width + 'px';
|
|
||||||
drag.style.left = saved_width + 'px';
|
|
||||||
content.style.marginLeft = (saved_width + JX.Vector.getDim(drag).x) + 'px';
|
|
||||||
}
|
|
||||||
|
|
||||||
JX.Stratcom.listen('differential-filetree-toggle', null, function() {
|
|
||||||
collapsed = !collapsed;
|
|
||||||
|
|
||||||
repaint();
|
|
||||||
|
|
||||||
new JX.Request('/settings/adjust/', JX.bag)
|
|
||||||
.setData({ key : 'nav-collapsed', value : (collapsed ? 1 : 0) })
|
|
||||||
.send();
|
|
||||||
|
|
||||||
// Invoke a resize event so page elements can redraw if they need to. One
|
|
||||||
// example is the selection reticles in Differential.
|
|
||||||
JX.Stratcom.invoke('resize');
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// - Scroll --------------------------------------------------------------------
|
|
||||||
|
|
||||||
// When the user scrolls or resizes the window, anchor the menu to to the top
|
|
||||||
// of the navigation bar.
|
|
||||||
|
|
||||||
function onresize() {
|
|
||||||
repaint();
|
|
||||||
|
|
||||||
if (!visible) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// When the buoyant header is visible, move the menu down below it. This
|
|
||||||
// is a bit of a hack.
|
|
||||||
var banner_height = 0;
|
|
||||||
try {
|
|
||||||
var banner = JX.$('diff-banner');
|
|
||||||
banner_height = JX.Vector.getDim(banner).y;
|
|
||||||
} catch (error) {
|
|
||||||
// Ignore if there's no banner on the page.
|
|
||||||
}
|
|
||||||
|
|
||||||
local.style.top = Math.max(
|
|
||||||
0,
|
|
||||||
banner_height,
|
|
||||||
JX.$V(content).y - Math.max(0, JX.Vector.getScroll().y)) + 'px';
|
|
||||||
}
|
|
||||||
|
|
||||||
local.style.position = 'fixed';
|
|
||||||
local.style.bottom = 0;
|
|
||||||
local.style.left = 0;
|
|
||||||
|
|
||||||
JX.Stratcom.listen(['scroll', 'resize'], null, onresize);
|
|
||||||
|
|
||||||
repaint();
|
|
||||||
|
|
||||||
// - Navigation Reset ----------------------------------------------------------
|
|
||||||
|
|
||||||
JX.Stratcom.listen('phabricator-device-change', null, function() {
|
|
||||||
repaint();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
Loading…
Reference in a new issue