mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 09:35:39 -05:00
Use view in template
This commit is contained in:
parent
bfeee90f51
commit
b7ba677b00
8 changed files with 5 additions and 26 deletions
|
@ -137,7 +137,7 @@ block content
|
||||||
span.spr Managed subscriptions are discontinued. Please contact
|
span.spr Managed subscriptions are discontinued. Please contact
|
||||||
a(href='mailto:team@codecombat.com') team@codecombat.com
|
a(href='mailto:team@codecombat.com') team@codecombat.com
|
||||||
span.spl for more information.
|
span.spl for more information.
|
||||||
|
|
||||||
.panel-body
|
.panel-body
|
||||||
if view.recipientSubs.nextPaymentAmount > 0 && view.recipientSubs.sponsorSub
|
if view.recipientSubs.nextPaymentAmount > 0 && view.recipientSubs.sponsorSub
|
||||||
h4(data-i18n="account.next_payment")
|
h4(data-i18n="account.next_payment")
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
extends /templates/base
|
extends /templates/base
|
||||||
|
|
||||||
block header
|
block header
|
||||||
if campaign.loading
|
if view.campaign.loading
|
||||||
nav.navbar.navbar-default(role='navigation')#campaign-editor-top-nav
|
nav.navbar.navbar-default(role='navigation')#campaign-editor-top-nav
|
||||||
.container-fluid
|
.container-fluid
|
||||||
ul.nav.navbar-nav
|
ul.nav.navbar-nav
|
||||||
|
|
|
@ -5,8 +5,8 @@ block modal-header-content
|
||||||
|
|
||||||
block modal-body-content
|
block modal-body-content
|
||||||
div#normal-view
|
div#normal-view
|
||||||
each sizeObject, size in presetSizes
|
each sizeObject, size in view.presetSizes
|
||||||
each preset in presets
|
each preset in view.presets
|
||||||
a(href="#")
|
a(href="#")
|
||||||
div.choose-option(data-preset-type=preset.type, data-preset-size=size, style="background:url(/images/pages/editor/level/preset_"+preset.type+"_"+size+".jpg) no-repeat center; background-size: cover")
|
div.choose-option(data-preset-type=preset.type, data-preset-size=size, style="background:url(/images/pages/editor/level/preset_"+preset.type+"_"+size+".jpg) no-repeat center; background-size: cover")
|
||||||
div.preset-size.name-label.capitalize
|
div.preset-size.name-label.capitalize
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
span.doc-title(data-property-name=doc.name)= doc.title
|
span.doc-title(data-property-name=view.doc.name)= view.doc.title
|
||||||
|
|
|
@ -53,11 +53,6 @@ module.exports = class SubscriptionView extends RootView
|
||||||
@personalSub.update => @render?()
|
@personalSub.update => @render?()
|
||||||
@recipientSubs.update => @render?()
|
@recipientSubs.update => @render?()
|
||||||
|
|
||||||
getRenderData: ->
|
|
||||||
c = super()
|
|
||||||
c.emailValidator = @emailValidator
|
|
||||||
c
|
|
||||||
|
|
||||||
# Personal Subscriptions
|
# Personal Subscriptions
|
||||||
|
|
||||||
onClickStartSubscription: (e) ->
|
onClickStartSubscription: (e) ->
|
||||||
|
|
|
@ -144,11 +144,6 @@ module.exports = class CampaignEditorView extends RootView
|
||||||
|
|
||||||
super()
|
super()
|
||||||
|
|
||||||
getRenderData: ->
|
|
||||||
c = super()
|
|
||||||
c.campaign = @campaign
|
|
||||||
c
|
|
||||||
|
|
||||||
onClickPatches: (e) ->
|
onClickPatches: (e) ->
|
||||||
@patchesView = @insertSubView(new PatchesView(@campaign), @$el.find('.patches-view'))
|
@patchesView = @insertSubView(new PatchesView(@campaign), @$el.find('.patches-view'))
|
||||||
@patchesView.load()
|
@patchesView.load()
|
||||||
|
|
|
@ -635,11 +635,5 @@ module.exports = class GenerateTerrainModal extends ModalView
|
||||||
getRandomThang: (thangList) ->
|
getRandomThang: (thangList) ->
|
||||||
return thangList[_.random(0, thangList.length-1)]
|
return thangList[_.random(0, thangList.length-1)]
|
||||||
|
|
||||||
getRenderData: ->
|
|
||||||
c = super()
|
|
||||||
c.presets = presets
|
|
||||||
c.presetSizes = presetSizes
|
|
||||||
c
|
|
||||||
|
|
||||||
onHidden: ->
|
onHidden: ->
|
||||||
location.reload() if @reloadOnClose
|
location.reload() if @reloadOnClose
|
||||||
|
|
|
@ -31,11 +31,6 @@ module.exports = class SpellPaletteEntryView extends CocoView
|
||||||
@doc.initialHTML = @docFormatter.formatPopover()
|
@doc.initialHTML = @docFormatter.formatPopover()
|
||||||
@aceEditors = []
|
@aceEditors = []
|
||||||
|
|
||||||
getRenderData: ->
|
|
||||||
c = super()
|
|
||||||
c.doc = @doc
|
|
||||||
c
|
|
||||||
|
|
||||||
afterRender: ->
|
afterRender: ->
|
||||||
super()
|
super()
|
||||||
@$el.addClass(@doc.type)
|
@$el.addClass(@doc.type)
|
||||||
|
|
Loading…
Reference in a new issue