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

Give IconSetControl a meaningful disabled state

Summary: Ref T10004. This control doesn't disable visually or behaviorally, e.g. when locked in an EditEngine configuration.

Test Plan:
- Locked field for Projects.
- Reviewed form in EditEngine.
- Created/edited a project.
- Swapped default.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10004

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

+28 -12
+8 -8
resources/celerity/map.php
··· 465 465 'rsrc/js/core/behavior-active-nav.js' => 'e379b58e', 466 466 'rsrc/js/core/behavior-audio-source.js' => '59b251eb', 467 467 'rsrc/js/core/behavior-autofocus.js' => '7319e029', 468 - 'rsrc/js/core/behavior-choose-control.js' => 'dfaafb14', 468 + 'rsrc/js/core/behavior-choose-control.js' => '8fee767e', 469 469 'rsrc/js/core/behavior-crop.js' => 'fa0f4fc2', 470 470 'rsrc/js/core/behavior-dark-console.js' => 'f411b6ae', 471 471 'rsrc/js/core/behavior-device.js' => 'a205cf28', ··· 571 571 'javelin-behavior-audio-source' => '59b251eb', 572 572 'javelin-behavior-audit-preview' => 'd835b03a', 573 573 'javelin-behavior-bulk-job-reload' => 'edf8a145', 574 - 'javelin-behavior-choose-control' => 'dfaafb14', 574 + 'javelin-behavior-choose-control' => '8fee767e', 575 575 'javelin-behavior-comment-actions' => 'b65559c0', 576 576 'javelin-behavior-config-reorder-fields' => 'b6993408', 577 577 'javelin-behavior-conpherence-drag-and-drop-photo' => 'cf86d16a', ··· 1517 1517 'javelin-install', 1518 1518 'javelin-dom', 1519 1519 ), 1520 + '8fee767e' => array( 1521 + 'javelin-behavior', 1522 + 'javelin-stratcom', 1523 + 'javelin-dom', 1524 + 'javelin-workflow', 1525 + ), 1520 1526 '9007c197' => array( 1521 1527 'javelin-behavior', 1522 1528 'javelin-dom', ··· 1908 1914 ), 1909 1915 'df5e11d2' => array( 1910 1916 'javelin-install', 1911 - ), 1912 - 'dfaafb14' => array( 1913 - 'javelin-behavior', 1914 - 'javelin-stratcom', 1915 - 'javelin-dom', 1916 - 'javelin-workflow', 1917 1917 ), 1918 1918 'e10f8e18' => array( 1919 1919 'javelin-behavior',
+1 -1
src/applications/project/editor/PhabricatorProjectTransactionEditor.php
··· 102 102 case PhabricatorProjectTransaction::TYPE_NAME: 103 103 $name = $xaction->getNewValue(); 104 104 $object->setName($name); 105 - if ($this->getIsMilestone()) { 105 + if (!$this->getIsMilestone()) { 106 106 $object->setPrimarySlug(PhabricatorSlug::normalizeProjectSlug($name)); 107 107 } 108 108 return;
+12 -1
src/view/form/control/PHUIFormIconSetControl.php
··· 26 26 $input_id = celerity_generate_unique_node_id(); 27 27 $display_id = celerity_generate_unique_node_id(); 28 28 29 + $is_disabled = $this->getDisabled(); 30 + 31 + $classes = array(); 32 + $classes[] = 'button'; 33 + $classes[] = 'grey'; 34 + 35 + if ($is_disabled) { 36 + $classes[] = 'disabled'; 37 + } 38 + 29 39 $button = javelin_tag( 30 40 'a', 31 41 array( 32 42 'href' => '#', 33 - 'class' => 'button grey', 43 + 'class' => implode(' ', $classes), 34 44 'sigil' => 'phui-form-iconset-button', 35 45 ), 36 46 $set->getChooseButtonText()); ··· 79 89 'input', 80 90 array( 81 91 'type' => 'hidden', 92 + 'disabled' => ($is_disabled ? 'disabled' : null), 82 93 'name' => $this->getName(), 83 94 'value' => $this->getValue(), 84 95 'id' => $input_id,
+7 -2
webroot/rsrc/js/core/behavior-choose-control.js
··· 15 15 e.kill(); 16 16 17 17 var data = e.getNodeData('phui-form-iconset'); 18 + var input = JX.$(data.inputID); 19 + 20 + if (input.disabled) { 21 + return; 22 + } 18 23 19 24 var params = { 20 - value: JX.$(data.inputID).value 25 + value: input.value 21 26 }; 22 27 23 28 new JX.Workflow(data.uri, params) 24 29 .setHandler(function(r) { 25 - JX.$(data.inputID).value = r.value; 30 + input.value = r.value; 26 31 JX.DOM.setContent(JX.$(data.displayID), JX.$H(r.display)); 27 32 }) 28 33 .start();