View | Details | Raw Unified | Return to bug 35753
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt (-13 / +1 lines)
Lines 567-583 Link Here
567
                modalNumber = $(this).attr('data-number');
567
                modalNumber = $(this).attr('data-number');
568
                $('.modal[data-number="'+modalNumber+'"]').modal('show');
568
                $('.modal[data-number="'+modalNumber+'"]').modal('show');
569
            })
569
            })
570
            function Checkbox(){
571
                var form = document.getElementById('del_form');
572
                var inputs = form.getElementsByTagName('input');
573
                var checked = false;
574
                for (var i=0; i<inputs.length; i++) {
575
                    if (inputs[i].type == 'checkbox' && inputs[i].name == 'ids') {
576
                        checked = inputs[i].checked;
577
                        if (checked) return true;
578
                    }
579
                }
580
            }
581
570
582
            function filterDataTable( table, column, term ){
571
            function filterDataTable( table, column, term ){
583
                if( column ){
572
                if( column ){
Lines 630-636 Link Here
630
                });
619
                });
631
620
632
                $("#del_form").on("submit",function(){
621
                $("#del_form").on("submit",function(){
633
                    if ( Checkbox() ) {
622
                    if ( $('#del_form input[type="checkbox"][name="ids"]:checked').length ) {
634
                        return confirmDelete( _("Are you sure you want to delete the selected content?") );
623
                        return confirmDelete( _("Are you sure you want to delete the selected content?") );
635
                    } else {
624
                    } else {
636
                        alert(_("Please select content to delete."));
625
                        alert(_("Please select content to delete."));
637
- 

Return to bug 35753