(valEl, data)
| 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) { |
nothing calls this directly
no outgoing calls
no test coverage detected