@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.

Move all comment management junk into a dropdown menu

Summary:
man I sure hate Javascript

I removed the ajax-edit and ajax-remove interactions, becuase they were prohibitively complex to get working given that the entire menu has to change too. Instead, the page just reloads. This works perfectly fine in practice.

If we want to restore these in the future, we should have the server re-render the entire transaction group or something. I think very little is lost here, though.

Test Plan:
- Took all the actions.
- Used existing dropdown menus.

{F150196}

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

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

+450 -253
+156 -135
resources/celerity/map.php
··· 7 7 return array( 8 8 'names' => 9 9 array( 10 - 'core.pkg.css' => 'afe6e16d', 11 - 'core.pkg.js' => 'c415c382', 10 + 'core.pkg.css' => '4279f4bd', 11 + 'core.pkg.js' => 'f6616bcf', 12 12 'darkconsole.pkg.js' => 'ca8671ce', 13 13 'differential.pkg.css' => '4b8686e3', 14 - 'differential.pkg.js' => '11a5b750', 14 + 'differential.pkg.js' => 'a2f45b5f', 15 15 'diffusion.pkg.css' => '3783278d', 16 16 'diffusion.pkg.js' => '5b4010f4', 17 - 'javelin.pkg.js' => '9f6d38c7', 17 + 'javelin.pkg.js' => 'c57fd32c', 18 18 'maniphest.pkg.css' => 'f1887d71', 19 19 'maniphest.pkg.js' => '2fe8af22', 20 20 'rsrc/css/aphront/aphront-bars.css' => '231ac33c', ··· 49 49 'rsrc/css/application/conpherence/message-pane.css' => 'e46b612c', 50 50 'rsrc/css/application/conpherence/notification.css' => '403cf598', 51 51 'rsrc/css/application/conpherence/update.css' => '1099a660', 52 - 'rsrc/css/application/conpherence/widget-pane.css' => '87b12e0c', 52 + 'rsrc/css/application/conpherence/widget-pane.css' => 'bf275a6c', 53 53 'rsrc/css/application/contentsource/content-source-view.css' => '4b8b05d4', 54 54 'rsrc/css/application/countdown/timer.css' => '86b7b0a0', 55 55 'rsrc/css/application/diff/inline-comment-summary.css' => '8cfd34e8', ··· 105 105 'rsrc/css/application/subscriptions/subscribers-list.css' => '5bb30c78', 106 106 'rsrc/css/application/tokens/tokens.css' => '3d0f239e', 107 107 'rsrc/css/application/uiexample/example.css' => '528b19de', 108 - 'rsrc/css/core/core.css' => '7dff07c3', 109 - 'rsrc/css/core/remarkup.css' => '0ec9ea61', 108 + 'rsrc/css/core/core.css' => 'ef1b7892', 109 + 'rsrc/css/core/remarkup.css' => '80c3a48c', 110 110 'rsrc/css/core/syntax.css' => '3c18c1cb', 111 - 'rsrc/css/core/z-index.css' => '7e4989ed', 111 + 'rsrc/css/core/z-index.css' => 'efb673ac', 112 112 'rsrc/css/diviner/diviner-shared.css' => '38813222', 113 113 'rsrc/css/font/font-awesome.css' => '62bc244d', 114 114 'rsrc/css/font/font-glyphicons-halflings.css' => 'c4c1c6b6', 115 115 'rsrc/css/font/font-source-sans-pro.css' => '91d53463', 116 116 'rsrc/css/font/phui-font-icon-base.css' => 'cd92ff25', 117 117 'rsrc/css/layout/phabricator-action-header-view.css' => 'c14dfc57', 118 - 'rsrc/css/layout/phabricator-action-list-view.css' => '81383e25', 118 + 'rsrc/css/layout/phabricator-action-list-view.css' => '6f7ef696', 119 119 'rsrc/css/layout/phabricator-crumbs-view.css' => '0222cbe0', 120 120 'rsrc/css/layout/phabricator-filetree-view.css' => 'a8c86ace', 121 121 'rsrc/css/layout/phabricator-hovercard-view.css' => '46a13cf0', ··· 126 126 'rsrc/css/phui/calendar/phui-calendar-month.css' => 'a92e47d2', 127 127 'rsrc/css/phui/calendar/phui-calendar.css' => '5e1ad989', 128 128 'rsrc/css/phui/phui-box.css' => '7b3a2eed', 129 - 'rsrc/css/phui/phui-button.css' => '653ac588', 129 + 'rsrc/css/phui/phui-button.css' => '3dbdbf0d', 130 130 'rsrc/css/phui/phui-document.css' => '3b078dc0', 131 131 'rsrc/css/phui/phui-feed-story.css' => '3a59c2cf', 132 132 'rsrc/css/phui/phui-fontkit.css' => 'de84aa4a', ··· 145 145 'rsrc/css/phui/phui-status.css' => '2f562399', 146 146 'rsrc/css/phui/phui-tag-view.css' => '295d81c4', 147 147 'rsrc/css/phui/phui-text.css' => '23e9b4b7', 148 - 'rsrc/css/phui/phui-timeline-view.css' => '4a39d766', 148 + 'rsrc/css/phui/phui-timeline-view.css' => '15ff2a9f', 149 149 'rsrc/css/phui/phui-workboard-view.css' => '84f2c272', 150 150 'rsrc/css/phui/phui-workpanel-view.css' => '97b69459', 151 151 'rsrc/css/sprite-actions.css' => '969ad0e5', ··· 163 163 'rsrc/css/sprite-minicons.css' => 'df4f76fe', 164 164 'rsrc/css/sprite-payments.css' => 'cc085d44', 165 165 'rsrc/css/sprite-projects.css' => '7578fa56', 166 - 'rsrc/css/sprite-status.css' => '8bce1c97', 166 + 'rsrc/css/sprite-status.css' => '25d7f92f', 167 167 'rsrc/css/sprite-tokens.css' => '1706b943', 168 168 'rsrc/externals/font/fontawesome/fontawesome-webfont.eot' => 'b676fe4f', 169 169 'rsrc/externals/font/fontawesome/fontawesome-webfont.ttf' => 'af66fc5c', ··· 200 200 'rsrc/externals/javelin/ext/view/__tests__/ViewInterpreter.js' => '7a94d6a5', 201 201 'rsrc/externals/javelin/ext/view/__tests__/ViewRenderer.js' => '5426001c', 202 202 'rsrc/externals/javelin/lib/Cookie.js' => '6b3dcf44', 203 - 'rsrc/externals/javelin/lib/DOM.js' => '32a4d380', 203 + 'rsrc/externals/javelin/lib/DOM.js' => '07d99a3d', 204 204 'rsrc/externals/javelin/lib/History.js' => 'c60f4327', 205 205 'rsrc/externals/javelin/lib/JSON.js' => '08e56a4e', 206 206 'rsrc/externals/javelin/lib/Mask.js' => 'b9f26029', ··· 333 333 'rsrc/image/sprite-payments.png' => 'd8576309', 334 334 'rsrc/image/sprite-projects-X2.png' => '218fdc8b', 335 335 'rsrc/image/sprite-projects.png' => '631ff9a7', 336 - 'rsrc/image/sprite-status-X2.png' => '82445ee0', 337 - 'rsrc/image/sprite-status.png' => '926a896a', 336 + 'rsrc/image/sprite-status-X2.png' => '6cb4b401', 337 + 'rsrc/image/sprite-status.png' => '97eb1562', 338 338 'rsrc/image/sprite-tokens-X2.png' => 'b4776580', 339 339 'rsrc/image/sprite-tokens.png' => '25b75533', 340 340 'rsrc/image/texture/card-gradient.png' => '815f26e8', ··· 354 354 'rsrc/js/application/config/behavior-reorder-fields.js' => '938aed89', 355 355 'rsrc/js/application/conpherence/behavior-menu.js' => '7ee23816', 356 356 'rsrc/js/application/conpherence/behavior-pontificate.js' => '53f6f2dd', 357 - 'rsrc/js/application/conpherence/behavior-widget-pane.js' => 'd8ef8659', 357 + 'rsrc/js/application/conpherence/behavior-widget-pane.js' => '40b1ff90', 358 358 'rsrc/js/application/countdown/timer.js' => '889c96f3', 359 359 'rsrc/js/application/dashboard/behavior-dashboard-async-panel.js' => '4398eabb', 360 360 'rsrc/js/application/differential/DifferentialInlineCommentEditor.js' => 'f2441746', ··· 362 362 'rsrc/js/application/differential/behavior-comment-jump.js' => '71755c79', 363 363 'rsrc/js/application/differential/behavior-comment-preview.js' => '127f2018', 364 364 'rsrc/js/application/differential/behavior-diff-radios.js' => 'e1ff79b1', 365 - 'rsrc/js/application/differential/behavior-dropdown-menus.js' => '5f004630', 365 + 'rsrc/js/application/differential/behavior-dropdown-menus.js' => '7f93ef26', 366 366 'rsrc/js/application/differential/behavior-edit-inline-comments.js' => '00861799', 367 367 'rsrc/js/application/differential/behavior-keyboard-nav.js' => '173ce7e7', 368 368 'rsrc/js/application/differential/behavior-populate.js' => 'ce0c217a', ··· 402 402 'rsrc/js/application/phortune/behavior-stripe-payment-form.js' => '1693a296', 403 403 'rsrc/js/application/phortune/behavior-test-payment-form.js' => 'b3e5ee60', 404 404 'rsrc/js/application/phortune/phortune-credit-card-form.js' => '2290aeef', 405 - 'rsrc/js/application/policy/behavior-policy-control.js' => 'c01153ea', 405 + 'rsrc/js/application/policy/behavior-policy-control.js' => 'bc99b0f2', 406 406 'rsrc/js/application/policy/behavior-policy-rule-editor.js' => '263aeb8c', 407 407 'rsrc/js/application/ponder/behavior-votebox.js' => '327dbe61', 408 408 'rsrc/js/application/projects/behavior-project-boards.js' => 'd8e135db', ··· 414 414 'rsrc/js/application/search/behavior-reorder-queries.js' => '37871df4', 415 415 'rsrc/js/application/slowvote/behavior-slowvote-embed.js' => 'a51fdb2e', 416 416 'rsrc/js/application/transactions/behavior-transaction-comment-form.js' => '9084a36f', 417 - 'rsrc/js/application/transactions/behavior-transaction-list.js' => '925c9bab', 417 + 'rsrc/js/application/transactions/behavior-transaction-list.js' => 'cf656c84', 418 418 'rsrc/js/application/uiexample/JavelinViewExample.js' => 'd4a14807', 419 419 'rsrc/js/application/uiexample/ReactorButtonExample.js' => '44524435', 420 420 'rsrc/js/application/uiexample/ReactorCheckboxExample.js' => '7ba325ee', ··· 431 431 'rsrc/js/core/Busy.js' => '6453c869', 432 432 'rsrc/js/core/DragAndDropFileUpload.js' => 'ae6abfba', 433 433 'rsrc/js/core/DraggableList.js' => '1681c4d4', 434 - 'rsrc/js/core/DropdownMenu.js' => 'fb342e18', 435 - 'rsrc/js/core/DropdownMenuItem.js' => '0f386ef4', 436 434 'rsrc/js/core/FileUpload.js' => 'a4ae61bf', 437 435 'rsrc/js/core/Hovercard.js' => '4f344388', 438 436 'rsrc/js/core/KeyboardShortcut.js' => '1ae869f2', ··· 481 479 'rsrc/js/core/behavior-workflow.js' => 'fee00761', 482 480 'rsrc/js/core/phtize.js' => 'd254d646', 483 481 'rsrc/js/phui/behavior-phui-object-box-tabs.js' => 'a3e2244e', 482 + 'rsrc/js/phui/behavior-phui-timeline-dropdown-menu.js' => '4d94d9c3', 483 + 'rsrc/js/phuix/PHUIXActionListView.js' => 'b5c256b8', 484 + 'rsrc/js/phuix/PHUIXActionView.js' => '19a0b148', 485 + 'rsrc/js/phuix/PHUIXDropdownMenu.js' => 'bd4c8dca', 484 486 'rsrc/swf/aphlict.swf' => 'abac967d', 485 487 ), 486 488 'symbols' => ··· 506 508 'conpherence-message-pane-css' => 'e46b612c', 507 509 'conpherence-notification-css' => '403cf598', 508 510 'conpherence-update-css' => '1099a660', 509 - 'conpherence-widget-pane-css' => '87b12e0c', 511 + 'conpherence-widget-pane-css' => 'bf275a6c', 510 512 'differential-changeset-view-css' => '1570a1ff', 511 513 'differential-core-view-css' => '7ac3cabc', 512 514 'differential-inline-comment-editor' => 'f2441746', ··· 544 546 'javelin-behavior-config-reorder-fields' => '938aed89', 545 547 'javelin-behavior-conpherence-menu' => '7ee23816', 546 548 'javelin-behavior-conpherence-pontificate' => '53f6f2dd', 547 - 'javelin-behavior-conpherence-widget-pane' => 'd8ef8659', 549 + 'javelin-behavior-conpherence-widget-pane' => '40b1ff90', 548 550 'javelin-behavior-countdown-timer' => '889c96f3', 549 551 'javelin-behavior-dark-console' => 'e9fdb5e5', 550 552 'javelin-behavior-dashboard-async-panel' => '4398eabb', ··· 552 554 'javelin-behavior-differential-add-reviewers-and-ccs' => '533a187b', 553 555 'javelin-behavior-differential-comment-jump' => '71755c79', 554 556 'javelin-behavior-differential-diff-radios' => 'e1ff79b1', 555 - 'javelin-behavior-differential-dropdown-menus' => '5f004630', 557 + 'javelin-behavior-differential-dropdown-menus' => '7f93ef26', 556 558 'javelin-behavior-differential-edit-inline-comments' => '00861799', 557 559 'javelin-behavior-differential-feedback-preview' => '127f2018', 558 560 'javelin-behavior-differential-keyboard-navigation' => '173ce7e7', ··· 609 611 'javelin-behavior-phabricator-show-all-transactions' => '7c273581', 610 612 'javelin-behavior-phabricator-tooltips' => '48db4145', 611 613 'javelin-behavior-phabricator-transaction-comment-form' => '9084a36f', 612 - 'javelin-behavior-phabricator-transaction-list' => '925c9bab', 614 + 'javelin-behavior-phabricator-transaction-list' => 'cf656c84', 613 615 'javelin-behavior-phabricator-watch-anchor' => '06e05112', 614 616 'javelin-behavior-phame-post-preview' => '61d927ec', 615 617 'javelin-behavior-pholio-mock-edit' => '1e1e8bb0', 616 618 'javelin-behavior-pholio-mock-view' => '28497740', 617 619 'javelin-behavior-phui-object-box-tabs' => 'a3e2244e', 618 - 'javelin-behavior-policy-control' => 'c01153ea', 620 + 'javelin-behavior-phui-timeline-dropdown-menu' => '4d94d9c3', 621 + 'javelin-behavior-policy-control' => 'bc99b0f2', 619 622 'javelin-behavior-policy-rule-editor' => '263aeb8c', 620 623 'javelin-behavior-ponder-votebox' => '327dbe61', 621 624 'javelin-behavior-project-boards' => 'd8e135db', ··· 636 639 'javelin-behavior-workflow' => 'fee00761', 637 640 'javelin-color' => '7e41274a', 638 641 'javelin-cookie' => '6b3dcf44', 639 - 'javelin-dom' => '32a4d380', 642 + 'javelin-dom' => '07d99a3d', 640 643 'javelin-dynval' => 'f6555212', 641 644 'javelin-event' => '79473b62', 642 645 'javelin-fx' => '54b612ba', ··· 681 684 'path-typeahead' => 'f7fc67ec', 682 685 'people-profile-css' => 'ba7b2762', 683 686 'phabricator-action-header-view-css' => 'c14dfc57', 684 - 'phabricator-action-list-view-css' => '81383e25', 687 + 'phabricator-action-list-view-css' => '6f7ef696', 685 688 'phabricator-application-launch-view-css' => 'd290ba21', 686 689 'phabricator-busy' => '6453c869', 687 690 'phabricator-chatlog-css' => '852140ff', 688 691 'phabricator-content-source-view-css' => '4b8b05d4', 689 - 'phabricator-core-css' => '7dff07c3', 692 + 'phabricator-core-css' => 'ef1b7892', 690 693 'phabricator-countdown-css' => '86b7b0a0', 691 694 'phabricator-crumbs-view-css' => '0222cbe0', 692 695 'phabricator-drag-and-drop-file-upload' => 'ae6abfba', 693 696 'phabricator-draggable-list' => '1681c4d4', 694 - 'phabricator-dropdown-menu' => 'fb342e18', 695 697 'phabricator-fatal-config-template-css' => '25d446d6', 696 698 'phabricator-feed-css' => '0d17c209', 697 699 'phabricator-file-upload' => 'a4ae61bf', ··· 703 705 'phabricator-keyboard-shortcut' => '1ae869f2', 704 706 'phabricator-keyboard-shortcut-manager' => 'ad7a69ca', 705 707 'phabricator-main-menu-view' => '0a599177', 706 - 'phabricator-menu-item' => '0f386ef4', 707 708 'phabricator-nav-view-css' => '80e60fc1', 708 709 'phabricator-notification' => '0c6946e7', 709 710 'phabricator-notification-css' => 'ef2c9b34', ··· 713 714 'phabricator-prefab' => '0326e5d0', 714 715 'phabricator-profile-css' => '33e6f703', 715 716 'phabricator-project-tag-css' => '095c9404', 716 - 'phabricator-remarkup-css' => '0ec9ea61', 717 + 'phabricator-remarkup-css' => '80c3a48c', 717 718 'phabricator-search-results-css' => 'f240504c', 718 719 'phabricator-settings-css' => 'ea8f5915', 719 720 'phabricator-shaped-request' => 'dfa181a4', ··· 735 736 'phabricator-uiexample-reactor-select' => '189e4fe3', 736 737 'phabricator-uiexample-reactor-sendclass' => 'bf97561d', 737 738 'phabricator-uiexample-reactor-sendproperties' => '551add57', 738 - 'phabricator-zindex-css' => '7e4989ed', 739 + 'phabricator-zindex-css' => 'efb673ac', 739 740 'phame-css' => '19ecc703', 740 741 'pholio-css' => '2fa97dbe', 741 742 'pholio-edit-css' => 'b9e59b6d', ··· 745 746 'phrequent-css' => 'ffc185ad', 746 747 'phriction-document-css' => '7d7f0071', 747 748 'phui-box-css' => '7b3a2eed', 748 - 'phui-button-css' => '653ac588', 749 + 'phui-button-css' => '3dbdbf0d', 749 750 'phui-calendar-css' => '5e1ad989', 750 751 'phui-calendar-day-css' => 'de035c8a', 751 752 'phui-calendar-list-css' => 'c1d0ca59', ··· 769 770 'phui-status-list-view-css' => '2f562399', 770 771 'phui-tag-view-css' => '295d81c4', 771 772 'phui-text-css' => '23e9b4b7', 772 - 'phui-timeline-view-css' => '4a39d766', 773 + 'phui-timeline-view-css' => '15ff2a9f', 773 774 'phui-workboard-view-css' => '84f2c272', 774 775 'phui-workpanel-view-css' => '97b69459', 776 + 'phuix-action-list-view' => 'b5c256b8', 777 + 'phuix-action-view' => '19a0b148', 778 + 'phuix-dropdown-menu' => 'bd4c8dca', 775 779 'policy-css' => '957ea14c', 776 780 'policy-edit-css' => '05cca26a', 777 781 'policy-transaction-detail-css' => '82100a43', ··· 802 806 'sprite-minicons-css' => 'df4f76fe', 803 807 'sprite-payments-css' => 'cc085d44', 804 808 'sprite-projects-css' => '7578fa56', 805 - 'sprite-status-css' => '8bce1c97', 809 + 'sprite-status-css' => '25d7f92f', 806 810 'sprite-tokens-css' => '1706b943', 807 811 'subscribers-list-css' => '5bb30c78', 808 812 'syntax-highlighting-css' => '3c18c1cb', ··· 863 867 2 => 'javelin-dom', 864 868 3 => 'javelin-vector', 865 869 ), 870 + '07d99a3d' => 871 + array( 872 + 0 => 'javelin-magical-init', 873 + 1 => 'javelin-install', 874 + 2 => 'javelin-util', 875 + 3 => 'javelin-vector', 876 + 4 => 'javelin-stratcom', 877 + ), 866 878 '08e56a4e' => 867 879 array( 868 880 0 => 'javelin-install', ··· 886 898 0 => 'javelin-behavior', 887 899 1 => 'javelin-stratcom', 888 900 2 => 'javelin-dom', 889 - ), 890 - '0f386ef4' => 891 - array( 892 - 0 => 'javelin-install', 893 - 1 => 'javelin-dom', 894 901 ), 895 902 '0f764c35' => 896 903 array( ··· 934 941 1 => 'javelin-dom', 935 942 2 => 'javelin-reactor-dom', 936 943 ), 944 + '19a0b148' => 945 + array( 946 + 0 => 'javelin-install', 947 + 1 => 'javelin-dom', 948 + 2 => 'javelin-util', 949 + ), 937 950 '1ae869f2' => 938 951 array( 939 952 0 => 'javelin-install', ··· 1031 1044 3 => 'javelin-stratcom', 1032 1045 4 => 'javelin-request', 1033 1046 ), 1034 - '32a4d380' => 1035 - array( 1036 - 0 => 'javelin-magical-init', 1037 - 1 => 'javelin-install', 1038 - 2 => 'javelin-util', 1039 - 3 => 'javelin-vector', 1040 - 4 => 'javelin-stratcom', 1041 - ), 1042 1047 '356de121' => 1043 1048 array( 1044 1049 0 => 'javelin-util', ··· 1075 1080 1 => 'javelin-dom', 1076 1081 2 => 'phortune-credit-card-form', 1077 1082 ), 1083 + '40b1ff90' => 1084 + array( 1085 + 0 => 'javelin-behavior', 1086 + 1 => 'javelin-dom', 1087 + 2 => 'javelin-stratcom', 1088 + 3 => 'javelin-workflow', 1089 + 4 => 'javelin-util', 1090 + 5 => 'phabricator-notification', 1091 + 6 => 'javelin-behavior-device', 1092 + 7 => 'phuix-dropdown-menu', 1093 + 8 => 'phuix-action-list-view', 1094 + 9 => 'phuix-action-view', 1095 + ), 1078 1096 '4398eabb' => 1079 1097 array( 1080 1098 0 => 'javelin-behavior', ··· 1114 1132 1 => 'javelin-dom', 1115 1133 2 => 'phabricator-drag-and-drop-file-upload', 1116 1134 3 => 'phabricator-textareautils', 1135 + ), 1136 + '4d94d9c3' => 1137 + array( 1138 + 0 => 'javelin-behavior', 1139 + 1 => 'javelin-stratcom', 1140 + 2 => 'javelin-dom', 1141 + 3 => 'phuix-dropdown-menu', 1117 1142 ), 1118 1143 '4e37e4de' => 1119 1144 array( ··· 1187 1212 3 => 'javelin-stratcom', 1188 1213 4 => 'javelin-vector', 1189 1214 ), 1190 - '5f004630' => 1191 - array( 1192 - 0 => 'javelin-behavior', 1193 - 1 => 'javelin-dom', 1194 - 2 => 'javelin-util', 1195 - 3 => 'javelin-stratcom', 1196 - 4 => 'phabricator-dropdown-menu', 1197 - 5 => 'phabricator-menu-item', 1198 - 6 => 'phabricator-phtize', 1199 - ), 1200 1215 '5f850b5c' => 1201 1216 array( 1202 1217 0 => 'javelin-install', ··· 1207 1222 1 => 'javelin-dom', 1208 1223 2 => 'javelin-util', 1209 1224 3 => 'phabricator-shaped-request', 1225 + ), 1226 + '62e18640' => 1227 + array( 1228 + 0 => 'javelin-install', 1229 + 1 => 'javelin-util', 1230 + 2 => 'javelin-dom', 1231 + 3 => 'javelin-typeahead-normalizer', 1210 1232 ), 1211 1233 '6453c869' => 1212 1234 array( ··· 1241 1263 0 => 'javelin-behavior', 1242 1264 1 => 'javelin-dom', 1243 1265 ), 1244 - '62e18640' => 1245 - array( 1246 - 0 => 'javelin-install', 1247 - 1 => 'javelin-util', 1248 - 2 => 'javelin-dom', 1249 - 3 => 'javelin-typeahead-normalizer', 1250 - ), 1251 1266 '75903ee1' => 1252 1267 array( 1253 1268 0 => 'javelin-behavior', ··· 1312 1327 array( 1313 1328 0 => 'javelin-behavior', 1314 1329 1 => 'javelin-history', 1330 + ), 1331 + '7f93ef26' => 1332 + array( 1333 + 0 => 'javelin-behavior', 1334 + 1 => 'javelin-dom', 1335 + 2 => 'javelin-util', 1336 + 3 => 'javelin-stratcom', 1337 + 4 => 'phuix-dropdown-menu', 1338 + 5 => 'phuix-action-list-view', 1339 + 6 => 'phuix-action-view', 1340 + 7 => 'phabricator-phtize', 1315 1341 ), 1316 1342 '82f568cd' => 1317 1343 array( ··· 1402 1428 4 => 'javelin-request', 1403 1429 5 => 'phabricator-shaped-request', 1404 1430 ), 1405 - '925c9bab' => 1406 - array( 1407 - 0 => 'javelin-behavior', 1408 - 1 => 'javelin-stratcom', 1409 - 2 => 'javelin-workflow', 1410 - 3 => 'javelin-dom', 1411 - 4 => 'javelin-fx', 1412 - 5 => 'javelin-util', 1413 - ), 1414 1431 '938aed89' => 1415 1432 array( 1416 1433 0 => 'javelin-behavior', ··· 1567 1584 6 => 'javelin-request', 1568 1585 7 => 'javelin-util', 1569 1586 ), 1587 + 'b5c256b8' => 1588 + array( 1589 + 0 => 'javelin-install', 1590 + 1 => 'javelin-dom', 1591 + ), 1570 1592 'b657bdf8' => 1571 1593 array( 1572 1594 0 => 'javelin-behavior', ··· 1601 1623 2 => 'javelin-dom', 1602 1624 3 => 'javelin-history', 1603 1625 ), 1626 + 'bc99b0f2' => 1627 + array( 1628 + 0 => 'javelin-behavior', 1629 + 1 => 'javelin-dom', 1630 + 2 => 'javelin-util', 1631 + 3 => 'phuix-dropdown-menu', 1632 + 4 => 'phuix-action-list-view', 1633 + 5 => 'phuix-action-view', 1634 + 6 => 'javelin-workflow', 1635 + ), 1636 + 'bd4c8dca' => 1637 + array( 1638 + 0 => 'javelin-install', 1639 + 1 => 'javelin-util', 1640 + 2 => 'javelin-dom', 1641 + 3 => 'javelin-vector', 1642 + 4 => 'javelin-stratcom', 1643 + ), 1604 1644 'bdaf4d04' => 1605 1645 array( 1606 1646 0 => 'javelin-behavior', ··· 1620 1660 0 => 'javelin-install', 1621 1661 1 => 'javelin-dom', 1622 1662 2 => 'javelin-reactor-dom', 1623 - ), 1624 - 'c01153ea' => 1625 - array( 1626 - 0 => 'javelin-behavior', 1627 - 1 => 'javelin-dom', 1628 - 2 => 'javelin-util', 1629 - 3 => 'phabricator-dropdown-menu', 1630 - 4 => 'phabricator-menu-item', 1631 - 5 => 'javelin-workflow', 1632 1663 ), 1633 1664 'c021950a' => 1634 1665 array( ··· 1724 1755 6 => 'javelin-vector', 1725 1756 7 => 'phabricator-tooltip', 1726 1757 ), 1758 + 'cf656c84' => 1759 + array( 1760 + 0 => 'javelin-behavior', 1761 + 1 => 'javelin-stratcom', 1762 + 2 => 'javelin-workflow', 1763 + 3 => 'javelin-dom', 1764 + 4 => 'javelin-fx', 1765 + 5 => 'javelin-uri', 1766 + 6 => 'phabricator-textareautils', 1767 + ), 1727 1768 'cf76cfd5' => 1728 1769 array( 1729 1770 0 => 'javelin-behavior', ··· 1787 1828 4 => 'javelin-workflow', 1788 1829 5 => 'phabricator-draggable-list', 1789 1830 ), 1790 - 'd8ef8659' => 1791 - array( 1792 - 0 => 'javelin-behavior', 1793 - 1 => 'javelin-dom', 1794 - 2 => 'javelin-stratcom', 1795 - 3 => 'javelin-workflow', 1796 - 4 => 'javelin-util', 1797 - 5 => 'phabricator-notification', 1798 - 6 => 'javelin-behavior-device', 1799 - 7 => 'phabricator-dropdown-menu', 1800 - 8 => 'phabricator-menu-item', 1801 - ), 1802 1831 'd9a9b862' => 1803 1832 array( 1804 1833 0 => 'javelin-install', ··· 1935 1964 4 => 'javelin-stratcom', 1936 1965 5 => 'phabricator-shaped-request', 1937 1966 ), 1938 - 'fb342e18' => 1939 - array( 1940 - 0 => 'javelin-install', 1941 - 1 => 'javelin-util', 1942 - 2 => 'javelin-dom', 1943 - 3 => 'javelin-vector', 1944 - 4 => 'javelin-stratcom', 1945 - 5 => 'phabricator-menu-item', 1946 - ), 1947 1967 'fbbce3bf' => 1948 1968 array( 1949 1969 0 => 'phabricator-busy', ··· 2084 2104 6 => 'javelin-behavior-refresh-csrf', 2085 2105 7 => 'javelin-behavior-phabricator-watch-anchor', 2086 2106 8 => 'javelin-behavior-phabricator-autofocus', 2087 - 9 => 'phabricator-menu-item', 2088 - 10 => 'phabricator-dropdown-menu', 2089 - 11 => 'phabricator-phtize', 2090 - 12 => 'javelin-behavior-phabricator-oncopy', 2091 - 13 => 'phabricator-tooltip', 2092 - 14 => 'javelin-behavior-phabricator-tooltips', 2093 - 15 => 'phabricator-prefab', 2094 - 16 => 'javelin-behavior-device', 2095 - 17 => 'javelin-behavior-toggle-class', 2096 - 18 => 'javelin-behavior-lightbox-attachments', 2097 - 19 => 'phabricator-busy', 2098 - 20 => 'javelin-aphlict', 2099 - 21 => 'phabricator-notification', 2100 - 22 => 'javelin-behavior-aphlict-listen', 2101 - 23 => 'javelin-behavior-phabricator-search-typeahead', 2102 - 24 => 'javelin-behavior-konami', 2103 - 25 => 'javelin-behavior-aphlict-dropdown', 2104 - 26 => 'javelin-behavior-history-install', 2105 - 27 => 'javelin-behavior-phabricator-gesture', 2106 - 28 => 'javelin-behavior-phabricator-active-nav', 2107 - 29 => 'javelin-behavior-phabricator-nav', 2108 - 30 => 'javelin-behavior-phabricator-remarkup-assist', 2109 - 31 => 'phabricator-textareautils', 2110 - 32 => 'phabricator-file-upload', 2111 - 33 => 'javelin-behavior-global-drag-and-drop', 2112 - 34 => 'javelin-behavior-phabricator-reveal-content', 2113 - 35 => 'phabricator-hovercard', 2114 - 36 => 'javelin-behavior-phabricator-hovercards', 2115 - 37 => 'javelin-color', 2116 - 38 => 'javelin-fx', 2107 + 9 => 'phuix-dropdown-menu', 2108 + 10 => 'phuix-action-list-view', 2109 + 11 => 'phuix-action-view', 2110 + 12 => 'phabricator-phtize', 2111 + 13 => 'javelin-behavior-phabricator-oncopy', 2112 + 14 => 'phabricator-tooltip', 2113 + 15 => 'javelin-behavior-phabricator-tooltips', 2114 + 16 => 'phabricator-prefab', 2115 + 17 => 'javelin-behavior-device', 2116 + 18 => 'javelin-behavior-toggle-class', 2117 + 19 => 'javelin-behavior-lightbox-attachments', 2118 + 20 => 'phabricator-busy', 2119 + 21 => 'javelin-aphlict', 2120 + 22 => 'phabricator-notification', 2121 + 23 => 'javelin-behavior-aphlict-listen', 2122 + 24 => 'javelin-behavior-phabricator-search-typeahead', 2123 + 25 => 'javelin-behavior-konami', 2124 + 26 => 'javelin-behavior-aphlict-dropdown', 2125 + 27 => 'javelin-behavior-history-install', 2126 + 28 => 'javelin-behavior-phabricator-gesture', 2127 + 29 => 'javelin-behavior-phabricator-active-nav', 2128 + 30 => 'javelin-behavior-phabricator-nav', 2129 + 31 => 'javelin-behavior-phabricator-remarkup-assist', 2130 + 32 => 'phabricator-textareautils', 2131 + 33 => 'phabricator-file-upload', 2132 + 34 => 'javelin-behavior-global-drag-and-drop', 2133 + 35 => 'javelin-behavior-phabricator-reveal-content', 2134 + 36 => 'phabricator-hovercard', 2135 + 37 => 'javelin-behavior-phabricator-hovercards', 2136 + 38 => 'javelin-color', 2137 + 39 => 'javelin-fx', 2117 2138 ), 2118 2139 'darkconsole.pkg.js' => 2119 2140 array(
+1 -4
src/applications/transactions/controller/PhabricatorApplicationTransactionCommentEditController.php
··· 54 54 ->applyEdit($xaction, $comment); 55 55 56 56 if ($request->isAjax()) { 57 - return id(new PhabricatorApplicationTransactionResponse()) 58 - ->setViewer($user) 59 - ->setTransactions(array($xaction)) 60 - ->setAnchorOffset($request->getStr('anchor')); 57 + return id(new AphrontAjaxResponse())->setContent(array()); 61 58 } else { 62 59 return id(new AphrontReloadResponse())->setURI($obj_handle->getURI()); 63 60 }
+1 -4
src/applications/transactions/controller/PhabricatorApplicationTransactionCommentRemoveController.php
··· 47 47 ->applyEdit($xaction, $comment); 48 48 49 49 if ($request->isAjax()) { 50 - return id(new PhabricatorApplicationTransactionResponse()) 51 - ->setViewer($viewer) 52 - ->setTransactions(array($xaction)) 53 - ->setAnchorOffset($request->getStr('anchor')); 50 + return id(new AphrontAjaxResponse())->setContent(array()); 54 51 } else { 55 52 return id(new AphrontReloadResponse())->setURI($obj_handle->getURI()); 56 53 }
-3
src/applications/transactions/view/PhabricatorApplicationTransactionView.php
··· 169 169 'listID' => $list_id, 170 170 'objectPHID' => $this->getObjectPHID(), 171 171 'nextAnchor' => $this->anchorOffset + count($events), 172 - 'historyLink' => '/transactions/history/', 173 - 'historyLinkText' => pht('Edited'), 174 - 'linkDelimiter' => PHUITimelineEventView::DELIMITER, 175 172 )); 176 173 } 177 174
+12
src/view/layout/PhabricatorActionView.php
··· 12 12 private $download; 13 13 private $objectURI; 14 14 private $sigils = array(); 15 + private $metadata; 16 + 17 + public function setMetadata($metadata) { 18 + $this->metadata = $metadata; 19 + return $this; 20 + } 21 + 22 + public function getMetadata() { 23 + return $this->metadata; 24 + } 15 25 16 26 public function setObjectURI($object_uri) { 17 27 $this->objectURI = $object_uri; ··· 138 148 'action' => $this->getHref(), 139 149 'method' => 'POST', 140 150 'sigil' => $sigils, 151 + 'meta' => $this->metadata, 141 152 ), 142 153 $item); 143 154 } else { ··· 147 158 'href' => $this->getHref(), 148 159 'class' => 'phabricator-action-view-item', 149 160 'sigil' => $sigils, 161 + 'meta' => $this->metadata, 150 162 ), 151 163 $this->name); 152 164 }
+132 -56
src/view/phui/PHUITimelineEventView.php
··· 163 163 return $this; 164 164 } 165 165 166 - protected function renderEventTitle($is_first_event, $force_icon) { 166 + protected function renderEventTitle($is_first_event, $force_icon, $has_menu) { 167 167 $title = $this->title; 168 168 if (($title === null) && !$this->hasChildren()) { 169 169 $title = ''; ··· 181 181 $extra = javelin_tag( 182 182 'span', 183 183 array( 184 - 'sigil' => 'timeline-extra', 185 184 'class' => 'phui-timeline-extra', 186 185 ), 187 186 phutil_implode_html( ··· 203 202 $icon = null; 204 203 if ($this->icon || $force_icon) { 205 204 $title_classes[] = 'phui-timeline-title-with-icon'; 205 + } 206 + 207 + if ($has_menu) { 208 + $title_classes[] = 'phui-timeline-title-with-menu'; 206 209 } 207 210 208 211 if ($this->icon) { ··· 260 263 $events = array_select_keys($events, $icon_keys) + $events; 261 264 $force_icon = (bool)$icon_keys; 262 265 266 + $menu = null; 267 + $items = array(); 268 + $has_menu = false; 269 + if (!$this->getIsPreview()) { 270 + foreach ($this->getEventGroup() as $event) { 271 + $items[] = $event->getMenuItems($this->anchor); 272 + if ($event->hasChildren()) { 273 + $has_menu = true; 274 + } 275 + } 276 + $items = array_mergev($items); 277 + } 278 + 279 + if ($items || $has_menu) { 280 + $icon = id(new PHUIIconView()) 281 + ->setIconFont('fa-cog'); 282 + $aural = javelin_tag( 283 + 'span', 284 + array( 285 + 'aural' => true, 286 + ), 287 + pht('Comment Actions')); 288 + 289 + if ($items) { 290 + $sigil = 'phui-timeline-menu'; 291 + Javelin::initBehavior('phui-timeline-dropdown-menu'); 292 + } else { 293 + $sigil = null; 294 + } 295 + 296 + $action_list = id(new PhabricatorActionListView()) 297 + ->setUser($this->getUser()); 298 + foreach ($items as $item) { 299 + $action_list->addAction($item); 300 + } 301 + 302 + $menu = javelin_tag( 303 + $items ? 'a' : 'span', 304 + array( 305 + 'href' => '#', 306 + 'class' => 'phui-timeline-menu', 307 + 'sigil' => $sigil, 308 + 'aria-haspopup' => 'true', 309 + 'aria-expanded' => 'false', 310 + 'meta' => array( 311 + 'items' => hsprintf('%s', $action_list), 312 + ), 313 + ), 314 + array( 315 + $aural, 316 + $icon, 317 + )); 318 + 319 + $has_menu = true; 320 + } 321 + 263 322 $group_titles = array(); 323 + $group_items = array(); 264 324 $group_children = array(); 265 325 $is_first_event = true; 266 326 foreach ($events as $event) { 267 - $group_titles[] = $event->renderEventTitle($is_first_event, $force_icon); 327 + $group_titles[] = $event->renderEventTitle( 328 + $is_first_event, 329 + $force_icon, 330 + $has_menu); 268 331 $is_first_event = false; 269 332 if ($event->hasChildren()) { 270 333 $group_children[] = $event->renderChildren(); ··· 303 366 ), 304 367 array( 305 368 $group_titles, 369 + $menu, 306 370 phutil_tag( 307 371 'div', 308 372 array( ··· 375 439 if ($this->getIsPreview()) { 376 440 $extra[] = pht('PREVIEW'); 377 441 } else { 378 - $xaction_phid = $this->getTransactionPHID(); 379 - 380 - if ($this->getQuoteTargetID()) { 381 - 382 - $ref = null; 383 - if ($this->getQuoteRef()) { 384 - $ref = $this->getQuoteRef(); 385 - if ($this->anchor) { 386 - $ref = $ref.'#'.$this->anchor; 387 - } 388 - } 389 - 390 - $extra[] = javelin_tag( 391 - 'a', 392 - array( 393 - 'href' => '#', 394 - 'sigil' => 'transaction-quote', 395 - 'mustcapture' => true, 396 - 'meta' => array( 397 - 'targetID' => $this->getQuoteTargetID(), 398 - 'uri' => '/transactions/quote/'.$xaction_phid.'/', 399 - 'ref' => $ref, 400 - ), 401 - ), 402 - pht('Quote')); 403 - } 404 442 405 443 if ($this->getIsEdited()) { 406 - $extra[] = javelin_tag( 407 - 'a', 408 - array( 409 - 'href' => '/transactions/history/'.$xaction_phid.'/', 410 - 'sigil' => 'workflow transaction-edit-history', 411 - ), 412 - pht('Edited')); 413 - } 414 - 415 - if ($this->getIsEditable()) { 416 - $extra[] = javelin_tag( 417 - 'a', 418 - array( 419 - 'href' => '/transactions/edit/'.$xaction_phid.'/', 420 - 'sigil' => 'workflow transaction-edit', 421 - ), 422 - pht('Edit')); 423 - } 424 - 425 - if ($this->getIsRemovable()) { 426 - $extra[] = javelin_tag( 427 - 'a', 428 - array( 429 - 'href' => '/transactions/remove/'.$xaction_phid.'/', 430 - 'sigil' => 'workflow transaction-remove', 431 - ), 432 - pht('Remove')); 444 + $extra[] = pht('Edited'); 433 445 } 434 446 435 447 if ($is_first_extra) { ··· 476 488 $extra[] = $date; 477 489 } 478 490 } 491 + 479 492 } 480 493 481 494 return $extra; 495 + } 496 + 497 + private function getMenuItems($anchor) { 498 + $xaction_phid = $this->getTransactionPHID(); 499 + 500 + $items = array(); 501 + if ($this->getQuoteTargetID()) { 502 + 503 + $ref = null; 504 + if ($this->getQuoteRef()) { 505 + $ref = $this->getQuoteRef(); 506 + if ($anchor) { 507 + $ref = $ref.'#'.$anchor; 508 + } 509 + } 510 + 511 + $items[] = id(new PhabricatorActionView()) 512 + ->setIcon('comment') 513 + ->setHref('#') 514 + ->setName(pht('Quote')) 515 + ->addSigil('transaction-quote') 516 + ->setMetadata( 517 + array( 518 + 'targetID' => $this->getQuoteTargetID(), 519 + 'uri' => '/transactions/quote/'.$xaction_phid.'/', 520 + 'ref' => $ref, 521 + )); 522 + } 523 + 524 + if ($this->getIsEditable()) { 525 + $items[] = id(new PhabricatorActionView()) 526 + ->setIcon('edit') 527 + ->setHref('/transactions/edit/'.$xaction_phid.'/') 528 + ->setName(pht('Edit Comment')) 529 + ->addSigil('transaction-edit') 530 + ->setMetadata( 531 + array( 532 + 'anchor' => $anchor, 533 + )); 534 + } 535 + 536 + if ($this->getIsRemovable()) { 537 + $items[] = id(new PhabricatorActionView()) 538 + ->setIcon('delete') 539 + ->setHref('/transactions/remove/'.$xaction_phid.'/') 540 + ->setName(pht('Remove Comment')) 541 + ->addSigil('transaction-remove') 542 + ->setMetadata( 543 + array( 544 + 'anchor' => $anchor, 545 + )); 546 + 547 + } 548 + 549 + if ($this->getIsEdited()) { 550 + $items[] = id(new PhabricatorActionView()) 551 + ->setIcon('transcript') 552 + ->setHref('/transactions/history/'.$xaction_phid.'/') 553 + ->setName(pht('View Edit History')) 554 + ->setWorkflow(true); 555 + } 556 + 557 + return $items; 482 558 } 483 559 484 560 }
+10
webroot/rsrc/css/core/core.css
··· 127 127 .aural-only { 128 128 position: absolute !important; 129 129 clip: rect(1px, 1px, 1px, 1px); 130 + 131 + /* NOTE: Without this, Safari sometimes lays these elements out at normal 132 + size. An example is the label on the comment action menu on timelines. */ 133 + 134 + width: 0; 135 + height: 0; 136 + overflow: hidden; 130 137 } 131 138 132 139 .visual-only { ··· 135 142 136 143 .audible .aural-only { 137 144 clip: auto; 145 + width: auto; 146 + height: auto; 147 + overflow: auto; 138 148 background: #006699; 139 149 color: #ffffff; 140 150 }
+8 -2
webroot/rsrc/css/phui/phui-button.css
··· 98 98 button.grey:active, 99 99 a.grey:active, 100 100 button.grey_active, 101 - a.button.dropdown-open { 101 + a.button.phuix-dropdown-open { 102 102 background-color: #7d7d7d; 103 103 box-shadow: inset 0 0 4px rgba(0,0,0,.2); 104 104 } 105 105 106 - a.dropdown-open { 106 + a.phuix-dropdown-open { 107 107 color: {$greytext}; 108 108 } 109 109 ··· 175 175 box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.3); 176 176 border: 1px solid {$lightgreyborder}; 177 177 border-bottom-color: {$greyborder}; 178 + } 179 + 180 + .phuix-dropdown-menu a:focus { 181 + /* We automatically focus links in dropdown menus for assistive devices, but 182 + this is distracting for visual user agents. */ 183 + outline: none; 178 184 } 179 185 180 186 a.policy-control {
+49
webroot/rsrc/css/phui/phui-timeline-view.css
··· 125 125 padding-left: 38px; 126 126 } 127 127 128 + .phui-timeline-title-with-menu { 129 + padding-right: 36px; 130 + } 131 + 128 132 .phui-timeline-view .phui-icon-view.phui-timeline-token { 129 133 vertical-align: middle; 130 134 margin-right: 4px; ··· 316 320 font-weight: normal; 317 321 color: {$bluetext}; 318 322 } 323 + 324 + .phui-timeline-comment-actions .phui-icon-view { 325 + width: 16px; 326 + height: 16px; 327 + font-size: 16px; 328 + text-align: center; 329 + overflow: hidden; 330 + } 331 + 332 + .phui-timeline-menu { 333 + position: absolute; 334 + right: 3px; 335 + top: 4px; 336 + width: 28px; 337 + height: 22px; 338 + text-align: center; 339 + line-height: 22px; 340 + font-size: 15px; 341 + border-left: 1px solid {$lightblueborder}; 342 + } 343 + 344 + .phui-timeline-menu:focus { 345 + outline: none; 346 + } 347 + 348 + .phui-timeline-menu .phui-icon-view { 349 + color: {$lightgreytext}; 350 + } 351 + 352 + a.phui-timeline-menu .phui-icon-view { 353 + color: {$bluetext}; 354 + } 355 + 356 + .device-desktop a.phui-timeline-menu:hover .phui-icon-view { 357 + color: {$darkgreytext}; 358 + } 359 + 360 + .phui-timeline-menu.phuix-dropdown-open { 361 + background: {$blue}; 362 + } 363 + 364 + .phui-timeline-menu.phuix-dropdown-open .phui-icon-view, 365 + .device-desktop a.phuix-dropdown-open:hover .phui-icon-view { 366 + color: #ffffff; 367 + }
+19 -46
webroot/rsrc/js/application/transactions/behavior-transaction-list.js
··· 5 5 * javelin-workflow 6 6 * javelin-dom 7 7 * javelin-fx 8 - * javelin-util 8 + * javelin-uri 9 9 * phabricator-textareautils 10 10 */ 11 11 ··· 64 64 } 65 65 } 66 66 67 - function edittransaction(transaction, response) { 68 - // NOTE: this is for 1 transaction only 69 - for (var phid in response.xactions) { 70 - var new_node = JX.$H(response.xactions[phid]).getFragment().firstChild; 71 - var new_comment = JX.DOM.find(new_node, 'span', 'transaction-comment'); 72 - var old_comments = JX.DOM.scry( 73 - transaction, 74 - 'span', 75 - 'transaction-comment'); 76 - var old_comment = old_comments[0]; 77 - JX.DOM.replace(old_comment, new_comment); 78 - var edit_history = JX.DOM.scry( 79 - transaction, 80 - 'a', 81 - 'transaction-edit-history'); 82 - if (!edit_history.length) { 83 - var transaction_phid = JX.Stratcom.getData(new_comment).phid; 84 - var history_link = JX.$N( 85 - 'a', 86 - { sigil : 'transaction-edit-history', 87 - href : config.historyLink + transaction_phid + '/' }, 88 - config.historyLinkText); 89 - JX.Stratcom.addSigil(history_link, 'workflow'); 90 - var timeline_extra = JX.DOM.find(transaction, 'span', 'timeline-extra'); 91 - var old_content = JX.$H(timeline_extra.innerHTML); 92 - JX.DOM.setContent( 93 - timeline_extra, 94 - [history_link, config.linkDelimiter, old_content]); 95 - } 96 - new JX.FX(transaction).setDuration(500).start({opacity: [0, 1]}); 97 - } 98 - } 99 - 100 - JX.DOM.listen( 101 - list, 67 + JX.Stratcom.listen( 102 68 'click', 103 - ['transaction-edit', 'transaction-remove'], 69 + [['transaction-edit'], ['transaction-remove']], 104 70 function(e) { 105 71 if (!e.isNormalClick()) { 106 72 return; 107 73 } 108 74 109 - var transaction = e.getNode('transaction'); 75 + e.prevent(); 110 76 111 - JX.Workflow.newFromLink(e.getTarget()) 112 - .setData({anchor: e.getNodeData('transaction').anchor}) 113 - .setHandler(JX.bind(null, edittransaction, transaction)) 114 - .start(); 77 + var anchor = e.getNodeData('tag:a').anchor; 78 + var uri = JX.$U(window.location).setFragment(anchor); 115 79 116 - e.kill(); 80 + JX.Workflow.newFromLink(e.getNode('tag:a')) 81 + .setHandler(function() { 82 + // In most cases, `uri` is on the same page (just at a new anchor), 83 + // so we have to call reload() explicitly to get the browser to 84 + // refresh the page. It would be nice to just issue a server-side 85 + // redirect instead, but there isn't currently an easy way to do 86 + // that without complexity and/or a semi-open redirect. 87 + uri.go(); 88 + window.location.reload(); 89 + }) 90 + .start(); 117 91 }); 118 92 119 - JX.DOM.listen( 120 - list, 93 + JX.Stratcom.listen( 121 94 'click', 122 95 'transaction-quote', 123 96 function(e) { 124 - e.kill(); 97 + e.prevent(); 125 98 126 99 var data = e.getNodeData('transaction-quote'); 127 100 new JX.Workflow(data.uri)
+34
webroot/rsrc/js/phui/behavior-phui-timeline-dropdown-menu.js
··· 1 + /** 2 + * @provides javelin-behavior-phui-timeline-dropdown-menu 3 + * @requires javelin-behavior 4 + * javelin-stratcom 5 + * javelin-dom 6 + * phuix-dropdown-menu 7 + */ 8 + 9 + JX.behavior('phui-timeline-dropdown-menu', function() { 10 + 11 + JX.Stratcom.listen('click', 'phui-timeline-menu', function(e) { 12 + var data = e.getNodeData('phui-timeline-menu'); 13 + if (data.menu) { 14 + return; 15 + } 16 + 17 + e.kill(); 18 + 19 + var list = JX.$H(data.items).getFragment().firstChild; 20 + 21 + var icon = e.getNode('phui-timeline-menu'); 22 + data.menu = new JX.PHUIXDropdownMenu(icon); 23 + data.menu.setContent(list); 24 + data.menu.open(); 25 + 26 + JX.DOM.listen(list, 'click', 'tag:a', function(e) { 27 + if (!e.isNormalClick()) { 28 + return; 29 + } 30 + data.menu.close(); 31 + }); 32 + }); 33 + 34 + });
+28 -3
webroot/rsrc/js/phuix/PHUIXDropdownMenu.js
··· 38 38 JX.bind(this, this._adjustposition)); 39 39 40 40 JX.Stratcom.listen('phuix.dropdown.open', null, JX.bind(this, this.close)); 41 + 42 + JX.Stratcom.listen('keydown', null, JX.bind(this, this._onkey)); 41 43 }, 42 44 43 45 events: ['open'], ··· 93 95 94 96 var menu = JX.$N('div', attrs); 95 97 96 - this._node.setAttribute('aria-haspopup', 'true'); 97 - this._node.setAttribute('aria-expanded', 'false'); 98 - 99 98 this._menu = menu; 100 99 } 101 100 ··· 143 142 JX.DOM.alterClass(this._node, 'phuix-dropdown-open', true); 144 143 145 144 this._node.setAttribute('aria-expanded', 'true'); 145 + 146 + // Try to highlight the first link in the menu for assistive technologies. 147 + var links = JX.DOM.scry(this._menu, 'a'); 148 + if (links[0]) { 149 + JX.DOM.focus(links[0]); 150 + } 146 151 }, 147 152 148 153 _hide : function() { ··· 176 181 v = v.add(this.getOffsetX(), this.getOffsetY()); 177 182 178 183 v.setPos(this._menu); 184 + }, 185 + 186 + _onkey: function(e) { 187 + // When the user presses escape with a menu open, close the menu and 188 + // refocus the button which activates the menu. In particular, this makes 189 + // popups more usable with assistive technologies. 190 + 191 + if (!this._open) { 192 + return; 193 + } 194 + 195 + if (e.getSpecialKey() != 'esc') { 196 + return; 197 + } 198 + 199 + this.close(); 200 + JX.DOM.focus(this._node); 201 + 202 + e.prevent(); 179 203 } 204 + 180 205 } 181 206 });