|
|
@@ -444,8 +444,10 @@ function randomKey(size) { |
|
|
|
return key; |
|
|
|
} |
|
|
|
|
|
|
|
// Can't use Rails' remote select because we need the form data |
|
|
|
function updateIssueFrom(url) { |
|
|
|
$('#all_attributes input, #all_attributes textarea, #all_attributes select').each(function(){ |
|
|
|
$(this).data('valuebeforeupdate', $(this).val()); |
|
|
|
}); |
|
|
|
$.ajax({ |
|
|
|
url: url, |
|
|
|
type: 'post', |
|
|
@@ -453,6 +455,21 @@ function updateIssueFrom(url) { |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
function replaceIssueFormWith(html){ |
|
|
|
var replacement = $(html); |
|
|
|
$('#all_attributes input, #all_attributes textarea, #all_attributes select').each(function(){ |
|
|
|
var object_id = $(this).attr('id'); |
|
|
|
if (object_id && $(this).data('valuebeforeupdate')!=$(this).val()) { |
|
|
|
replacement.find('#'+object_id).val($(this).val()); |
|
|
|
} |
|
|
|
}); |
|
|
|
$('#all_attributes').empty(); |
|
|
|
$('#all_attributes').prepend(replacement); |
|
|
|
if (focus) { |
|
|
|
$('#'+focus).focus(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function updateBulkEditFrom(url) { |
|
|
|
$.ajax({ |
|
|
|
url: url, |