From 5504c4f922a2f156e4d660fa791d2f76a47c071e Mon Sep 17 00:00:00 2001 From: goldpbear Date: Mon, 11 Dec 2017 09:49:11 -0800 Subject: [PATCH] (hotfix) refactor raingardens-handlebars-helpers.js for static site --- .../js/raingardens-handlebars-helpers.js | 32 ++++++++----------- src/flavors/raingardens/templates/index.html | 1 - 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/src/flavors/raingardens/static/js/raingardens-handlebars-helpers.js b/src/flavors/raingardens/static/js/raingardens-handlebars-helpers.js index e3b3822d42..2e4e80272d 100644 --- a/src/flavors/raingardens/static/js/raingardens-handlebars-helpers.js +++ b/src/flavors/raingardens/static/js/raingardens-handlebars-helpers.js @@ -1,19 +1,13 @@ -/*global Handlebars _ moment */ - -var Shareabouts = Shareabouts || {}; - -(function(NS) { - Handlebars.registerHelper("rain_garden_title", function( - gardenNumber, - gardenName, - ) { - var gardenTitle = ""; - if (gardenName) { - gardenTitle = gardenName; - if (gardenNumber) gardenTitle += " - Rain Garden " + gardenNumber; - } else { - if (gardenNumber) gardenTitle = "Rain Garden " + gardenNumber; - } - return gardenTitle; - }); -})(Shareabouts); +Handlebars.registerHelper("rain_garden_title", function( + gardenNumber, + gardenName, +) { + var gardenTitle = ""; + if (gardenName) { + gardenTitle = gardenName; + if (gardenNumber) gardenTitle += " - Rain Garden " + gardenNumber; + } else { + if (gardenNumber) gardenTitle = "Rain Garden " + gardenNumber; + } + return gardenTitle; +}); diff --git a/src/flavors/raingardens/templates/index.html b/src/flavors/raingardens/templates/index.html index 3be2a76010..0d3cabec37 100644 --- a/src/flavors/raingardens/templates/index.html +++ b/src/flavors/raingardens/templates/index.html @@ -16,7 +16,6 @@ --> {{#block "includes"}} -