From b7ba677b00b0eca55c5569fe48e3f300c54ea562 Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Sat, 26 Dec 2015 14:21:06 +0000 Subject: [PATCH] Use view in template --- app/templates/account/subscription-view.jade | 2 +- app/templates/editor/campaign/campaign-editor-view.jade | 2 +- .../editor/level/modal/generate-terrain-modal.jade | 4 ++-- app/templates/play/level/tome/spell_palette_entry.jade | 2 +- app/views/account/SubscriptionView.coffee | 5 ----- app/views/editor/campaign/CampaignEditorView.coffee | 5 ----- app/views/editor/level/modals/GenerateTerrainModal.coffee | 6 ------ app/views/play/level/tome/SpellPaletteEntryView.coffee | 5 ----- 8 files changed, 5 insertions(+), 26 deletions(-) diff --git a/app/templates/account/subscription-view.jade b/app/templates/account/subscription-view.jade index 45f25e953..c3f61d7de 100644 --- a/app/templates/account/subscription-view.jade +++ b/app/templates/account/subscription-view.jade @@ -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") diff --git a/app/templates/editor/campaign/campaign-editor-view.jade b/app/templates/editor/campaign/campaign-editor-view.jade index 54176c7a7..b65cc8cdc 100644 --- a/app/templates/editor/campaign/campaign-editor-view.jade +++ b/app/templates/editor/campaign/campaign-editor-view.jade @@ -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 diff --git a/app/templates/editor/level/modal/generate-terrain-modal.jade b/app/templates/editor/level/modal/generate-terrain-modal.jade index f522ba5b5..ad696b1e6 100644 --- a/app/templates/editor/level/modal/generate-terrain-modal.jade +++ b/app/templates/editor/level/modal/generate-terrain-modal.jade @@ -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 diff --git a/app/templates/play/level/tome/spell_palette_entry.jade b/app/templates/play/level/tome/spell_palette_entry.jade index 5dfb2ae4f..40021508e 100644 --- a/app/templates/play/level/tome/spell_palette_entry.jade +++ b/app/templates/play/level/tome/spell_palette_entry.jade @@ -1 +1 @@ -span.doc-title(data-property-name=doc.name)= doc.title \ No newline at end of file +span.doc-title(data-property-name=view.doc.name)= view.doc.title diff --git a/app/views/account/SubscriptionView.coffee b/app/views/account/SubscriptionView.coffee index 41ace9c30..cc3367169 100644 --- a/app/views/account/SubscriptionView.coffee +++ b/app/views/account/SubscriptionView.coffee @@ -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) -> diff --git a/app/views/editor/campaign/CampaignEditorView.coffee b/app/views/editor/campaign/CampaignEditorView.coffee index fab90f981..503c4cc20 100644 --- a/app/views/editor/campaign/CampaignEditorView.coffee +++ b/app/views/editor/campaign/CampaignEditorView.coffee @@ -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() diff --git a/app/views/editor/level/modals/GenerateTerrainModal.coffee b/app/views/editor/level/modals/GenerateTerrainModal.coffee index e44b49bd1..4575961a5 100644 --- a/app/views/editor/level/modals/GenerateTerrainModal.coffee +++ b/app/views/editor/level/modals/GenerateTerrainModal.coffee @@ -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 diff --git a/app/views/play/level/tome/SpellPaletteEntryView.coffee b/app/views/play/level/tome/SpellPaletteEntryView.coffee index 9cdc15491..31f75fcaf 100644 --- a/app/views/play/level/tome/SpellPaletteEntryView.coffee +++ b/app/views/play/level/tome/SpellPaletteEntryView.coffee @@ -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)