[refs #223] Choosen rep auto set
This commit is contained in:
parent
5b884e9d40
commit
d6dc51ba93
|
@ -3,30 +3,29 @@ $(document).ready(function() {
|
||||||
var platform_id = $(this).val();
|
var platform_id = $(this).val();
|
||||||
var base_platforms = $('.all_platforms input[type=checkbox].build_bpl_ids');
|
var base_platforms = $('.all_platforms input[type=checkbox].build_bpl_ids');
|
||||||
|
|
||||||
//$('#include_repos').html($('.preloaded_include_repos .include_repos_' + platform_id).html());
|
|
||||||
|
|
||||||
base_platforms.each(function(){
|
base_platforms.each(function(){
|
||||||
if ($.inArray(platform_id, base_platforms.map(function(){ return $(this).val() }).get()) >= 0) {
|
if ($.inArray(platform_id, base_platforms.map(function(){ return $(this).val() }).get()) >= 0) {
|
||||||
if ($(this).val() == platform_id) {
|
if ($(this).val() == platform_id) {
|
||||||
$(this).attr('checked', 'checked');
|
$(this).attr('checked', 'checked');
|
||||||
$(this).removeAttr('disabled');
|
$(this).removeAttr('disabled');
|
||||||
$(this).parent().find('.offset25 input[type="checkbox"]').removeAttr('disabled');
|
$(this).parent().find('.offset25 input[type="checkbox"]').removeAttr('disabled');
|
||||||
if ($(this).parent().find('.offset25 label').text() == 'main') {
|
|
||||||
$(this).parent().find('.offset25 input[type="checkbox"]').attr('checked', 'checked');
|
var rep_name = $('#build_list_pl_id option[value="' + $(this).val() + '"]').text().match(/[\w-]+\/([\w-]+)/)[1];
|
||||||
|
if (rep_name != 'main') {
|
||||||
|
$(this).parent().find('.offset25 input[type="checkbox"][rep_name="' + rep_name + '"]').attr('checked', 'checked');
|
||||||
}
|
}
|
||||||
|
$(this).parent().find('.offset25 input[type="checkbox"][rep_name="main"]').attr('checked', 'checked');
|
||||||
} else {
|
} else {
|
||||||
$(this).removeAttr('checked');
|
$(this).removeAttr('checked');
|
||||||
$(this).attr('disabled', 'disabled');
|
$(this).attr('disabled', 'disabled');
|
||||||
$(this).parent().find('.offset25 input[type="checkbox"]').attr('disabled', 'disabled');
|
$(this).parent().find('.offset25 input[type="checkbox"]').attr('disabled', 'disabled');
|
||||||
$(this).parent().find('.offset25 input[type="checkbox"]').removeAttr('checked');
|
$(this).parent().find('.offset25 input[type="checkbox"]').removeAttr('checked');
|
||||||
}
|
}
|
||||||
//$('.additional_pl').parent().find('.offset25 input[type="checkbox"]').attr('disabled', 'disabled');
|
|
||||||
} else {
|
} else {
|
||||||
$(this).removeAttr('disabled');
|
$(this).removeAttr('disabled');
|
||||||
$(this).removeAttr('checked');
|
$(this).removeAttr('checked');
|
||||||
$(this).parent().find('.offset25 input[type="checkbox"]').removeAttr('disabled');
|
$(this).parent().find('.offset25 input[type="checkbox"]').removeAttr('disabled');
|
||||||
$(this).parent().find('.offset25 input[type="checkbox"]').removeAttr('checked');
|
$(this).parent().find('.offset25 input[type="checkbox"]').removeAttr('checked');
|
||||||
//$('.additional_pl').parent().find('.offset25 input[type="checkbox"]').removeAttr('disabled');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
- platform.repositories.each do |repo|
|
- platform.repositories.each do |repo|
|
||||||
.both
|
.both
|
||||||
= check_box_tag "build_list[include_repos][]", repo.id, repo.name == 'main' || @project.repositories.map(&:id).include?(repo.id), :id => "include_repos_#{repo.id}", :pl_id => platform.id
|
= check_box_tag "build_list[include_repos][]", repo.id, repo.name == 'main' || @project.repositories.map(&:id).include?(repo.id), :id => "include_repos_#{repo.id}", :pl_id => platform.id, :rep_name => repo.name
|
||||||
= label_tag "include_repos_#{repo.id}", repo.name
|
= label_tag "include_repos_#{repo.id}", repo.name
|
||||||
|
|
Loading…
Reference in New Issue