Page MenuHomePhabricator

D8380.id19916.diff
No OneTemporary

D8380.id19916.diff

Index: resources/celerity/map.php
===================================================================
--- resources/celerity/map.php
+++ resources/celerity/map.php
@@ -348,7 +348,7 @@
'rsrc/js/application/aphlict/behavior-aphlict-listen.js' => '845731b8',
'rsrc/js/application/auth/behavior-persona-login.js' => '9414ff18',
'rsrc/js/application/config/behavior-reorder-fields.js' => '938aed89',
- 'rsrc/js/application/conpherence/behavior-menu.js' => '7ff0b011',
+ 'rsrc/js/application/conpherence/behavior-menu.js' => '7ee23816',
'rsrc/js/application/conpherence/behavior-pontificate.js' => '53f6f2dd',
'rsrc/js/application/conpherence/behavior-widget-pane.js' => 'd8ef8659',
'rsrc/js/application/countdown/timer.js' => '889c96f3',
@@ -535,7 +535,7 @@
'javelin-behavior-audit-preview' => 'be81801d',
'javelin-behavior-balanced-payment-form' => '3b3e1664',
'javelin-behavior-config-reorder-fields' => '938aed89',
- 'javelin-behavior-conpherence-menu' => '7ff0b011',
+ 'javelin-behavior-conpherence-menu' => '7ee23816',
'javelin-behavior-conpherence-pontificate' => '53f6f2dd',
'javelin-behavior-conpherence-widget-pane' => 'd8ef8659',
'javelin-behavior-countdown-timer' => '889c96f3',
@@ -1225,6 +1225,13 @@
2 => 'javelin-util',
3 => 'phabricator-shaped-request',
),
+ '62e18640' =>
+ array(
+ 0 => 'javelin-install',
+ 1 => 'javelin-util',
+ 2 => 'javelin-dom',
+ 3 => 'javelin-typeahead-normalizer',
+ ),
'6453c869' =>
array(
0 => 'javelin-install',
@@ -1258,13 +1265,6 @@
0 => 'javelin-behavior',
1 => 'javelin-dom',
),
- '62e18640' =>
- array(
- 0 => 'javelin-install',
- 1 => 'javelin-util',
- 2 => 'javelin-dom',
- 3 => 'javelin-typeahead-normalizer',
- ),
'75903ee1' =>
array(
0 => 'javelin-behavior',
@@ -1313,12 +1313,7 @@
0 => 'herald-rule-editor',
1 => 'javelin-behavior',
),
- '7ee2b591' =>
- array(
- 0 => 'javelin-behavior',
- 1 => 'javelin-history',
- ),
- '7ff0b011' =>
+ '7ee23816' =>
array(
0 => 'javelin-behavior',
1 => 'javelin-dom',
@@ -1330,6 +1325,11 @@
7 => 'javelin-vector',
8 => 'phabricator-shaped-request',
),
+ '7ee2b591' =>
+ array(
+ 0 => 'javelin-behavior',
+ 1 => 'javelin-history',
+ ),
'82947dda' =>
array(
0 => 'javelin-behavior',
Index: src/applications/conpherence/controller/ConpherenceUpdateController.php
===================================================================
--- src/applications/conpherence/controller/ConpherenceUpdateController.php
+++ src/applications/conpherence/controller/ConpherenceUpdateController.php
@@ -51,7 +51,7 @@
$conpherence->getPHID());
$draft->setDraft($request->getStr('text'));
$draft->replaceOrDelete();
- break;
+ return new AphrontAjaxResponse();
case ConpherenceUpdateActions::MESSAGE:
$message = $request->getStr('text');
$xactions = $editor->generateTransactionsFromText(
Index: src/infrastructure/javelin/markup.php
===================================================================
--- src/infrastructure/javelin/markup.php
+++ src/infrastructure/javelin/markup.php
@@ -11,13 +11,17 @@
foreach ($attributes as $k => $v) {
switch ($k) {
case 'sigil':
- $attributes['data-sigil'] = $v;
+ if ($v !== null) {
+ $attributes['data-sigil'] = $v;
+ }
unset($attributes[$k]);
break;
case 'meta':
- $response = CelerityAPI::getStaticResourceResponse();
- $id = $response->addMetadata($v);
- $attributes['data-meta'] = $id;
+ if ($v !== null) {
+ $response = CelerityAPI::getStaticResourceResponse();
+ $id = $response->addMetadata($v);
+ $attributes['data-meta'] = $id;
+ }
unset($attributes[$k]);
break;
case 'mustcapture':
Index: webroot/rsrc/js/application/conpherence/behavior-menu.js
===================================================================
--- webroot/rsrc/js/application/conpherence/behavior-menu.js
+++ webroot/rsrc/js/application/conpherence/behavior-menu.js
@@ -530,16 +530,21 @@
var onkeydownDraft = function (e) {
var form = e.getNode('tag:form');
- var uri = config.baseURI + 'update/' + _thread.selected + '/';
- var draftRequest = new JX.PhabricatorShapedRequest(
- uri,
- JX.bag,
- function () {
- var data = JX.DOM.convertFormToDictionary(form);
- data.action = 'draft';
- return data;
- });
- draftRequest.start();
+ var data = e.getNodeData('tag:form');
+
+ if (!data.preview) {
+ var uri = config.baseURI + 'update/' + _thread.selected + '/';
+ data.preview = new JX.PhabricatorShapedRequest(
+ uri,
+ JX.bag,
+ function () {
+ var data = JX.DOM.convertFormToDictionary(form);
+ data.action = 'draft';
+ return data;
+ });
+ }
+
+ data.preview.trigger();
};
JX.Stratcom.listen(

File Metadata

Mime Type
text/plain
Expires
Tue, Oct 15, 2:08 AM (4 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6710910
Default Alt Text
D8380.id19916.diff (5 KB)

Event Timeline