diff --git a/admin/themes/default/template/group_list.tpl b/admin/themes/default/template/group_list.tpl index 1d89362ce..d629dd4c0 100644 --- a/admin/themes/default/template/group_list.tpl +++ b/admin/themes/default/template/group_list.tpl @@ -1,3 +1,52 @@ +{footer_script} +{literal} +$(document).ready(function() { + + $(".grp_action").hide(); + $("input[name=group_selection]").click(function() { + + var nbSelected = 0; + nbSelected = $("input[name=group_selection]").filter(':checked').length; + + if (nbSelected == 0) { + $("#permitAction").hide(); + $("#forbidAction").show(); + } + else { + $("#permitAction").show(); + $("#forbidAction").hide(); + } + $("p[group_id="+$(this).attr("value")+"]").each(function () { + $(this).toggle(); + }); + + if (nbSelected<2) { + $("#two_to_select").show(); + $("#two_atleast").hide(); + } + else { + $("#two_to_select").hide(); + $("#two_atleast").show(); + } + }); + $("[id^=action_]").hide(); + $("select[name=selectAction]").change(function () { + $("[id^=action_]").hide(); + $("#action_"+$(this).attr("value")).show(); + if ($(this).val() != -1) { + $("#applyActionBlock").show(); + } + else { + $("#applyActionBlock").hide(); + } + }); +}); + +{/literal} +{/footer_script} + + +