Bring back the checkbox behavior we had when using the metagroups. Applies on next: b123fa5a730abf7f9954978a3b05aa6b5a5eab88
[PATCH 1/2] Remove unused disclosure triangle JS [PATCH 2/2] Add all packages if the collection checkbox is checked.
--- src/app/views/templates/new.haml | 8 -------- 1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/src/app/views/templates/new.haml b/src/app/views/templates/new.haml index 915867c..0d3c1dd 100644 --- a/src/app/views/templates/new.haml +++ b/src/app/views/templates/new.haml @@ -33,14 +33,6 @@ var url = '#{url_for :action => 'dispatch', :id => @id}'; $('#metagrouppackages').load(url, data); }); - //disclosure triangles - $(".packages").hide(); - $groups.click(function() { - var $packages = $(this).siblings('.packages'); - var $container = $(this).parent('li'); - $packages.toggle(200); - $container.toggleClass('expanded'); - }); }); }); $('.remove_package').click(function() { $(this).parent().parent().remove(); });
On 10/22/2010 01:18 PM, Jakub Steiner wrote:
src/app/views/templates/new.haml | 8 -------- 1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/src/app/views/templates/new.haml b/src/app/views/templates/new.haml index 915867c..0d3c1dd 100644 --- a/src/app/views/templates/new.haml +++ b/src/app/views/templates/new.haml @@ -33,14 +33,6 @@ var url = '#{url_for :action => 'dispatch', :id => @id}'; $('#metagrouppackages').load(url, data); });
//disclosure triangles
$(".packages").hide();
$groups.click(function() {
var $packages = $(this).siblings('.packages');
var $container = $(this).parent('li');
$packages.toggle(200);
$container.toggleClass('expanded');
}); }); }); $('.remove_package').click(function() { $(this).parent().parent().remove(); });
ACK and pushed
--- src/app/views/templates/content_selection.haml | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/app/views/templates/content_selection.haml b/src/app/views/templates/content_selection.haml index 931c7d6..174366b 100644 --- a/src/app/views/templates/content_selection.haml +++ b/src/app/views/templates/content_selection.haml @@ -31,6 +31,15 @@ $('#package_selection_list').hide(); $('#add_software_button').show(); }); + //select all packages in collection + $(".softwaregroups").click(function() { + console.log($(this).attr('checked')); + if ($(this).attr("checked") === true) { + $(this).parent().siblings("ul").find("input[type='checkbox']").attr("checked","checked"); + } else { + $(this).parent().siblings("ul").find("input[type='checkbox']").removeAttr("checked"); + } + }); }); }); });
On 10/22/2010 01:18 PM, Jakub Steiner wrote:
src/app/views/templates/content_selection.haml | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/app/views/templates/content_selection.haml b/src/app/views/templates/content_selection.haml index 931c7d6..174366b 100644 --- a/src/app/views/templates/content_selection.haml +++ b/src/app/views/templates/content_selection.haml @@ -31,6 +31,15 @@ $('#package_selection_list').hide(); $('#add_software_button').show(); });
//select all packages in collection
$(".softwaregroups").click(function() {
console.log($(this).attr('checked'));
if ($(this).attr("checked") === true) {
$(this).parent().siblings("ul").find("input[type='checkbox']").attr("checked","checked");
} else {
$(this).parent().siblings("ul").find("input[type='checkbox']").removeAttr("checked");
}
});}); }); });
ACK, if you don't mind I will merge this patch with other changes (because this patch is in conflict with pagination patch I sent meantime and it's much easier to apply this patch on top of the other one).
deltacloud-devel@lists.fedorahosted.org