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

Method addImageUpload

app/core/treema-ext.js:118–127  ·  view source on GitHub ↗
(valEl)

Source from the content-addressed store, hash-verified

116 }
117
118 addImageUpload (valEl) {
119 if (!me.isAdmin() && !me.isArtisan()) { return }
120 return valEl.append(
121 $('<div class="pick-image-button"></div>').append(
122 $('<button>Pick Image</button>')
123 .addClass('btn btn-sm btn-primary')
124 .click(() => filepicker.pick(this.onFileChosen)),
125 ),
126 )
127 }
128
129 addPreviewToggle (valEl) {
130 return valEl.append($('<div class="toggle-preview-button"></div>').append(

Callers 1

initEditorMethod · 0.95

Calls 2

isAdminMethod · 0.80
isArtisanMethod · 0.80

Tested by

no test coverage detected