Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/transactions/behavior-comment-actions.js
| Show First 20 Lines • Show All 120 Lines • ▼ Show 20 Lines | if (!response.xactions.length) { | ||||
| rootNode: preview_root | rootNode: preview_root | ||||
| }); | }); | ||||
| }; | }; | ||||
| setTimeout(invoke_preview, 0); | setTimeout(invoke_preview, 0); | ||||
| } | } | ||||
| } | } | ||||
| function force_preview() { | function force_preview() { | ||||
| if (!config.shouldPreview) { | if (!config.showPreview) { | ||||
| return; | return; | ||||
| } | } | ||||
| new JX.Request(config.actionURI, onresponse) | new JX.Request(config.actionURI, onresponse) | ||||
| .setData(get_data()) | .setData(get_data()) | ||||
| .send(); | .send(); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | function add_row(option) { | ||||
| return control; | return control; | ||||
| } | } | ||||
| JX.DOM.listen(form_node, ['submit', 'didSyntheticSubmit'], null, function() { | JX.DOM.listen(form_node, ['submit', 'didSyntheticSubmit'], null, function() { | ||||
| input_node.value = serialize_actions(); | input_node.value = serialize_actions(); | ||||
| }); | }); | ||||
| if (config.showPreview) { | if (config.showPreview) { | ||||
epriestley: Here's the property being used elsewhere. My incorrect spelling, `shouldPreview`, appears… | |||||
| var request = new JX.PhabricatorShapedRequest( | var request = new JX.PhabricatorShapedRequest( | ||||
| config.actionURI, | config.actionURI, | ||||
| onresponse, | onresponse, | ||||
| get_data); | get_data); | ||||
| var trigger = JX.bind(request, request.trigger); | var trigger = JX.bind(request, request.trigger); | ||||
| JX.DOM.listen(form_node, 'keydown', null, trigger); | JX.DOM.listen(form_node, 'keydown', null, trigger); | ||||
| Show All 36 Lines | |||||
Here's the property being used elsewhere. My incorrect spelling, shouldPreview, appears nowhere in the codebase.