mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-14 01:31:15 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
777505f75b
23 changed files with 972 additions and 437 deletions
|
@ -21,6 +21,7 @@ module.exports = ModuleLoader = class ModuleLoader extends CocoClass
|
|||
# vendor libraries aren't actually wrapped with common.js, so short circuit those requires
|
||||
return {} if _.string.startsWith(name, 'vendor/')
|
||||
return {} if name is 'tests'
|
||||
return {} if name is 'demo-app'
|
||||
name = 'core/auth' if name is 'lib/auth' # proxy for iPad until it's been updated to use the new, refactored location. TODO: remove this
|
||||
return func(name, loaderPath)
|
||||
_.extend wrapped, window.require # for functions like 'list'
|
||||
|
|
|
@ -27,6 +27,7 @@ module.exports = class CocoRouter extends Backbone.Router
|
|||
|
||||
'admin': go('admin/MainAdminView')
|
||||
'admin/clas': go('admin/CLAsView')
|
||||
'admin/design-elements': go('admin/DesignElementsView')
|
||||
'admin/files': go('admin/FilesView')
|
||||
'admin/analytics': go('admin/AnalyticsView')
|
||||
'admin/analytics/subscriptions': go('admin/AnalyticsSubscriptionsView')
|
||||
|
|
|
@ -553,34 +553,30 @@
|
|||
press_paragraph_1_link: "press packet"
|
||||
press_paragraph_1_suffix: ". All logos and images may be used without contacting us directly."
|
||||
team: "Team"
|
||||
george_title: "Cofounder"
|
||||
george_blurb: "Businesser"
|
||||
scott_title: "Cofounder"
|
||||
scott_blurb: "Reasonable One"
|
||||
nick_title: "Cofounder"
|
||||
nick_title: "Cofounder, CEO" # {change}
|
||||
nick_blurb: "Motivation Guru"
|
||||
michael_title: "Programmer"
|
||||
michael_blurb: "Sys Admin"
|
||||
matt_title: "Cofounder"
|
||||
matt_title: "Cofounder, CTO" # {change}
|
||||
matt_blurb: "Bicyclist"
|
||||
cat_title: "Chief Artisan"
|
||||
cat_title: "Game Designer" # {change}
|
||||
cat_blurb: "Airbender"
|
||||
josh_title: "Game Designer"
|
||||
josh_blurb: "Floor Is Lava"
|
||||
jose_title: "Music"
|
||||
jose_blurb: "Taking Off"
|
||||
retrostyle_title: "Illustration"
|
||||
retrostyle_blurb: "RetroStyle Games"
|
||||
rob_title: "Compiler Engineer"
|
||||
scott_title: "Cofounder, Software Engineer" # {change}
|
||||
scott_blurb: "Reasonable One"
|
||||
maka_title: "Customer Advocate"
|
||||
maka_blurb: "Storyteller"
|
||||
rob_title: "Software Engineer" # {change}
|
||||
rob_blurb: "Codes things and stuff"
|
||||
josh_c_title: "Game Designer"
|
||||
josh_c_blurb: "Designs games"
|
||||
carlos_title: "Region Manager, Brazil"
|
||||
carlos_blurb: "Celery Man"
|
||||
maka_title: "Customer Advocate"
|
||||
maka_blurb: "Storyteller"
|
||||
robin_title: "UX Design & Research"
|
||||
robin_blurb: "Scaffolding"
|
||||
josh_title: "Game Designer"
|
||||
josh_blurb: "Floor Is Lava"
|
||||
retrostyle_title: "Illustration"
|
||||
retrostyle_blurb: "RetroStyle Games"
|
||||
jose_title: "Music"
|
||||
jose_blurb: "Taking Off"
|
||||
carlos_title: "Region Manager, Brazil"
|
||||
carlos_blurb: "Celery Man"
|
||||
|
||||
teachers:
|
||||
who_for_title: "Who is CodeCombat for?"
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -23,8 +23,14 @@
|
|||
margin: 0px 10px 22px 0px
|
||||
|
||||
.team_name
|
||||
font-size: 20px
|
||||
margin-top: 0
|
||||
|
||||
.team_bio
|
||||
width: 150px
|
||||
float: left
|
||||
float: left
|
||||
|
||||
div
|
||||
font-size: 12px
|
||||
line-height: 14px
|
||||
padding-bottom: 5px
|
|
@ -73,67 +73,74 @@ block content
|
|||
|
||||
h2(data-i18n="about.team") Team
|
||||
|
||||
// Full time
|
||||
|
||||
a(href="http://www.nickwinter.net")
|
||||
img(src="/images/pages/about/nick_small.png").img-thumbnail
|
||||
.team_bio
|
||||
h4.team_name
|
||||
a(href="http://www.nickwinter.net") Nick Winter
|
||||
p(data-i18n="about.nick_title")
|
||||
| Cofounder
|
||||
p(data-i18n="about.nick_blurb")
|
||||
| Motivation Guru
|
||||
div(data-i18n="about.nick_title")
|
||||
div(data-i18n="about.nick_blurb")
|
||||
|
||||
a(href="http://www.mattlott.com/")
|
||||
img(src="/images/pages/about/matt_small.png").img-thumbnail
|
||||
.team_bio
|
||||
h4.team_name
|
||||
a(href="http://www.mattlott.com/") Matt Lott
|
||||
p(data-i18n="about.matt_title")
|
||||
| Cofounder
|
||||
p(data-i18n="about.matt_blurb")
|
||||
| Bicyclist
|
||||
div(data-i18n="about.matt_title")
|
||||
div(data-i18n="about.matt_blurb")
|
||||
|
||||
li.row
|
||||
|
||||
a(href="http://www.georgesaines.com/")
|
||||
img(src="/images/pages/about/george_small.png").img-thumbnail
|
||||
.team_bio
|
||||
h4.team_name
|
||||
a(href="http://www.georgesaines.com/") George Saines
|
||||
p(data-i18n="about.george_title")
|
||||
| Cofounder
|
||||
p(data-i18n="about.george_blurb")
|
||||
| Businesser
|
||||
|
||||
a(href="http://cat.zdh.com/")
|
||||
img(src="/images/pages/about/cat_small.png").img-thumbnail
|
||||
.team_bio
|
||||
h4.team_name
|
||||
a(href="http://cat.zdh.com/") Catherine Weresow
|
||||
p(data-i18n="about.cat_title")
|
||||
| Chief Artisan
|
||||
p(data-i18n="about.cat_blurb")
|
||||
| Airbender
|
||||
|
||||
li.row
|
||||
div(data-i18n="about.cat_title")
|
||||
div(data-i18n="about.cat_blurb")
|
||||
|
||||
img(src="/images/pages/about/scott_small.png").img-thumbnail
|
||||
.team_bio
|
||||
h4.team_name Scott Erickson
|
||||
p(data-i18n="about.scott_title")
|
||||
| Cofounder
|
||||
p(data-i18n="about.scott_blurb")
|
||||
| Reasonable one
|
||||
div(data-i18n="about.scott_title")
|
||||
div(data-i18n="about.scott_blurb")
|
||||
|
||||
a(href="http://michaelschmatz.com")
|
||||
img(src="/images/pages/about/michael_small.png").img-thumbnail
|
||||
li.row
|
||||
|
||||
img(src="/images/pages/about/maka_small.png").img-thumbnail
|
||||
.team_bio
|
||||
h4.team_name Michael 'Maka' Gradin
|
||||
div(data-i18n="about.maka_title")
|
||||
div(data-i18n="about.maka_blurb")
|
||||
|
||||
a(href="http://basicer.com/")
|
||||
img(src="/images/pages/about/rob_small.png").img-thumbnail
|
||||
.team_bio
|
||||
h4.team_name
|
||||
a(href="http://michaelschmatz.com/") Michael Schmatz
|
||||
p(data-i18n="about.michael_title")
|
||||
| Programmer
|
||||
p(data-i18n="about.michael_blurb")
|
||||
| Sys Admin
|
||||
a(href="http://basicer.com/") Rob Blanckaert
|
||||
div(data-i18n="about.rob_title")
|
||||
div(data-i18n="about.rob_blurb")
|
||||
|
||||
li.row
|
||||
|
||||
img(src="/images/pages/about/josh_c_small.png").img-thumbnail
|
||||
.team_bio
|
||||
h4.team_name Josh Callebaut
|
||||
div(data-i18n="about.josh_c_title")
|
||||
div(data-i18n="about.josh_c_blurb")
|
||||
|
||||
a(href="http://robinyang.com/")
|
||||
img(src="/images/pages/about/robin_small.png").img-thumbnail
|
||||
.team_bio
|
||||
h4.team_name
|
||||
a(href="http://robinyang.com/") Robin Yang
|
||||
div(data-i18n="about.robin_title")
|
||||
div(data-i18n="about.robin_blurb")
|
||||
|
||||
|
||||
// Part time / contract
|
||||
|
||||
li.row
|
||||
|
||||
|
@ -142,20 +149,16 @@ block content
|
|||
.team_bio
|
||||
h4.team_name
|
||||
a(href="http://floor.is/lava/") Josh Lee
|
||||
p(data-i18n="about.josh_title")
|
||||
| Game Designer
|
||||
p(data-i18n="about.josh_blurb")
|
||||
| Floor Is Lava
|
||||
div(data-i18n="about.josh_title")
|
||||
div(data-i18n="about.josh_blurb")
|
||||
|
||||
a(href="https://soundcloud.com/taking-off")
|
||||
img(src="/images/pages/about/jose_small.png").img-thumbnail
|
||||
.team_bio
|
||||
h4.team_name
|
||||
a(href="https://soundcloud.com/taking-off") Jose Antonini
|
||||
p(data-i18n="about.jose_title")
|
||||
| Music
|
||||
p(data-i18n="about.jose_blurb")
|
||||
| Taking Off
|
||||
div(data-i18n="about.jose_title")
|
||||
div(data-i18n="about.jose_blurb")
|
||||
|
||||
li.row
|
||||
|
||||
|
@ -164,69 +167,22 @@ block content
|
|||
.team_bio
|
||||
h4.team_name
|
||||
a(href="http://retrostylegames.com/") Pavel Konstantinov
|
||||
p(data-i18n="about.retrostyle_title")
|
||||
| Illustration
|
||||
p(data-i18n="about.retrostyle_blurb")
|
||||
| RetroStyle Games
|
||||
div(data-i18n="about.retrostyle_title")
|
||||
div(data-i18n="about.retrostyle_blurb")
|
||||
|
||||
a(href="http://retrostylegames.com/")
|
||||
img(src="/images/pages/about/oleg_small.png").img-thumbnail
|
||||
.team_bio
|
||||
h4.team_name
|
||||
a(href="http://retrostylegames.com/") Oleg Ulyanickiy
|
||||
p(data-i18n="about.retrostyle_title")
|
||||
| Illustration
|
||||
p(data-i18n="about.retrostyle_blurb")
|
||||
| RetroStyle Games
|
||||
|
||||
li.row
|
||||
|
||||
a(href="http://basicer.com/")
|
||||
img(src="/images/pages/about/rob_small.png").img-thumbnail
|
||||
.team_bio
|
||||
h4.team_name
|
||||
a(href="http://basicer.com/") Rob Blanckaert
|
||||
p(data-i18n="about.rob_title")
|
||||
| Compiler Engineer
|
||||
p(data-i18n="about.rob_blurb")
|
||||
| Codes things and stuff.
|
||||
|
||||
img(src="/images/pages/about/josh_c_small.png").img-thumbnail
|
||||
.team_bio
|
||||
h4.team_name
|
||||
| Josh Callebaut
|
||||
p(data-i18n="about.josh_c_title")
|
||||
| Game Designer
|
||||
p(data-i18n="about.josh_c_blurb")
|
||||
| Designs games.
|
||||
div(data-i18n="about.retrostyle_title")
|
||||
div(data-i18n="about.retrostyle_blurb")
|
||||
|
||||
li.row
|
||||
|
||||
img(src="/images/pages/about/carlos_small.png").img-thumbnail
|
||||
.team_bio
|
||||
h4.team_name
|
||||
| Carlos Maia
|
||||
p(data-i18n="about.carlos_title")
|
||||
| Region Manager, Brazil
|
||||
p(data-i18n="about.carlos_blurb")
|
||||
| Celery Man
|
||||
h4.team_name Carlos Maia
|
||||
div(data-i18n="about.carlos_title")
|
||||
div(data-i18n="about.carlos_blurb")
|
||||
|
||||
img(src="/images/pages/about/maka_small.png").img-thumbnail
|
||||
.team_bio
|
||||
h4.team_name
|
||||
| Michael 'Maka' Gradin
|
||||
p(data-i18n="about.maka_title")
|
||||
| Customer Advocate
|
||||
p(data-i18n="about.maka_blurb")
|
||||
| Storyteller
|
||||
|
||||
li.row
|
||||
|
||||
img(src="/images/pages/about/robin_small.png").img-thumbnail
|
||||
.team_bio
|
||||
h4.team_name
|
||||
| Robin Yang
|
||||
p(data-i18n="about.robin_title")
|
||||
| UX Design & Research
|
||||
p(data-i18n="about.robin_blurb")
|
||||
| Scaffolding
|
|
@ -49,6 +49,8 @@ block content
|
|||
ul
|
||||
li
|
||||
a(href="/admin/analytics/subscriptions") Subscriptions
|
||||
li
|
||||
a(href="/admin/design-elements") Design Elements
|
||||
|
||||
if me.isAdmin()
|
||||
hr
|
||||
|
|
458
app/templates/admin/design-elements-view.jade
Normal file
458
app/templates/admin/design-elements-view.jade
Normal file
|
@ -0,0 +1,458 @@
|
|||
.well.container-fluid
|
||||
h1 Bootstrap CSS
|
||||
|
||||
.row
|
||||
.col-sm-6
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#tables.panel-title(href="#tables") Tables
|
||||
|
||||
.panel-body
|
||||
mixin table-content
|
||||
tr
|
||||
th #
|
||||
th First Name
|
||||
th Last Name
|
||||
th Username
|
||||
tr
|
||||
th 1
|
||||
td Mark
|
||||
td Otto
|
||||
td @mdo
|
||||
tr
|
||||
th 2
|
||||
td Jacob
|
||||
td Thornton
|
||||
td @fat
|
||||
tr
|
||||
th 3
|
||||
td Larry
|
||||
td the Bird
|
||||
td @twitter
|
||||
|
||||
h3 Basic
|
||||
table.table
|
||||
+table-content
|
||||
|
||||
h3 Bordered
|
||||
table.table.table-bordered
|
||||
+table-content
|
||||
|
||||
h3 Striped
|
||||
table.table.table-striped
|
||||
+table-content
|
||||
|
||||
.col-sm-6
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#tables.panel-title(href="#tables") Tables
|
||||
|
||||
.panel-body
|
||||
|
||||
h3 Hover
|
||||
table.table.table-hover
|
||||
+table-content
|
||||
|
||||
h3 Condensed
|
||||
table.table.table-condensed
|
||||
+table-content
|
||||
|
||||
h3 Context
|
||||
table.table
|
||||
tr.active
|
||||
td Active
|
||||
tr.success
|
||||
td Success
|
||||
tr.info
|
||||
td Info
|
||||
tr.warning
|
||||
td Warning
|
||||
tr.danger
|
||||
td Danger
|
||||
|
||||
.col-sm-3
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#headers.panel-title(href="#headers") Headers
|
||||
|
||||
.panel-body
|
||||
h1 Header 1
|
||||
small.spl secondary text
|
||||
h2 Header 2
|
||||
small.spl secondary text
|
||||
h3 Header 3
|
||||
small.spl secondary text
|
||||
h4 Header 4
|
||||
small.spl secondary text
|
||||
h5 Header 5
|
||||
small.spl secondary text
|
||||
h6 Header 6
|
||||
small.spl secondary text
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#user-input.panel-title(href="#user-input") User input
|
||||
|
||||
.panel-body
|
||||
kbd ctrl + ,
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#horizontal-rule.panel-title(href="#horizontal-rule") Horizontal Rule
|
||||
|
||||
.panel-body
|
||||
div Text above
|
||||
hr
|
||||
div Text below
|
||||
|
||||
.col-sm-3
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#forms.panel-title(href="#forms") Forms
|
||||
|
||||
.panel-body
|
||||
h3 Default
|
||||
.form
|
||||
.form-group
|
||||
label.control-label Input
|
||||
input.form-control
|
||||
|
||||
.form-group
|
||||
label.control-label Textarea
|
||||
textarea.form-control
|
||||
.help-block Help block
|
||||
|
||||
.form-group
|
||||
label.control-label Select
|
||||
select.form-control
|
||||
option Option 1
|
||||
option Option 2
|
||||
|
||||
.form-group
|
||||
label Disabled
|
||||
input.form-control(disabled=true)
|
||||
|
||||
.form-group.has-error
|
||||
label.control-label Validation error
|
||||
input.form-control
|
||||
|
||||
.form-group
|
||||
label Large input
|
||||
input.form-control.input-lg
|
||||
|
||||
.form-group
|
||||
label Small input
|
||||
input.form-control.input-sm
|
||||
|
||||
.col-sm-3
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#buttons.panel-title(href="#buttons") Buttons
|
||||
|
||||
.panel-body
|
||||
div
|
||||
button.btn.btn-default Default
|
||||
span.spr
|
||||
button.btn.btn-primary Primary
|
||||
span.spr
|
||||
button.btn.btn-success Success
|
||||
span.spr
|
||||
button.btn.btn-info Info
|
||||
span.spr
|
||||
button.btn.btn-warning Warning
|
||||
span.spr
|
||||
button.btn.btn-danger Danger
|
||||
span.spr
|
||||
button.btn.btn-default(disabled=true) Disabled
|
||||
|
||||
|
||||
hr
|
||||
|
||||
div
|
||||
button.btn.btn-default.btn-lg Large
|
||||
span.spr
|
||||
button.btn.btn-default Default
|
||||
span.spr
|
||||
button.btn.btn-default.btn-sm Small
|
||||
span.spr
|
||||
button.btn.btn-default.btn-xs Extra small
|
||||
|
||||
hr
|
||||
|
||||
div
|
||||
button.btn.btn-default.btn-illustrated Default illustrated
|
||||
span.spr
|
||||
button.btn.btn-primary.btn-illustrated Primary illustrated
|
||||
span.spr
|
||||
button.btn.btn-success.btn-illustrated Success illustrated
|
||||
span.spr
|
||||
button.btn.btn-info.btn-illustrated Info illustrated
|
||||
span.spr
|
||||
button.btn.btn-warning.btn-illustrated Warning illustrated
|
||||
span.spr
|
||||
button.btn.btn-danger.btn-illustrated Danger illustrated
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#contextual-text.panel-title(href="#contextual-text") Contextual text
|
||||
|
||||
.panel-body
|
||||
p.text-muted Muted text
|
||||
p.text-primary Primary text
|
||||
p.text-success Success text
|
||||
p.text-info Info text
|
||||
p.text-warning Warning text
|
||||
p.text-danger Danger text
|
||||
|
||||
h1 Bootstrap Components
|
||||
|
||||
.row
|
||||
.col-sm-3
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#dropdowns.panel-title(href="#dropdowns") Dropdowns
|
||||
|
||||
.panel-body
|
||||
.btn-group
|
||||
button.btn.btn-default.dropdown-toggle(data-toggle="dropdown") Dropdown Button
|
||||
ul.dropdown-menu
|
||||
li
|
||||
a Action
|
||||
li
|
||||
a Another action
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#navs.panel-title(href="#navs") Navs
|
||||
|
||||
.panel-body
|
||||
ul.nav.nav-tabs
|
||||
li.active
|
||||
a Home
|
||||
li
|
||||
a Profile
|
||||
li
|
||||
a Message
|
||||
|
||||
hr
|
||||
|
||||
ul.nav.nav-pills
|
||||
li.active
|
||||
a Home
|
||||
li
|
||||
a Profile
|
||||
li
|
||||
a Message
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#navbars.panel-title(href="#navbars") Navbars
|
||||
|
||||
.panel-body
|
||||
nav.navbar.navbar-default
|
||||
.container-fluid
|
||||
.navbar-header
|
||||
button.navbar-toggle.collapsed(data-toggle="collapse", data-target="#main-nav")
|
||||
span.glyphicon.glyphicon-option-horizontal
|
||||
a.navbar-brand Brand
|
||||
|
||||
.collapse.navbar-collapse#main-nav
|
||||
ul.nav.navbar-nav
|
||||
li.active
|
||||
a Link
|
||||
li
|
||||
a Link
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#breadcrumbs.panel-title(href="#breadcrumbs") Breadcrumbs
|
||||
|
||||
.panel-body
|
||||
ol.breadcrumb
|
||||
li Home
|
||||
li Library
|
||||
li.active Data
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#labels.panel-title(href="#labels") Labels
|
||||
.panel-body
|
||||
span.label.label-default default
|
||||
span.spr
|
||||
span.label.label-primary primary
|
||||
span.spr
|
||||
span.label.label-success success
|
||||
span.spr
|
||||
span.label.label-info info
|
||||
span.spr
|
||||
span.label.label-warning warning
|
||||
span.spr
|
||||
span.label.label-danger danger
|
||||
|
||||
.col-sm-3
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#alerts.panel-title(href="#alerts") Alerts
|
||||
|
||||
.panel-body
|
||||
.alert.alert-success Success
|
||||
.alert.alert-info Info
|
||||
.alert.alert-warning Warning
|
||||
.alert.alert-danger Danger
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#progress-bars.panel-title(href="#progress-bars") Progress Bars
|
||||
|
||||
.panel-body
|
||||
strong Default
|
||||
.progress
|
||||
.progress-bar(style="width: 50%")
|
||||
|
||||
strong Striped Active
|
||||
.progress.progress-striped.active
|
||||
.progress-bar(style="width: 50%")
|
||||
|
||||
strong Contextual
|
||||
.progress
|
||||
.progress-bar.progress-bar-success(style="width: 25%") Success
|
||||
.progress-bar.progress-bar-info(style="width: 25%") Info
|
||||
.progress-bar.progress-bar-warning(style="width: 25%") Warning
|
||||
.progress-bar.progress-bar-danger(style="width: 25%") Danger
|
||||
|
||||
.col-sm-3
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#list-groups.panel-title(href="#list-groups") List Groups
|
||||
|
||||
.panel-body
|
||||
ul.list-group
|
||||
li.list-group-item List group item 1
|
||||
li.list-group-item List group item 2
|
||||
li.list-group-item List group item 3
|
||||
|
||||
.panel.panel-info
|
||||
.panel-heading
|
||||
.panel-title Info Panel w/Title
|
||||
.panel-body And body
|
||||
.panel-footer And footer
|
||||
|
||||
.panel.panel-primary
|
||||
.panel-heading
|
||||
.panel-title Primary Panel w/Title
|
||||
.panel-body And body
|
||||
.panel-footer And footer
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
.panel-title Default Panel w/Title
|
||||
.panel-body And body
|
||||
.panel-footer And footer
|
||||
|
||||
.col-sm-3
|
||||
.panel.panel-success
|
||||
.panel-heading
|
||||
.panel-title Success Panel w/Title
|
||||
.panel-body And body
|
||||
.panel-footer And footer
|
||||
|
||||
.panel.panel-warning
|
||||
.panel-heading
|
||||
.panel-title warning Panel w/Title
|
||||
.panel-body And body
|
||||
.panel-footer And footer
|
||||
|
||||
.panel.panel-danger
|
||||
.panel-heading
|
||||
.panel-title Danger Panel w/Title
|
||||
.panel-body And body
|
||||
.panel-footer And footer
|
||||
|
||||
.col-sm-3
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#wells.panel-title(href="#wells") Wells
|
||||
|
||||
.panel-body
|
||||
.well Well!
|
||||
.well.well-lg Large well!
|
||||
.well.well-sm Small well!
|
||||
|
||||
h1 Bootstrap JavaScript
|
||||
|
||||
.row
|
||||
.col-sm-6
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#modals.panel-title(href="#modals") Default Modal
|
||||
|
||||
.panel-body(style="background: lightgrey")#modal-1
|
||||
include /templates/core/modal-base
|
||||
|
||||
.col-sm-6
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a.panel-title Plain Modal
|
||||
|
||||
.panel-body(style="background: lightgrey")#modal-2
|
||||
include /templates/core/modal-base
|
||||
|
||||
.row
|
||||
.col-sm-3
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#tooltips.panel-title(href="#tooltips") Tooltips
|
||||
|
||||
.panel-body
|
||||
button#tooltip.btn.btn-default(title="tooltip text!", data-placement="right", data-trigger="click") Button w/Tooltip
|
||||
|
||||
.col-sm-3
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#popovers.panel-title(href="#popovers") Popovers
|
||||
|
||||
.panel-body
|
||||
button#popover.btn.btn-default(title="Popover title" data-content="Popover content" data-trigger="click") Button w/Popover
|
||||
|
||||
|
||||
h1 jQuery UI
|
||||
|
||||
.row
|
||||
.col-sm-3
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#autocomplete.panel-title(href="#autocomplete") Autocomplete
|
||||
|
||||
.panel-body
|
||||
input#tags
|
||||
|
||||
.col-sm-3
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#slider.panel-title(href="#slider") Slider
|
||||
|
||||
.panel-body
|
||||
#slider-example
|
||||
|
||||
h1 Other
|
||||
|
||||
.row
|
||||
.col-sm-3
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#gems.panel-title(href="#gems") Gems
|
||||
.panel-body
|
||||
.gem.gem-20
|
||||
.gem.gem-25
|
||||
.gem.gem-30
|
||||
.gem.gem-40
|
||||
.gem.gem-60
|
||||
|
||||
.col-sm-3
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
a#no-border-image.panel-title(href="#no-border-image") No Border Image
|
||||
|
||||
.panel-body
|
|
@ -78,11 +78,14 @@ block content
|
|||
br
|
||||
|
||||
p.text-center#price-form-group
|
||||
strong
|
||||
span(data-i18n="account_prepaid.purchase_total")
|
||||
span.spr : #{view.numberOfStudents}
|
||||
span(data-i18n="courses.enrollments")
|
||||
span.spl x $#{(view.pricePerStudent/100).toFixed(2)} = #{view.getPriceString()}
|
||||
if view.numberOfStudentsIsValid()
|
||||
strong
|
||||
span(data-i18n="account_prepaid.purchase_total")
|
||||
span.spr : #{view.numberOfStudents}
|
||||
span(data-i18n="courses.enrollments")
|
||||
span.spl x $#{(view.pricePerStudent/100).toFixed(2)} = #{view.getPriceString()}
|
||||
else
|
||||
strong Invalid number of students
|
||||
|
||||
p.text-center
|
||||
button#purchase-btn.btn.btn-lg.btn-success.uppercase(data-i18n="courses.purchase_now")
|
||||
|
|
|
@ -31,9 +31,6 @@ block content
|
|||
span.spl(data-i18n="teachers_survey.contact_2")
|
||||
else
|
||||
p(data-i18n="teachers_survey.description_1")
|
||||
p
|
||||
strong.spr Hour of Code Special!
|
||||
span Complete the survey by December 31st and enroll all your students in the paid courses for 2 months.
|
||||
p
|
||||
span.spr(data-i18n="teachers_survey.description_1b")
|
||||
a(href='/teachers', data-i18n="teachers_survey.description_2")
|
||||
|
|
|
@ -6,6 +6,9 @@ requireUtils = require 'lib/requireUtils'
|
|||
DEMO_REQUIRE_PREFIX = 'test/demo/'
|
||||
DEMO_URL_PREFIX = '/demo/'
|
||||
|
||||
require 'vendor/jasmine-bundle'
|
||||
require 'demo-app'
|
||||
|
||||
###
|
||||
What are demo files?
|
||||
|
||||
|
@ -33,24 +36,8 @@ module.exports = DemoView = class DemoView extends RootView
|
|||
constructor: (options, @subPath='') ->
|
||||
super(options)
|
||||
@subPath = @subPath[1..] if @subPath[0] is '/'
|
||||
@loadDemoingLibs() unless DemoView.loaded
|
||||
|
||||
loadDemoingLibs: ->
|
||||
DemoView.loaded = true
|
||||
@queue = new createjs.LoadQueue()
|
||||
@queue.on('complete', @scriptsLoaded, @)
|
||||
window.jasmine = {} # so that mock-ajax properly loads. It expects jasmine to be loaded
|
||||
for f in ['mock-ajax', 'demo-app']
|
||||
@queue.loadFile({
|
||||
src: "/javascripts/#{f}.js"
|
||||
type: createjs.LoadQueue.JAVASCRIPT
|
||||
})
|
||||
|
||||
scriptsLoaded: ->
|
||||
@initDemoFiles()
|
||||
@children = requireUtils.parseImmediateChildren(@demoFiles, @subPath, DEMO_REQUIRE_PREFIX, DEMO_URL_PREFIX)
|
||||
@render()
|
||||
@runDemo()
|
||||
|
||||
# RENDER DATA
|
||||
|
||||
|
@ -61,6 +48,10 @@ module.exports = DemoView = class DemoView extends RootView
|
|||
parts = @subPath.split('/')
|
||||
c.currentFolder = parts[parts.length-1] or parts[parts.length-2] or 'All'
|
||||
c
|
||||
|
||||
afterInsert: ->
|
||||
super()
|
||||
@runDemo()
|
||||
|
||||
# RUNNING DEMOS
|
||||
|
||||
|
@ -82,6 +73,7 @@ module.exports = DemoView = class DemoView extends RootView
|
|||
jasmine.Ajax.install()
|
||||
view = demoFunc()
|
||||
return unless view
|
||||
@ranDemo = true
|
||||
if view instanceof ModalView
|
||||
@openModalView(view)
|
||||
else
|
||||
|
@ -97,4 +89,5 @@ module.exports = DemoView = class DemoView extends RootView
|
|||
destroy: ->
|
||||
# hack to get jasmine tests to properly run again on clicking links, and make sure if you
|
||||
# leave this page (say, back to the main site) that test stuff doesn't follow you.
|
||||
document.location.reload()
|
||||
if @ranDemo
|
||||
document.location.reload()
|
||||
|
|
46
app/views/admin/DesignElementsView.coffee
Normal file
46
app/views/admin/DesignElementsView.coffee
Normal file
|
@ -0,0 +1,46 @@
|
|||
RootView = require 'views/core/RootView'
|
||||
template = require 'templates/admin/design-elements-view'
|
||||
|
||||
module.exports = class DesignElementsView extends RootView
|
||||
id: 'design-elements-view'
|
||||
template: template
|
||||
|
||||
afterInsert: ->
|
||||
super()
|
||||
# hack to get hash links to work. Make this general?
|
||||
hash = document.location.hash
|
||||
document.location.hash = ''
|
||||
setTimeout((-> document.location.hash = hash), 10)
|
||||
@$('#modal-2').find('.background-wrapper').addClass('plain')
|
||||
if hash is '#tooltips'
|
||||
setTimeout((=> @$('#tooltip').tooltip('show')), 20)
|
||||
if hash is '#popovers'
|
||||
setTimeout((=> @$('#popover').popover('show')), 20)
|
||||
tags = [
|
||||
"ActionScript",
|
||||
"AppleScript",
|
||||
"Asp",
|
||||
"BASIC",
|
||||
"C",
|
||||
"C++",
|
||||
"Clojure",
|
||||
"COBOL",
|
||||
"ColdFusion",
|
||||
"Erlang",
|
||||
"Fortran",
|
||||
"Groovy",
|
||||
"Haskell",
|
||||
"Java",
|
||||
"JavaScript",
|
||||
"Lisp",
|
||||
"Perl",
|
||||
"PHP",
|
||||
"Python",
|
||||
"Ruby",
|
||||
"Scala",
|
||||
"Scheme"
|
||||
]
|
||||
@$('#tags').autocomplete({source: tags})
|
||||
if hash is '#autocomplete'
|
||||
setTimeout((=> @$('#tags').autocomplete("search", "t")), 20)
|
||||
@$('#slider-example').slider()
|
|
@ -72,10 +72,12 @@ module.exports = class PurchaseCoursesView extends RootView
|
|||
|
||||
updatePrice: ->
|
||||
@renderSelectors '#price-form-group'
|
||||
|
||||
numberOfStudentsIsValid: -> @numberOfStudents > 0 and @numberOfStudents < 100000
|
||||
|
||||
onClickPurchaseButton: ->
|
||||
return @openModalView new AuthModal() if me.isAnonymous()
|
||||
if @numberOfStudents < 1 or not _.isFinite(@numberOfStudents)
|
||||
unless @numberOfStudentsIsValid()
|
||||
alert("Please enter the maximum number of students needed for your class.")
|
||||
return
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@ module.exports = class ThangComponentConfigView extends CocoView
|
|||
'acceleration': nodes.AccelerationNode
|
||||
'thang-type': nodes.ThangTypeNode
|
||||
'item-thang-type': nodes.ItemThangTypeNode
|
||||
'solutions': SolutionsNode
|
||||
|
||||
@editThangTreema = @$el.find('.treema').treema treemaOptions
|
||||
@editThangTreema.build()
|
||||
|
@ -94,3 +95,30 @@ module.exports = class ThangComponentConfigView extends CocoView
|
|||
|
||||
class ComponentConfigNode extends TreemaObjectNode
|
||||
nodeDescription: 'Component Property'
|
||||
|
||||
class SolutionsNode extends TreemaArrayNode
|
||||
buildValueForDisplay: (valEl, data) ->
|
||||
btn = $('<button class="btn btn-default btn-xs">Fill defaults</button>')
|
||||
btn.on('click', @onClickFillDefaults)
|
||||
valEl.append(btn)
|
||||
|
||||
onClickFillDefaults: (e) =>
|
||||
e.preventDefault()
|
||||
sources = {}
|
||||
if source = @parent.data.source
|
||||
sources.javascript = source
|
||||
|
||||
sources = { javascript: @parent.data.source }
|
||||
_.extend sources, @parent.data.languages or {}
|
||||
solutions = _.clone(@data)
|
||||
for language in _.keys(sources)
|
||||
source = sources[language]
|
||||
solution = _.findWhere(solutions, {language: language})
|
||||
continue if solution
|
||||
solutions.push({
|
||||
source: source
|
||||
language: language
|
||||
passes: true
|
||||
})
|
||||
|
||||
@set('/', solutions)
|
|
@ -130,7 +130,7 @@ exports.config =
|
|||
|
||||
#- test, demo libraries
|
||||
'javascripts/app/tests.js': regJoin('^test/app/')
|
||||
'javascripts/demo-app.js': regJoin('^test/demo/')
|
||||
'javascripts/app/demo-app.js': regJoin('^test/demo/')
|
||||
|
||||
#- More output files are generated at the below
|
||||
|
||||
|
|
|
@ -22,5 +22,5 @@ module.exports.templates =
|
|||
plain_text_email: 'tem_85UvKDCCNPXsFckERTig6Y'
|
||||
next_steps_email: 'tem_RDHhTG5inXQi8pthyqWr5D'
|
||||
course_invite_email: 'tem_u6D2EFWYC5Ptk38bSykjsU'
|
||||
teacher_free_trial: 'tem_sqdvLCZRwoDQc6jAf5RrQE'
|
||||
teacher_free_trial: 'tem_R7d9Hpoba9SceQNiYSXBak'
|
||||
teacher_free_trial_hoc: 'tem_4ZSY9wsA9Qwn4wBFmZgPdc'
|
||||
|
|
|
@ -21,32 +21,14 @@ TrialRequestSchema.pre 'save', (next) ->
|
|||
prepaid.save (err) =>
|
||||
if err
|
||||
log.error "Trial request prepaid creation error: #{err}"
|
||||
|
||||
# Special HoC trial: Add 500 course headcount with end date
|
||||
endDate = new Date()
|
||||
endDate.setUTCMonth(endDate.getUTCMonth() + 2)
|
||||
prepaid = new Prepaid
|
||||
creator: @get('applicant')
|
||||
type: 'course'
|
||||
maxRedeemers: 500
|
||||
properties:
|
||||
endDate: endDate
|
||||
trialRequestID: @get('_id')
|
||||
prepaid.save (err) =>
|
||||
if err
|
||||
log.error "Trial request prepaid creation error: #{err}"
|
||||
next()
|
||||
next()
|
||||
|
||||
TrialRequestSchema.post 'save', (doc) ->
|
||||
if doc.get('status') is 'approved'
|
||||
endDate = new Date()
|
||||
endDate.setUTCMonth(endDate.getUTCMonth() + 2)
|
||||
emailParams =
|
||||
recipient:
|
||||
address: doc.get('properties')?.email
|
||||
email_id: sendwithus.templates.teacher_free_trial_hoc
|
||||
email_data:
|
||||
endDate: endDate.toDateString()
|
||||
email_id: sendwithus.templates.teacher_free_trial
|
||||
sendwithus.api.send emailParams, (err, result) =>
|
||||
log.error "sendwithus trial request approved error: #{err}, result: #{result}" if err
|
||||
|
||||
|
|
|
@ -129,15 +129,11 @@ describe 'Trial Requests', ->
|
|||
Prepaid.find {'properties.trialRequestID': doc.get('_id')}, (err, prepaids) ->
|
||||
expect(err).toBeNull()
|
||||
return done(err) if err
|
||||
expect(prepaids.length).toEqual(2)
|
||||
for prepaid in prepaids
|
||||
expect(prepaid.get('type')).toEqual('course')
|
||||
expect(prepaid.get('creator')).toEqual(user.get('_id'))
|
||||
if prepaid.get('properties').endDate
|
||||
expect(prepaid.get('maxRedeemers')).toEqual(500)
|
||||
expect(prepaid.get('properties').endDate).toBeGreaterThan(new Date())
|
||||
else
|
||||
expect(prepaid.get('maxRedeemers')).toEqual(2)
|
||||
expect(prepaids.length).toEqual(1)
|
||||
prepaid = prepaids[0]
|
||||
expect(prepaid.get('type')).toEqual('course')
|
||||
expect(prepaid.get('creator')).toEqual(user.get('_id'))
|
||||
expect(prepaid.get('maxRedeemers')).toEqual(2)
|
||||
done()
|
||||
|
||||
it 'Deny trial request', (done) ->
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
CocoModel = require 'models/CocoModel'
|
||||
RootView = require 'views/kinds/RootView'
|
||||
utils = require 'lib/utils'
|
||||
RootView = require 'views/core/RootView'
|
||||
utils = require 'core/utils'
|
||||
Achievement = require 'models/Achievement'
|
||||
EarnedAchievement = require 'models/EarnedAchievement'
|
||||
fixtures = require '../../fixtures/achievements'
|
||||
|
|
File diff suppressed because one or more lines are too long
47
test/demo/views/common/level-session.fixture.coffee
Normal file
47
test/demo/views/common/level-session.fixture.coffee
Normal file
File diff suppressed because one or more lines are too long
21
test/demo/views/common/level.fixture.coffee
Normal file
21
test/demo/views/common/level.fixture.coffee
Normal file
|
@ -0,0 +1,21 @@
|
|||
module.exports = {
|
||||
"_id": "53c997066567c600002a43d0",
|
||||
"name": "Dungeon Arena",
|
||||
"icon": "db/level/53173f76c269d400000543c2/11_dungeon.png",
|
||||
"banner": "db/level/53173f76c269d400000543c2/dungeon_arena.png",
|
||||
"employerDescription": "Players:\n* Attempt to destroy the enemy base.\n* Choose and control heroes to attack with.\n* Choose which types of lesser units to build and have limited control over them.\n* Try to write strategies that counter other enemy strategies.\n* Play on a small map.",
|
||||
"systems": [],
|
||||
"thangs": [],
|
||||
"scripts": [],
|
||||
"documentation": {
|
||||
"generalArticles": [],
|
||||
"specificArticles": []
|
||||
},
|
||||
"description": "This level is indescribably flarmy!",
|
||||
"version": {
|
||||
"minor": 0,
|
||||
"major": 0,
|
||||
"isLatestMajor": true,
|
||||
"isLatestMinor": true
|
||||
}
|
||||
}
|
|
@ -155,6 +155,6 @@ response =
|
|||
module.exports = ->
|
||||
view = new AddThangComponentsModal({skipOriginals:['52437c851d9e25b8dc000008']}) # FollowsNearest original
|
||||
console.log jasmine.Ajax.requests.all()
|
||||
jasmine.Ajax.requests.mostRecent().response({status: 200, responseText: JSON.stringify(response)})
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({status: 200, responseText: JSON.stringify(response)})
|
||||
view.render()
|
||||
return view
|
Loading…
Reference in a new issue