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
|
||||
a(href='mailto:team@codecombat.com') team@codecombat.com
|
||||
span.spl for more information.
|
||||
|
||||
|
||||
.panel-body
|
||||
if view.recipientSubs.nextPaymentAmount > 0 && view.recipientSubs.sponsorSub
|
||||
h4(data-i18n="account.next_payment")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
extends /templates/base
|
||||
|
||||
block header
|
||||
if campaign.loading
|
||||
if view.campaign.loading
|
||||
nav.navbar.navbar-default(role='navigation')#campaign-editor-top-nav
|
||||
.container-fluid
|
||||
ul.nav.navbar-nav
|
||||
|
|
|
@ -5,8 +5,8 @@ block modal-header-content
|
|||
|
||||
block modal-body-content
|
||||
div#normal-view
|
||||
each sizeObject, size in presetSizes
|
||||
each preset in presets
|
||||
each sizeObject, size in view.presetSizes
|
||||
each preset in view.presets
|
||||
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.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?()
|
||||
@recipientSubs.update => @render?()
|
||||
|
||||
getRenderData: ->
|
||||
c = super()
|
||||
c.emailValidator = @emailValidator
|
||||
c
|
||||
|
||||
# Personal Subscriptions
|
||||
|
||||
onClickStartSubscription: (e) ->
|
||||
|
|
|
@ -144,11 +144,6 @@ module.exports = class CampaignEditorView extends RootView
|
|||
|
||||
super()
|
||||
|
||||
getRenderData: ->
|
||||
c = super()
|
||||
c.campaign = @campaign
|
||||
c
|
||||
|
||||
onClickPatches: (e) ->
|
||||
@patchesView = @insertSubView(new PatchesView(@campaign), @$el.find('.patches-view'))
|
||||
@patchesView.load()
|
||||
|
|
|
@ -635,11 +635,5 @@ module.exports = class GenerateTerrainModal extends ModalView
|
|||
getRandomThang: (thangList) ->
|
||||
return thangList[_.random(0, thangList.length-1)]
|
||||
|
||||
getRenderData: ->
|
||||
c = super()
|
||||
c.presets = presets
|
||||
c.presetSizes = presetSizes
|
||||
c
|
||||
|
||||
onHidden: ->
|
||||
location.reload() if @reloadOnClose
|
||||
|
|
|
@ -31,11 +31,6 @@ module.exports = class SpellPaletteEntryView extends CocoView
|
|||
@doc.initialHTML = @docFormatter.formatPopover()
|
||||
@aceEditors = []
|
||||
|
||||
getRenderData: ->
|
||||
c = super()
|
||||
c.doc = @doc
|
||||
c
|
||||
|
||||
afterRender: ->
|
||||
super()
|
||||
@$el.addClass(@doc.type)
|
||||
|
|
Loading…
Reference in a new issue