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
This commit is contained in:
Mikael Karlsson 2014-03-11 14:21:49 +00:00
parent 9f96c6dd55
commit bb0dfaf115
1 changed files with 6 additions and 11 deletions

View File

@ -22,8 +22,7 @@ this.ckan.module('daterangepicker-module', function ($, _) {
$('#ext_enddate').val(param_end);
}
// Add hidden <input> tags #ext_startdate and #ext_enddate,
// if they don't already exist.
// Add hidden <input> 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 <input id="ext_startdate"> to
// the chosen start date.
// Set the value of the hidden <input id="ext_startdate"> to the chosen start date.
$('#ext_startdate').val(v.format(fs) + 'Z');
break;
case 'end':
// Set the value of the hidden <input id="ext_enddate"> to
// the chosen end date.
$('#ext_enddate').val(v.add('y', 1).subtract('h', 3).format(fs) + 'Z');
// Set the value of the hidden <input id="ext_enddate"> to the chosen end date.
$('#ext_enddate').val(v.add('y', 1).subtract('s', 1).format(fs) + 'Z');
break;
}