From 1c9f07ccfb557128111701b3410b5e4515e25242 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 24 Jun 2013 12:34:22 +1200 Subject: [PATCH] CRM-12887 make it jslint happy http://stackoverflow.com/questions/7357736/jslint-problems-declaring-variables --- templates/CRM/Contribute/Page/DashBoard.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/templates/CRM/Contribute/Page/DashBoard.js b/templates/CRM/Contribute/Page/DashBoard.js index a02121fc79..71c49df783 100644 --- a/templates/CRM/Contribute/Page/DashBoard.js +++ b/templates/CRM/Contribute/Page/DashBoard.js @@ -6,17 +6,18 @@ cj(function ($) { 'use strict'; function getChart() { - var year = $('#select_year').val(); - var charttype = $('#chart_type').val(); - var date = new Date(); - var currentYear = date.getFullYear(); + var year, charttype, date, currentYear, chartUrl; + year = $('#select_year').val(); + charttype = $('#chart_type').val(); + date = new Date(); + currentYear = date.getFullYear(); if (!charttype) { charttype = 'bvg'; } if (!year) { year = currentYear; } - var chartUrl = CRM.url("civicrm/ajax/chart", {snippet : 4}); + chartUrl = CRM.url("civicrm/ajax/chart", {snippet : 4}); chartUrl += "&year=" + year + "&type=" + charttype; $.ajax({ url : chartUrl, -- 2.25.1