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

Links on badge card should be accessible

Summary: Ref T10710

Test Plan: Open user profile with badge, flip badge card, open awarder link.

Reviewers: epriestley, chad, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: chad, Korvin

Maniphest Tasks: T10710

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

+67 -13
+17 -10
resources/celerity/map.php
··· 8 8 return array( 9 9 'names' => array( 10 10 'core.pkg.css' => 'ce06b6f6', 11 - 'core.pkg.js' => 'e526f428', 11 + 'core.pkg.js' => '37344f3c', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '7ba78475', 14 14 'differential.pkg.js' => 'd0cd0df6', ··· 121 121 'rsrc/css/phui/calendar/phui-calendar.css' => 'ccabe893', 122 122 'rsrc/css/phui/phui-action-list.css' => 'c5eba19d', 123 123 'rsrc/css/phui/phui-action-panel.css' => '91c7b835', 124 - 'rsrc/css/phui/phui-badge.css' => 'f25c3476', 124 + 'rsrc/css/phui/phui-badge.css' => '3baef8db', 125 125 'rsrc/css/phui/phui-big-info-view.css' => 'bd903741', 126 126 'rsrc/css/phui/phui-box.css' => 'd909ea3d', 127 127 'rsrc/css/phui/phui-button.css' => 'a64a8de6', ··· 472 472 'rsrc/js/core/behavior-active-nav.js' => 'e379b58e', 473 473 'rsrc/js/core/behavior-audio-source.js' => '59b251eb', 474 474 'rsrc/js/core/behavior-autofocus.js' => '7319e029', 475 + 'rsrc/js/core/behavior-badge-view.js' => '8ff5e24c', 475 476 'rsrc/js/core/behavior-choose-control.js' => '327a00d1', 476 477 'rsrc/js/core/behavior-crop.js' => 'fa0f4fc2', 477 478 'rsrc/js/core/behavior-dark-console.js' => 'f411b6ae', ··· 504 505 'rsrc/js/core/behavior-search-typeahead.js' => '06c32383', 505 506 'rsrc/js/core/behavior-select-on-click.js' => '4e3e79a6', 506 507 'rsrc/js/core/behavior-time-typeahead.js' => 'f80d6bf0', 507 - 'rsrc/js/core/behavior-toggle-class.js' => '5d7c9f33', 508 + 'rsrc/js/core/behavior-toggle-class.js' => '92b9ec77', 508 509 'rsrc/js/core/behavior-tokenizer.js' => 'b3a4b884', 509 510 'rsrc/js/core/behavior-tooltip.js' => '42fcb747', 510 511 'rsrc/js/core/behavior-watch-anchor.js' => '9f36c42d', ··· 580 581 'javelin-behavior-aphront-more' => 'a80d0378', 581 582 'javelin-behavior-audio-source' => '59b251eb', 582 583 'javelin-behavior-audit-preview' => 'd835b03a', 584 + 'javelin-behavior-badge-view' => '8ff5e24c', 583 585 'javelin-behavior-bulk-job-reload' => 'edf8a145', 584 586 'javelin-behavior-choose-control' => '327a00d1', 585 587 'javelin-behavior-comment-actions' => '06460e71', ··· 687 689 'javelin-behavior-stripe-payment-form' => '3f5d6dbf', 688 690 'javelin-behavior-test-payment-form' => 'fc91ab6c', 689 691 'javelin-behavior-time-typeahead' => 'f80d6bf0', 690 - 'javelin-behavior-toggle-class' => '5d7c9f33', 692 + 'javelin-behavior-toggle-class' => '92b9ec77', 691 693 'javelin-behavior-typeahead-browse' => '635de1ec', 692 694 'javelin-behavior-typeahead-search' => '93d0c9e3', 693 695 'javelin-behavior-view-placeholder' => '47830651', ··· 807 809 'phrequent-css' => 'ffc185ad', 808 810 'phriction-document-css' => 'd1861e06', 809 811 'phui-action-panel-css' => '91c7b835', 810 - 'phui-badge-view-css' => 'f25c3476', 812 + 'phui-badge-view-css' => '3baef8db', 811 813 'phui-big-info-view-css' => 'bd903741', 812 814 'phui-box-css' => 'd909ea3d', 813 815 'phui-button-css' => 'a64a8de6', ··· 1335 1337 'javelin-stratcom', 1336 1338 'javelin-dom', 1337 1339 ), 1338 - '5d7c9f33' => array( 1339 - 'javelin-behavior', 1340 - 'javelin-stratcom', 1341 - 'javelin-dom', 1342 - ), 1343 1340 '5e9f347c' => array( 1344 1341 'javelin-behavior', 1345 1342 'multirow-row-manager', ··· 1575 1572 'javelin-stratcom', 1576 1573 'javelin-install', 1577 1574 ), 1575 + '8ff5e24c' => array( 1576 + 'javelin-behavior', 1577 + 'javelin-stratcom', 1578 + 'javelin-dom', 1579 + ), 1578 1580 '901935ef' => array( 1579 1581 'javelin-behavior', 1580 1582 'javelin-dom', ··· 1588 1590 ), 1589 1591 92197373 => array( 1590 1592 'phui-workcard-view-css', 1593 + ), 1594 + '92b9ec77' => array( 1595 + 'javelin-behavior', 1596 + 'javelin-stratcom', 1597 + 'javelin-dom', 1591 1598 ), 1592 1599 '93d0c9e3' => array( 1593 1600 'javelin-behavior',
+3 -1
src/view/phui/PHUIBadgeView.php
··· 61 61 require_celerity_resource('phui-badge-view-css'); 62 62 $id = celerity_generate_unique_node_id(); 63 63 64 + Javelin::initBehavior('badge-view', array()); 65 + 64 66 $classes = array(); 65 67 $classes[] = 'phui-badge-view'; 66 68 if ($this->quality) { ··· 70 72 71 73 return array( 72 74 'class' => implode(' ', $classes), 73 - 'sigil' => 'jx-toggle-class', 75 + 'sigil' => 'jx-badge-view', 74 76 'id' => $id, 75 77 'meta' => array( 76 78 'map' => array(
+4
webroot/rsrc/css/phui/phui-badge.css
··· 50 50 background-color: {$lightbluebackground}; 51 51 } 52 52 53 + .phui-badge-card a { 54 + color: {$darkbluetext}; 55 + } 56 + 53 57 .card-flipped .phui-badge-card-container { 54 58 transform: translateX( -100% ) rotateY( -180deg ); 55 59 -webkit-transform: translateX( -100% ) rotateY( -180deg );
+41
webroot/rsrc/js/core/behavior-badge-view.js
··· 1 + /** 2 + * @provides javelin-behavior-badge-view 3 + * @requires javelin-behavior 4 + * javelin-stratcom 5 + * javelin-dom 6 + */ 7 + 8 + /** 9 + * Toggle CSS classes when an element is clicked. This behavior is activated 10 + * by adding the sigil `jx-badge-view` to an element, and a key `map` to its 11 + * data. The `map` should be a map from element IDs to the classes that should 12 + * be toggled on them. 13 + * 14 + * Optionally, you may provide a `state` key to set the default state of the 15 + * element. 16 + */ 17 + JX.behavior('badge-view', function(config, statics) { 18 + function install() { 19 + JX.Stratcom.listen( 20 + ['click'], 21 + 'jx-badge-view', 22 + function(e) { 23 + if (e.getNode('tag:a')) { 24 + // If the event has a 'tag:a' node on it, that means the user 25 + // either clicked a link or some other node inside a link. 26 + return; 27 + } 28 + 29 + var t = e.getNodeData('jx-badge-view'); 30 + t.state = !t.state; 31 + for (var k in t.map) { 32 + JX.DOM.alterClass(JX.$(k), t.map[k], t.state); 33 + } 34 + e.kill(); 35 + }); 36 + 37 + return true; 38 + } 39 + 40 + statics.install = statics.install || install(); 41 + });
+2 -2
webroot/rsrc/js/core/behavior-toggle-class.js
··· 15 15 * element. 16 16 */ 17 17 JX.behavior('toggle-class', function(config, statics) { 18 - statics.install = statics.install || install(); 19 - 20 18 function install() { 21 19 JX.Stratcom.listen( 22 20 ['touchstart', 'mousedown'], ··· 42 40 43 41 return true; 44 42 } 43 + 44 + statics.install = statics.install || install(); 45 45 });