$(selector).each(function(index) {
if (!$(this).is(':checked')) { all_checked = false; }
});
- $(selector).attr('checked', !all_checked)
+ $(selector).attr('checked', !all_checked);
}
function showAndScrollTo(id, focus) {
$('#'+id).show();
- if (focus!=null) {
+ if (focus !== null) {
$('#'+focus).focus();
}
$('html, body').animate({scrollTop: $('#'+id).offset().top}, 100);
select = tr.find('td.operator select');
for (i=0;i<operators.length;i++){
var option = $('<option>').val(operators[i]).text(operatorLabels[operators[i]]);
- if (operators[i] == operator) {option.attr('selected', true)};
+ if (operators[i] == operator) { option.attr('selected', true); }
select.append(option);
}
- select.change(function(){toggleOperator(field)});
+ select.change(function(){ toggleOperator(field); });
switch (filterOptions['type']){
case "list":
' <span class="toggle-multiselect"> </span></span>'
);
select = tr.find('td.values select');
- if (values.length > 1) {select.attr('multiple', true)};
+ if (values.length > 1) { select.attr('multiple', true); }
for (i=0;i<filterValues.length;i++){
var filterValue = filterValues[i];
var option = $('<option>');
var filterValue = allProjects[i];
var option = $('<option>');
option.val(filterValue[1]).text(filterValue[0]);
- if (values[0] == filterValue[1]) {option.attr('selected', true)};
+ if (values[0] == filterValue[1]) { option.attr('selected', true); }
select.append(option);
}
case "integer":
function showModal(id, width) {
var el = $('#'+id).first();
- if (el.length == 0 || el.is(':visible')) {return;}
+ if (el.length === 0 || el.is(':visible')) {return;}
var title = el.find('h3.title').text();
el.dialog({
width: width,
source: url,
minLength: 2,
search: function(){$('#'+fieldId).addClass('ajax-loading');},
- response: function(){$('#'+fieldId).removeClass('ajax-loading');},
+ response: function(){$('#'+fieldId).removeClass('ajax-loading');}
}, options));
$('#'+fieldId).addClass('autocomplete');
});
});
if (warn) {return warnLeavingUnsavedMessage;}
};
-};
+}
function setupAjaxIndicator() {
$('#ajax-indicator').bind('ajaxSend', function(event, xhr, settings) {
- if ($('.ajax-loading').length == 0 && settings.contentType != 'application/octet-stream') {
+ if ($('.ajax-loading').length === 0 && settings.contentType != 'application/octet-stream') {
$('#ajax-indicator').show();
}
});