Merged r11728, r11729, r11730, r11731, r11732 and r11733 from trunk to 2.3-stable (#13811)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@11734 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
af66c42d9e
commit
06ab582e5d
|
@ -14,12 +14,12 @@ function toggleCheckboxesBySelector(selector) {
|
||||||
$(selector).each(function(index) {
|
$(selector).each(function(index) {
|
||||||
if (!$(this).is(':checked')) { all_checked = false; }
|
if (!$(this).is(':checked')) { all_checked = false; }
|
||||||
});
|
});
|
||||||
$(selector).attr('checked', !all_checked)
|
$(selector).attr('checked', !all_checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
function showAndScrollTo(id, focus) {
|
function showAndScrollTo(id, focus) {
|
||||||
$('#'+id).show();
|
$('#'+id).show();
|
||||||
if (focus!=null) {
|
if (focus !== null) {
|
||||||
$('#'+focus).focus();
|
$('#'+focus).focus();
|
||||||
}
|
}
|
||||||
$('html, body').animate({scrollTop: $('#'+id).offset().top}, 100);
|
$('html, body').animate({scrollTop: $('#'+id).offset().top}, 100);
|
||||||
|
@ -131,10 +131,10 @@ function buildFilterRow(field, operator, values) {
|
||||||
select = tr.find('td.operator select');
|
select = tr.find('td.operator select');
|
||||||
for (i=0;i<operators.length;i++){
|
for (i=0;i<operators.length;i++){
|
||||||
var option = $('<option>').val(operators[i]).text(operatorLabels[operators[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.append(option);
|
||||||
}
|
}
|
||||||
select.change(function(){toggleOperator(field)});
|
select.change(function(){ toggleOperator(field); });
|
||||||
|
|
||||||
switch (filterOptions['type']){
|
switch (filterOptions['type']){
|
||||||
case "list":
|
case "list":
|
||||||
|
@ -146,7 +146,7 @@ function buildFilterRow(field, operator, values) {
|
||||||
' <span class="toggle-multiselect"> </span></span>'
|
' <span class="toggle-multiselect"> </span></span>'
|
||||||
);
|
);
|
||||||
select = tr.find('td.values select');
|
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++){
|
for (i=0;i<filterValues.length;i++){
|
||||||
var filterValue = filterValues[i];
|
var filterValue = filterValues[i];
|
||||||
var option = $('<option>');
|
var option = $('<option>');
|
||||||
|
@ -189,7 +189,7 @@ function buildFilterRow(field, operator, values) {
|
||||||
var filterValue = allProjects[i];
|
var filterValue = allProjects[i];
|
||||||
var option = $('<option>');
|
var option = $('<option>');
|
||||||
option.val(filterValue[1]).text(filterValue[0]);
|
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);
|
select.append(option);
|
||||||
}
|
}
|
||||||
case "integer":
|
case "integer":
|
||||||
|
@ -352,7 +352,7 @@ function setPredecessorFieldsVisibility() {
|
||||||
|
|
||||||
function showModal(id, width) {
|
function showModal(id, width) {
|
||||||
var el = $('#'+id).first();
|
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();
|
var title = el.find('h3.title').text();
|
||||||
el.dialog({
|
el.dialog({
|
||||||
width: width,
|
width: width,
|
||||||
|
@ -462,7 +462,7 @@ function observeAutocompleteField(fieldId, url, options) {
|
||||||
source: url,
|
source: url,
|
||||||
minLength: 2,
|
minLength: 2,
|
||||||
search: function(){$('#'+fieldId).addClass('ajax-loading');},
|
search: function(){$('#'+fieldId).addClass('ajax-loading');},
|
||||||
response: function(){$('#'+fieldId).removeClass('ajax-loading');},
|
response: function(){$('#'+fieldId).removeClass('ajax-loading');}
|
||||||
}, options));
|
}, options));
|
||||||
$('#'+fieldId).addClass('autocomplete');
|
$('#'+fieldId).addClass('autocomplete');
|
||||||
});
|
});
|
||||||
|
@ -546,13 +546,13 @@ function warnLeavingUnsaved(message) {
|
||||||
});
|
});
|
||||||
if (warn) {return warnLeavingUnsavedMessage;}
|
if (warn) {return warnLeavingUnsavedMessage;}
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
function setupAjaxIndicator() {
|
function setupAjaxIndicator() {
|
||||||
|
|
||||||
$('#ajax-indicator').bind('ajaxSend', function(event, xhr, settings) {
|
$('#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();
|
$('#ajax-indicator').show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue