mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 09:35:39 -05:00
Style-fix quotes and EOD newlines
This commit is contained in:
parent
53e68a79a6
commit
cb41100d2e
4 changed files with 17 additions and 19 deletions
|
@ -32,5 +32,3 @@ block content
|
|||
a(data-toggle='collapse' href='#'+level.get('slug')+'-intro-collapse') Intro
|
||||
.panel-collapse.collapse.intro(id=level.get('slug')+'-intro-collapse')
|
||||
pre=levelObj.intro ? levelObj.intro.body : 'NOPE'
|
||||
|
||||
|
|
@ -25,9 +25,9 @@ module.exports = class LevelGuidesView extends RootView
|
|||
levels: []
|
||||
|
||||
onOverviewButtonClicked: (e) ->
|
||||
@$(".overview").toggleClass("in")
|
||||
@$('.overview').toggleClass('in')
|
||||
onIntroButtonClicked: (e) ->
|
||||
@$(".intro").toggleClass("in")
|
||||
@$('.intro').toggleClass('in')
|
||||
|
||||
initialize: () ->
|
||||
|
||||
|
@ -46,7 +46,7 @@ module.exports = class LevelGuidesView extends RootView
|
|||
levels = camp.get 'levels'
|
||||
|
||||
levels = new Levels()
|
||||
@listenTo(levels, "sync", @onLevelsLoaded)
|
||||
@listenTo(levels, 'sync', @onLevelsLoaded)
|
||||
levels.fetchForCampaign(campaignSlug)
|
||||
#for key, level of levels
|
||||
|
||||
|
@ -56,38 +56,38 @@ module.exports = class LevelGuidesView extends RootView
|
|||
for level in lvlCollection.models
|
||||
#console.log level
|
||||
levelSlug = level.get 'slug'
|
||||
overview = _.find(level.get('documentation').specificArticles, name:"Overview")
|
||||
intro = _.find(level.get('documentation').specificArticles, name:"Intro")
|
||||
overview = _.find(level.get('documentation').specificArticles, name:'Overview')
|
||||
intro = _.find(level.get('documentation').specificArticles, name:'Intro')
|
||||
#if intro and overview
|
||||
problems = []
|
||||
if not overview
|
||||
problems.push "No Overview"
|
||||
problems.push 'No Overview'
|
||||
else
|
||||
if not overview.i18n
|
||||
problems.push "Overview doesn't have i18n field"
|
||||
problems.push 'Overview doesn't have i18n field'
|
||||
if not overview.body
|
||||
problems.push "Overview doesn't have a body"
|
||||
problems.push 'Overview doesn't have a body'
|
||||
else
|
||||
if level.get('campaign')?.indexOf('web') is -1
|
||||
jsIndex = overview.body.indexOf('```javascript')
|
||||
pyIndex = overview.body.indexOf('```python')
|
||||
if jsIndex is -1 and pyIndex isnt -1 or jsIndex isnt -1 and pyIndex is -1
|
||||
problems.push "Overview is missing a language example."
|
||||
problems.push 'Overview is missing a language example.'
|
||||
if not intro
|
||||
problems.push "No Intro"
|
||||
problems.push 'No Intro'
|
||||
else
|
||||
if not intro.i18n
|
||||
problems.push "Intro doesn't have i18n field"
|
||||
problems.push 'Intro doesn't have i18n field'
|
||||
if not intro.body
|
||||
problems.push "Intro doesn't have a body"
|
||||
problems.push 'Intro doesn't have a body'
|
||||
else
|
||||
if intro.body.indexOf('file/db') is -1
|
||||
problems.push "Intro is missing image"
|
||||
problems.push 'Intro is missing image'
|
||||
if level.get('campaign')?.indexOf('web') is -1
|
||||
jsIndex = intro.body.indexOf('```javascript')
|
||||
pyIndex = intro.body.indexOf('```python')
|
||||
if jsIndex is -1 and pyIndex isnt -1 or jsIndex isnt -1 and pyIndex is -1
|
||||
problems.push "Intro is missing a language example."
|
||||
problems.push 'Intro is missing a language example.'
|
||||
@levels.push
|
||||
level: level
|
||||
overview: overview
|
||||
|
|
Loading…
Reference in a new issue