From bb0dfaf11535e89c4ff6b1a05548740b70813759 Mon Sep 17 00:00:00 2001 From: Mikael Karlsson Date: Tue, 11 Mar 2014 14:21:49 +0000 Subject: [PATCH] Cleaned multi-lined comments to single line git-svn-id: https://svn.eudat.eu/EUDAT/Services/MetaData/ckanext-datesearch@2720 68e52488-0a15-44bc-a314-416658652264 --- .../fanstatic/daterangepicker-module.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/ckanext/datesearch/fanstatic/daterangepicker-module.js b/ckanext/datesearch/fanstatic/daterangepicker-module.js index 3c24921..504f556 100644 --- a/ckanext/datesearch/fanstatic/daterangepicker-module.js +++ b/ckanext/datesearch/fanstatic/daterangepicker-module.js @@ -22,8 +22,7 @@ this.ckan.module('daterangepicker-module', function ($, _) { $('#ext_enddate').val(param_end); } - // Add hidden tags #ext_startdate and #ext_enddate, - // if they don't already exist. + // Add hidden tags #ext_startdate and #ext_enddate, if they don't already exist. var form = $("#dataset-search"); // CKAN 2.1 if (!form.length) { @@ -44,24 +43,20 @@ this.ckan.module('daterangepicker-module', function ($, _) { keyboardNavigation: false, autoclose: true }).on('hide', function (ev) { - // Bootstrap-daterangepicker calls this function after the user - // picks a start and end date. + // Bootstrap-daterangepicker calls this function after the user picks a start and end date. - // Format the start and end dates into strings in a date format - // that Solr understands. + // Format the start and end dates into strings in a date format that Solr understands. var v = moment(ev.date); var fs = 'YYYY-MM-DDTHH:mm:ss' switch (ev.target.name) { case 'start': - // Set the value of the hidden to - // the chosen start date. + // Set the value of the hidden to the chosen start date. $('#ext_startdate').val(v.format(fs) + 'Z'); break; case 'end': - // Set the value of the hidden to - // the chosen end date. - $('#ext_enddate').val(v.add('y', 1).subtract('h', 3).format(fs) + 'Z'); + // Set the value of the hidden to the chosen end date. + $('#ext_enddate').val(v.add('y', 1).subtract('s', 1).format(fs) + 'Z'); break; }