MCPcopy Index your code
hub / github.com/codecombat/codecombat / onLevelSlugInput

Method onLevelSlugInput

app/views/admin/CodeLogsView.js:63–76  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

61 }
62
63 onLevelSlugInput (e) {
64 const slug = $('#levelslug-search')[0].value
65 if (slug !== '') {
66 return Promise.resolve(this.codelogs.fetchBySlug(slug))
67 .then(e => {
68 return this.renderSelectors('#codelogtable')
69 })
70 } else {
71 return Promise.resolve(this.codelogs.fetchLatest())
72 .then(e => {
73 return this.renderSelectors('#codelogtable')
74 })
75 }
76 }
77
78 onClickPlayback (e) {
79 return this.insertSubView(this.codePlaybackView = new CodePlaybackView({ rawLog: $(e.target).data('codelog') }))

Callers

nothing calls this directly

Calls 2

fetchBySlugMethod · 0.80
fetchLatestMethod · 0.80

Tested by

no test coverage detected