MCPcopy Create free account
hub / github.com/codecombat/codecombat / buildValueForDisplay

Method buildValueForDisplay

app/core/treema-ext.js:368–381  ·  view source on GitHub ↗
(valEl, data)

Source from the content-addressed store, hash-verified

366 }
367
368 buildValueForDisplay (valEl, data) {
369 const pickButton = $('<a class="btn btn-sm btn-primary"><span class="glyphicon glyphicon-upload"></span> Upload File</a>')
370 .click(() => filepicker.pick({}, this.onFileChosen))
371
372 valEl.append(pickButton)
373 if (data) {
374 const anchor = $('<a></a>')
375 .attr('href', `/file/${data}`)
376 .attr('target', '_blank')
377 .attr('style', 'padding-left: 5px;')
378 .text(`/file/${data}`)
379 return valEl.append(anchor)
380 }
381 }
382
383 onFileChosen (InkBlob) {
384 if (!this.settings.filePath) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected