Forgot to mention that this patch should be applied on top of " software selection model" patchset.
On 10/13/2010 03:39 PM, [email protected] wrote: > From: Jan Provaznik<[email protected]> > > Software selection: when whole group is checked and user unchecks individual > packages, these packages are not added. > --- > src/app/controllers/templates_controller.rb | 10 +++++++++- > 1 files changed, 9 insertions(+), 1 deletions(-) > > diff --git a/src/app/controllers/templates_controller.rb > b/src/app/controllers/templates_controller.rb > index 018c75d..90af41b 100644 > --- a/src/app/controllers/templates_controller.rb > +++ b/src/app/controllers/templates_controller.rb > @@ -92,7 +92,15 @@ class TemplatesController< ApplicationController > @repository_manager = RepositoryManager.new > @groups = @repository_manager.all_groups(params[:repository]) > if params[:add_selected] > - params[:groups].to_a.each { |group| @tpl.xml.add_group(group) } > + # FIXME: bug 641938: when JS is on and user clicks on group chackbox > + # all pkgs in the group are selected, so it's not necessary to add > whole > + # group. User also can uncheck some individual package in the selected > + # group. Note that this behavior differs when JS is off - then > packages in > + # the group are not checked when whole group is checked, so we keep > adding > + # whole group in this case :-/. > + unless request.xhr? > + params[:groups].to_a.each { |group| @tpl.xml.add_group(group) } > + end > params[:packages].to_a.each { |pkg| @tpl.xml.add_package(pkg) } > @tpl.save_xml! > end _______________________________________________ deltacloud-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/deltacloud-devel
