= 0) {
$(this).addClass("selected-background");
}
});
}
function list_label_for()
{
var list = [];
$('.template.questions label').each(function() {
list.push($(this).attr('for'));
});
return list;
}
function format_long_date(value)
{
if (value!==null && value!=='' && undefined!==value)
{
var from = value.split("/");
value = '';
if (from.length == 3) {
var year = from[2];
var month = gijgo_locale === 'en-us' ? from[0]-1 : from[1]-1;
var day = gijgo_locale === 'en-us' ? from[1] : from[0];
var date = new Date(year, month, day);
value = isNaN(date.getTime())?'':formatTextDate(date);
}
} else {
value = '';
}
return value;
}
function move_to_first_template_question(e)
{
if ($('.form-control.question').length) {
$('.form-control.question').each(function() {
$(this).focus();
return false;
});
}
}
function get_obfuscate_tooltip()
{
var str =
""+
"Los párrafos borrosos se visualizarán en la descarga"+
"
";
return str;
}
function getCurrentDatetime() {
var date = new Date();
var cur_day = date.toJSON().slice(0,10).replace(/-/g,'/');
var hours = date.getHours();
var minutes = date.getMinutes();
var seconds = date.getSeconds();
if (hours < 10) { hours = "0" + hours; }
if (minutes < 10) { minutes = "0" + minutes; }
if (seconds < 10) { seconds = "0" + seconds; }
return cur_day + " " + hours + ":" + minutes + ":" + seconds;
}
/*Finds y value of given object*/
function findPos(obj) {
var curtop = 0;
if (obj.offsetParent) {
do {
curtop += obj.offsetTop;
} while (obj = obj.offsetParent);
return [curtop];
}
}
;