Style-fix quotes and EOD newlines

This commit is contained in:
Josh Callebaut 2016-08-25 15:37:49 -07:00
parent 53e68a79a6
commit cb41100d2e
4 changed files with 17 additions and 19 deletions

View file

@ -2,4 +2,4 @@
.problem
color: red
.level-details
width: 15%
width: 15%

View file

@ -16,4 +16,4 @@ block content
|Level Concept Map
div
a(href='/artisans/level-guides')
|Level Guides Overview
|Level Guides Overview

View file

@ -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'

View file

@ -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
@ -95,4 +95,4 @@ module.exports = class LevelGuidesView extends RootView
problems: problems
@levels.sort (a, b) ->
return b.problems.length - a.problems.length
@renderSelectors '#level-table'
@renderSelectors '#level-table'