Page MenuHomePhabricator

D14911.id36045.diff
No OneTemporary

D14911.id36045.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -465,7 +465,7 @@
'rsrc/js/core/behavior-active-nav.js' => 'e379b58e',
'rsrc/js/core/behavior-audio-source.js' => '59b251eb',
'rsrc/js/core/behavior-autofocus.js' => '7319e029',
- 'rsrc/js/core/behavior-choose-control.js' => 'dfaafb14',
+ 'rsrc/js/core/behavior-choose-control.js' => '8fee767e',
'rsrc/js/core/behavior-crop.js' => 'fa0f4fc2',
'rsrc/js/core/behavior-dark-console.js' => 'f411b6ae',
'rsrc/js/core/behavior-device.js' => 'a205cf28',
@@ -571,7 +571,7 @@
'javelin-behavior-audio-source' => '59b251eb',
'javelin-behavior-audit-preview' => 'd835b03a',
'javelin-behavior-bulk-job-reload' => 'edf8a145',
- 'javelin-behavior-choose-control' => 'dfaafb14',
+ 'javelin-behavior-choose-control' => '8fee767e',
'javelin-behavior-comment-actions' => 'b65559c0',
'javelin-behavior-config-reorder-fields' => 'b6993408',
'javelin-behavior-conpherence-drag-and-drop-photo' => 'cf86d16a',
@@ -1517,6 +1517,12 @@
'javelin-install',
'javelin-dom',
),
+ '8fee767e' => array(
+ 'javelin-behavior',
+ 'javelin-stratcom',
+ 'javelin-dom',
+ 'javelin-workflow',
+ ),
'9007c197' => array(
'javelin-behavior',
'javelin-dom',
@@ -1909,12 +1915,6 @@
'df5e11d2' => array(
'javelin-install',
),
- 'dfaafb14' => array(
- 'javelin-behavior',
- 'javelin-stratcom',
- 'javelin-dom',
- 'javelin-workflow',
- ),
'e10f8e18' => array(
'javelin-behavior',
'javelin-dom',
diff --git a/src/applications/project/editor/PhabricatorProjectTransactionEditor.php b/src/applications/project/editor/PhabricatorProjectTransactionEditor.php
--- a/src/applications/project/editor/PhabricatorProjectTransactionEditor.php
+++ b/src/applications/project/editor/PhabricatorProjectTransactionEditor.php
@@ -102,7 +102,7 @@
case PhabricatorProjectTransaction::TYPE_NAME:
$name = $xaction->getNewValue();
$object->setName($name);
- if ($this->getIsMilestone()) {
+ if (!$this->getIsMilestone()) {
$object->setPrimarySlug(PhabricatorSlug::normalizeProjectSlug($name));
}
return;
diff --git a/src/view/form/control/PHUIFormIconSetControl.php b/src/view/form/control/PHUIFormIconSetControl.php
--- a/src/view/form/control/PHUIFormIconSetControl.php
+++ b/src/view/form/control/PHUIFormIconSetControl.php
@@ -26,11 +26,21 @@
$input_id = celerity_generate_unique_node_id();
$display_id = celerity_generate_unique_node_id();
+ $is_disabled = $this->getDisabled();
+
+ $classes = array();
+ $classes[] = 'button';
+ $classes[] = 'grey';
+
+ if ($is_disabled) {
+ $classes[] = 'disabled';
+ }
+
$button = javelin_tag(
'a',
array(
'href' => '#',
- 'class' => 'button grey',
+ 'class' => implode(' ', $classes),
'sigil' => 'phui-form-iconset-button',
),
$set->getChooseButtonText());
@@ -79,6 +89,7 @@
'input',
array(
'type' => 'hidden',
+ 'disabled' => ($is_disabled ? 'disabled' : null),
'name' => $this->getName(),
'value' => $this->getValue(),
'id' => $input_id,
diff --git a/webroot/rsrc/js/core/behavior-choose-control.js b/webroot/rsrc/js/core/behavior-choose-control.js
--- a/webroot/rsrc/js/core/behavior-choose-control.js
+++ b/webroot/rsrc/js/core/behavior-choose-control.js
@@ -15,14 +15,19 @@
e.kill();
var data = e.getNodeData('phui-form-iconset');
+ var input = JX.$(data.inputID);
+
+ if (input.disabled) {
+ return;
+ }
var params = {
- value: JX.$(data.inputID).value
+ value: input.value
};
new JX.Workflow(data.uri, params)
.setHandler(function(r) {
- JX.$(data.inputID).value = r.value;
+ input.value = r.value;
JX.DOM.setContent(JX.$(data.displayID), JX.$H(r.display));
})
.start();

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 7:50 AM (17 h, 32 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6912528
Default Alt Text
D14911.id36045.diff (4 KB)

Event Timeline