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

Method buildValueForDisplay

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

Source from the content-addressed store, hash-verified

413 }
414
415 buildValueForDisplay (valEl, data) {
416 const mimetype = 'text/javascript'
417 const pickButton = $('<a class="btn btn-sm btn-primary"><span class="glyphicon glyphicon-upload"></span> Upload js file</a>')
418 .click(() => filepicker.pick({ mimetypes: [mimetype] }, this.onFileChosen))
419
420 valEl.append(pickButton)
421 if (data) {
422 const path = data.split('/')
423 const name = path[path.length - 1]
424 return valEl.append($('<span></span>').text(name))
425 }
426 }
427}
428JavaScriptFileTreema.initClass()
429

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected