Merge pull request #840 from warpc/839-enable-new_core-for-main-platforms
[refs #839]: enable new_core for all platforms
This commit is contained in:
commit
e48cc6ea9d
|
@ -10,12 +10,9 @@ $(document).ready(function() {
|
|||
var all_repositories = $('.all_platforms input');
|
||||
all_repositories.removeAttr('checked');
|
||||
|
||||
var new_core = $('#build_list_new_core');
|
||||
if (build_platform.size() == 0) {
|
||||
all_repositories.removeAttr('disabled');
|
||||
new_core.removeAttr('disabled').attr('checked', 'checked');
|
||||
} else {
|
||||
new_core.removeAttr('checked').attr('disabled', 'disabled');
|
||||
all_repositories.attr('disabled', 'disabled');
|
||||
var parent = build_platform.parent();
|
||||
parent.find('input').removeAttr('disabled');
|
||||
|
|
|
@ -26,7 +26,6 @@ class Api::V1::BuildListsController < Api::V1::BaseController
|
|||
|
||||
@build_list.user = current_user
|
||||
@build_list.priority = current_user.build_priority # User builds more priority than mass rebuild with zero priority
|
||||
@build_list.new_core = save_to_repository.platform.personal? && bl_params[:new_core] == '1'
|
||||
|
||||
if @build_list.save
|
||||
render :action => 'show'
|
||||
|
|
|
@ -55,14 +55,12 @@ class Projects::BuildListsController < Projects::BaseController
|
|||
build_for_platforms = Repository.select(:platform_id).
|
||||
where(:id => params[:build_list][:include_repos]).group(:platform_id).map(&:platform_id)
|
||||
|
||||
new_core = @platform.personal? && params[:build_list][:new_core] == '1'
|
||||
Arch.where(:id => params[:arches]).each do |arch|
|
||||
Platform.main.where(:id => build_for_platforms).each do |build_for_platform|
|
||||
@build_list = @project.build_lists.build(params[:build_list])
|
||||
@build_list.build_for_platform = build_for_platform; @build_list.arch = arch; @build_list.user = current_user
|
||||
@build_list.include_repos = @build_list.include_repos.select {|ir| @build_list.build_for_platform.repository_ids.include? ir.to_i}
|
||||
@build_list.priority = current_user.build_priority # User builds more priority than mass rebuild with zero priority
|
||||
@build_list.new_core = new_core
|
||||
|
||||
flash_options = {:project_version => @build_list.project_version, :arch => arch.name, :build_for_platform => build_for_platform.name}
|
||||
if @build_list.save
|
||||
|
|
Loading…
Reference in New Issue