Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/core/behavior-phabricator-remarkup-assist.js
/** | /** | ||||
* @provides javelin-behavior-phabricator-remarkup-assist | * @provides javelin-behavior-phabricator-remarkup-assist | ||||
* @requires javelin-behavior | * @requires javelin-behavior | ||||
* javelin-stratcom | * javelin-stratcom | ||||
* javelin-dom | * javelin-dom | ||||
* phabricator-phtize | * phabricator-phtize | ||||
* phabricator-textareautils | * phabricator-textareautils | ||||
* phabricator-remarkup-metadata | |||||
* javelin-workflow | * javelin-workflow | ||||
* javelin-vector | * javelin-vector | ||||
* phuix-autocomplete | * phuix-autocomplete | ||||
* javelin-mask | * javelin-mask | ||||
*/ | */ | ||||
JX.behavior('phabricator-remarkup-assist', function(config) { | JX.behavior('phabricator-remarkup-assist', function(config) { | ||||
var pht = JX.phtize(config.pht); | var pht = JX.phtize(config.pht); | ||||
▲ Show 20 Lines • Show All 234 Lines • ▼ Show 20 Lines | switch (action) { | ||||
var file = files[ii]; | var file = files[ii]; | ||||
var upload = new JX.PhabricatorFileUpload() | var upload = new JX.PhabricatorFileUpload() | ||||
.setID(file.id) | .setID(file.id) | ||||
.setPHID(file.phid) | .setPHID(file.phid) | ||||
.setURI(file.uri); | .setURI(file.uri); | ||||
JX.TextAreaUtils.insertFileReference(area, upload); | JX.TextAreaUtils.insertFileReference(area, upload); | ||||
var metadata = new JX.RemarkupMetadata( | |||||
config.remarkupMetadataValue, config.remarkupMetadataID); | |||||
var phids = metadata.getMetadata('attachedFilePHIDs', []); | |||||
phids.push(file.phid); | |||||
metadata.setMetadata('attachedFilePHIDs', phids); | |||||
avivey: is `metadata` gets automatically inserted into something? I don't see it being manually saved. | |||||
Done Inline ActionsIt gets written to the HTML element in the setMetadata method. Dylsss: It gets written to the HTML element in the `setMetadata` method. | |||||
} | } | ||||
}) | }) | ||||
.start(); | .start(); | ||||
break; | break; | ||||
case 'fa-arrows-alt': | case 'fa-arrows-alt': | ||||
set_pinned_mode(root, false); | set_pinned_mode(root, false); | ||||
if (edit_mode == 'fullscreen') { | if (edit_mode == 'fullscreen') { | ||||
set_edit_mode(root, 'normal'); | set_edit_mode(root, 'normal'); | ||||
▲ Show 20 Lines • Show All 161 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
is metadata gets automatically inserted into something? I don't see it being manually saved.