diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 1502be2eac..85e21f4a12 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -11,11 +11,11 @@ return array( 'core.pkg.js' => '328799d0', 'darkconsole.pkg.js' => 'e7393ebb', 'differential.pkg.css' => 'bb338e4b', - 'differential.pkg.js' => '45b3b51d', + 'differential.pkg.js' => '63a77807', 'diffusion.pkg.css' => '591664fa', 'diffusion.pkg.js' => '0115b37c', 'maniphest.pkg.css' => '68d4dd3d', - 'maniphest.pkg.js' => 'df4aa49f', + 'maniphest.pkg.js' => '2f4f52c2', 'rsrc/css/aphront/aphront-bars.css' => '231ac33c', 'rsrc/css/aphront/dark-console.css' => '6378ef3d', 'rsrc/css/aphront/dialog-view.css' => '9b32db0a', @@ -349,7 +349,7 @@ return array( 'rsrc/js/application/differential/DifferentialInlineCommentEditor.js' => 'd4c87bf4', 'rsrc/js/application/differential/behavior-add-reviewers-and-ccs.js' => 'e10f8e18', 'rsrc/js/application/differential/behavior-comment-jump.js' => '4fdb476d', - 'rsrc/js/application/differential/behavior-comment-preview.js' => '8e1389b5', + 'rsrc/js/application/differential/behavior-comment-preview.js' => 'b064af76', 'rsrc/js/application/differential/behavior-diff-radios.js' => 'e1ff79b1', 'rsrc/js/application/differential/behavior-dropdown-menus.js' => '2035b9cb', 'rsrc/js/application/differential/behavior-edit-inline-comments.js' => 'e723c323', @@ -379,7 +379,7 @@ return array( 'rsrc/js/application/maniphest/behavior-subpriorityeditor.js' => '84845b5b', 'rsrc/js/application/maniphest/behavior-transaction-controls.js' => '44168bad', 'rsrc/js/application/maniphest/behavior-transaction-expand.js' => '5fefb143', - 'rsrc/js/application/maniphest/behavior-transaction-preview.js' => 'f8248bc5', + 'rsrc/js/application/maniphest/behavior-transaction-preview.js' => '4c95d29e', 'rsrc/js/application/owners/OwnersPathEditor.js' => 'aa1733d0', 'rsrc/js/application/owners/owners-path-editor.js' => '7a68dda3', 'rsrc/js/application/passphrase/passphrase-credential-control.js' => '3cb0b2fc', @@ -466,7 +466,7 @@ return array( 'rsrc/js/core/behavior-scrollbar.js' => '834a1173', 'rsrc/js/core/behavior-search-typeahead.js' => '048330fa', 'rsrc/js/core/behavior-select-on-click.js' => '4e3e79a6', - 'rsrc/js/core/behavior-time-typeahead.js' => '8cf340fd', + 'rsrc/js/core/behavior-time-typeahead.js' => '3416cef7', 'rsrc/js/core/behavior-toggle-class.js' => '5d7c9f33', 'rsrc/js/core/behavior-tokenizer.js' => 'b3a4b884', 'rsrc/js/core/behavior-tooltip.js' => '3ee3408b', @@ -559,7 +559,7 @@ return array( 'javelin-behavior-differential-diff-radios' => 'e1ff79b1', 'javelin-behavior-differential-dropdown-menus' => '2035b9cb', 'javelin-behavior-differential-edit-inline-comments' => 'e723c323', - 'javelin-behavior-differential-feedback-preview' => '8e1389b5', + 'javelin-behavior-differential-feedback-preview' => 'b064af76', 'javelin-behavior-differential-keyboard-navigation' => '2c426492', 'javelin-behavior-differential-populate' => '8694b1df', 'javelin-behavior-differential-show-field-details' => 'bba9eedf', @@ -590,7 +590,7 @@ return array( 'javelin-behavior-maniphest-subpriority-editor' => '84845b5b', 'javelin-behavior-maniphest-transaction-controls' => '44168bad', 'javelin-behavior-maniphest-transaction-expand' => '5fefb143', - 'javelin-behavior-maniphest-transaction-preview' => 'f8248bc5', + 'javelin-behavior-maniphest-transaction-preview' => '4c95d29e', 'javelin-behavior-owners-path-editor' => '7a68dda3', 'javelin-behavior-passphrase-credential-control' => '3cb0b2fc', 'javelin-behavior-persona-login' => '9414ff18', @@ -641,7 +641,7 @@ return array( 'javelin-behavior-slowvote-embed' => '887ad43f', 'javelin-behavior-stripe-payment-form' => '3f5d6dbf', 'javelin-behavior-test-payment-form' => 'fc91ab6c', - 'javelin-behavior-time-typeahead' => '8cf340fd', + 'javelin-behavior-time-typeahead' => '3416cef7', 'javelin-behavior-toggle-class' => '5d7c9f33', 'javelin-behavior-typeahead-browse' => '635de1ec', 'javelin-behavior-typeahead-search' => '93d0c9e3', @@ -1041,6 +1041,14 @@ return array( '331b1611' => array( 'javelin-install', ), + '3416cef7' => array( + 'javelin-behavior', + 'javelin-util', + 'javelin-dom', + 'javelin-stratcom', + 'javelin-vector', + 'javelin-typeahead-static-source', + ), '3975b470' => array( 'javelin-behavior', 'javelin-dom', @@ -1130,6 +1138,14 @@ return array( 'javelin-request', 'javelin-util', ), + '4c95d29e' => array( + 'javelin-behavior', + 'javelin-dom', + 'javelin-util', + 'javelin-json', + 'javelin-stratcom', + 'phabricator-shaped-request', + ), '4cebc641' => array( 'javelin-install', ), @@ -1484,27 +1500,11 @@ return array( 'javelin-stratcom', 'javelin-behavior', ), - '8cf340fd' => array( - 'javelin-behavior', - 'javelin-util', - 'javelin-dom', - 'javelin-stratcom', - 'javelin-vector', - 'javelin-typeahead-static-source', - ), '8cf6d262' => array( 'javelin-install', 'javelin-dom', 'javelin-util', ), - '8e1389b5' => array( - 'javelin-behavior', - 'javelin-stratcom', - 'javelin-dom', - 'javelin-request', - 'javelin-util', - 'phabricator-shaped-request', - ), '8ef9ab58' => array( 'javelin-behavior', 'javelin-dom', @@ -1663,6 +1663,14 @@ return array( 'javelin-stratcom', 'javelin-install', ), + 'b064af76' => array( + 'javelin-behavior', + 'javelin-stratcom', + 'javelin-dom', + 'javelin-request', + 'javelin-util', + 'phabricator-shaped-request', + ), 'b1a59974' => array( 'javelin-behavior', 'javelin-aphlict', @@ -1983,14 +1991,6 @@ return array( 'javelin-typeahead-ondemand-source', 'javelin-util', ), - 'f8248bc5' => array( - 'javelin-behavior', - 'javelin-dom', - 'javelin-util', - 'javelin-json', - 'javelin-stratcom', - 'phabricator-shaped-request', - ), 'f829edb3' => array( 'javelin-view', 'javelin-install', diff --git a/webroot/rsrc/js/application/differential/behavior-comment-preview.js b/webroot/rsrc/js/application/differential/behavior-comment-preview.js index 3cf50535fd..283e6ea12c 100644 --- a/webroot/rsrc/js/application/differential/behavior-comment-preview.js +++ b/webroot/rsrc/js/application/differential/behavior-comment-preview.js @@ -21,10 +21,25 @@ JX.behavior('differential-feedback-preview', function(config) { var callback = function(r) { var preview = JX.$(config.preview); - JX.DOM.setContent(preview, JX.$H(r)); - JX.Stratcom.invoke('differential-preview-update', null, { - container: preview - }); + var data = getdata(); + var hide = true; + for (var field in data) { + if (field == 'action') { + continue; + } + if (data[field]) { + hide = false; + } + } + if (hide) { + JX.DOM.hide(preview); + } else { + JX.DOM.setContent(preview, JX.$H(r)); + JX.Stratcom.invoke('differential-preview-update', null, { + container: preview + }); + JX.DOM.show(preview); + } }; var getdata = function() { diff --git a/webroot/rsrc/js/application/maniphest/behavior-transaction-preview.js b/webroot/rsrc/js/application/maniphest/behavior-transaction-preview.js index ca18eb69d4..66b58b1f4b 100644 --- a/webroot/rsrc/js/application/maniphest/behavior-transaction-preview.js +++ b/webroot/rsrc/js/application/maniphest/behavior-transaction-preview.js @@ -14,7 +14,23 @@ JX.behavior('maniphest-transaction-preview', function(config) { var action = JX.$(config.action); var callback = function(r) { - JX.DOM.setContent(JX.$(config.preview), JX.$H(r)); + var panel = JX.$(config.preview); + var data = getdata(); + var hide = true; + for (var field in data) { + if (field == 'action') { + continue; + } + if (data[field]) { + hide = false; + } + } + if (hide) { + JX.DOM.hide(panel); + } else { + JX.DOM.setContent(panel, JX.$H(r)); + JX.DOM.show(panel); + } }; var getdata = function() {